Hello all ,
new to cuda can some one tell me the exact process to compile an ex.cu file using nvcc, i tried nvcc -cuda ex.cu int the dos command prompt but got reply sating Cannot find compiler ‘cl.exe’ in PATH
is it necessary i use visual c++ or dev cpp , if so how to configure those to compile cuda programs !!
Thank you in advance
AJ
The SDK has plenty of sample visual studio projects, it’s a good place to start.
I have now got a hang of using CUDA , but i am having doubt which I hope would be cleared here.
I see that idx is used to assign array index in the kernel and no for looping is required. I try a simple example that calculates number of prime numbers between to integers, how do I go about it using CUDA to get max effeciency. The normal C routine is given as
void inHostPrimeCalc(int lowerNo,int highNo)
{
x = lowerNo;
y = highNo;
int count = 0;
for(j=x;j<=y;j++)
{
for(k=2;k<j;k++)
if(j%k==0)
{
flag=1;
break;
}
if(flag==0)
{
count++;
res=count;
}
else flag=0;
}
}
}