Hi all , i tryed to compile a cuda source file but i had a problem ,
i wrote : nvcc --device-emulation -c “myfile.cu”
and he tell me :
error : call can not be configured (l.34)
that’s my code :
[codebox]#include <stdio.h>
#include <stdlib.h>
device int verifpremier(int nombre);
int verifpremier(int nombre)
{
int ispremier = 1;
int i=2;
while(i<(nombre - 1))
{
if(nombre % i == 0)
{
ispremier = 0;
break;
}
i++;
}
if(ispremier == 1)
{
printf("%d \n",nombre);
}
return 0;
}
device int main (int argc , char *argv)
{
int iboucle = 1;
while (iboucle)
{
verifpremier<<<500,128>>>(iboucle);
iboucle++;
}
system(“PAUSE”);
return 0;
}[/codebox]
I repeat that i’m a beginner with CUDA . I would like to compare performance between my cpu and my graphic card . Thanks for your help. (google is not my friends)
(Sorry for my english , i’m french).