Hi,
I programming guide 2.0, there’s example about how to use cuParamSetx x=i, f, v.
char data[32];
cuParamSetv(cuFunction, offset, (void*)data, sizeof(data));
offset += sizeof(data);
This works fine.
But I think the data should be defined in device memory because in other case
ParamSeti, ParamSetf, they all take either cuDeviceptr type which is an address of device
memory.: in fact, matrixMul program shows the example.
I tried to use cudaMalloc(), cudaMemcpy() then cuParamSetv() evenif it’s not possible to mix up
to different api’s. It’s fine in compilation but had runtime error.
If data is okey to be defined in host memory, could you show me some example?
Or, inside cuParamSetv(), does it copy HtoD and register what is newly defined in device into
launch function’s argument list?
Thank you.
S.