Anyone know how to change this to cuda.
Anyone know how to convert this to cuda..?
/* File:
*
* Purpose:
* calculate prime numbers and print first 100values in Parallel Using C and openMP
*
* Compile:
* module load gcc/6.4.0
* gcc -O2 -fopenmp -o primeprime_parallel_openmp.c -lm
* srun -p node -n 16 -N 1 –pty –mem 10000-t 10:00 bash
* Run:
* ./prime -n 1000000
*
* Input:
* prime number range
* Output:
* First 100 prime numbers
* Parallel runtime
* # of prime numbers
*
* Algorithm:
* user input terms are entered and the primes arecalculated from that number.
*/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
int N = 16; //test value