What's the difference between
cudaMemcpy and cudaMemset??
How to copy int value from host to device? This is the code I'm using.
int addXdir = 1; int devAddXdir; cudaMalloc((void**)&devAddXdir, sizeof(int)); cudaMemcpy(devAddXdir, addXdir, sizeof(int), cudaMemcpyHostToDevice);
it gives the following error errors: an argument of type int is incompatible with a parameter of type void * error: an argument of type int is incompatible with a parameter of type const void *
user570593
source share