The second parameter is supposed to be a size_t*
, but you're passing a size_t
. Try this instead:
cudaMallocPitch(&devPtr, &pitch, width * sizeof(float), height);
Note also that the last parameter type is also size_t
. Perhaps height
would be better as a size_t
.