Reputation: 95
Here is my code :
unsigned char *d_eCB[9];
unsigned char eCB[9] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
err = cudaMalloc((void **)&d_eCB,9*sizeof(unsigned char));
err = cudaMemcpy(d_eCB, eCB, 9*sizeof(unsigned char), cudaMemcpyHostToDevice);
The error occurs on the following line :
err = cudaMemcpy(d_eCB, eCB, 9*sizeof(unsigned char), cudaMemcpyHostToDevice);
The error is as follows : cudaErrorInvalidValue 11
Upvotes: 0
Views: 2733
Reputation: 95
I changed
unsigned char *d_eCB[9];
to
unsigned char *d_eCB;
Thank you.
Upvotes: 3