I’m trying to execute this program, but when it execute the cudaMemcpyToSymbol I got this message"invalid device symbol". A piece of code has been copied.
In the Header
typedef struct{
unsigned short ordre;
double coefficient[FIRCOEFFSIZE];
unsigned short inputLength;
}FILTRE;
In the .cu
a Part of Main
static __device__ __constant__ FILTRE GPUcoeff;
FILTRE filtre;
filtre.ordre = FIRCOEFFSIZE;
filtre.coefficient[0] = 1;
filtre.inputLength = SHAPEDLEN+(DELAY*2);
matchedFilter(dataQ, &filtre, &fs, dimBlock, dimGrid);
a Part of matchedFilter function
void matchedFilter(double *shaped, FILTRE* fir1, double *fs, dim3 dimBlock, dim3 dimGrid)
{
//Declaration of GPU's variable in ****
double *GPUShape;
double *GPUFs;
//Load data in GPU's constant memory
cutilSafeCall(cudaMemcpyToSymbol("GPUcoeff", &fir1, sizeof(FILTRE)));