Constant Array of Structs invalid device symbol error

[codebox]struct d_struct {

// stuff

};

device constant d_struct structs;[/codebox]

When I call cudaMemcpyToSymbol(“structs”, &h_struct, sizeof(d_struct), index * sizeof(d_struct), cudaMemcpyHostToDevice) on a d_struct “h_struct” in host memory, I get an “invalid device symbol” cuda error.

[codebox]struct d_struct {

// stuff

};

device constant d_struct structs;[/codebox]

When I call cudaMemcpyToSymbol(“structs”, &h_struct, sizeof(d_struct), index * sizeof(d_struct), cudaMemcpyHostToDevice) on a d_struct “h_struct” in host memory, I get an “invalid device symbol” cuda error.