unsigned char *uc_d_image=NULL;
code…
When I look uc_d_image it says: 0x00000000
Why Bad Ptr?? Is that a problem? :unsure:
//allocate
cudaMallocPitch((void**)&uc_d_image, &pitchImage, imageSizeX, imageSizeY);
Some Before and after cudaMallocPitch of uc_d_image:
Before:
-
uc_d_image 0x00000000 <Bad Ptr> unsigned char *
After:
-
uc_d_image 0x05720000 "" unsigned char *
-
uc_d_image 0x05720000 "#" unsigned char *
-
uc_d_image 0x00000000 <Bad Ptr> unsigned char *
after allocate, usually disappear but some times, still there, and some times cudaMallocPitch seems to do nothing, because the address remain the same! Then I get this error:
cerror cudaErrorLaunchFailure cudaError
Why?? The computer freezes for some time when that happens.
code…
//free
if (uc_d_image!=NULL)
cudaFree(uc_d_image);
if ((cerror = cudaGetLastError()))
{
const char *c;
c = cudaGetErrorString((cudaError_t) cerror);
}
…
I get error 17, Invalid device pointer
why?
thanks… External Image