GpuContext* ctx
struct GpuContext
{
/*Input vars*/
size_t deviceIdx;
size_t rawIntensity;
size_t workSize;
int stridedIndex;
int memChunk;
bool isNVIDIA = false;
int compMode;
/*Output vars*/
cl_device_id DeviceID;
cl_command_queue CommandQueues;
cl_mem InputBuffer;
cl_mem OutputBuffer;
cl_mem ExtraBuffers[6];
cl_program Program[2];
cl_kernel Kernels[2][8];
size_t freeMem;
int computeUnits;
std::string name;
uint32_t Nonce;
};
ctx->Program[ii].getBuildInfo((cl_int*)1);
I'm trying to run this last line of code. I provided the relevant code for the rest of the function. The ii is because the code I'm running is inside a loop. getBuildInfo is a function call from the cl_program class located here:
https://github.khronos.org/OpenCL-CLHPP/classcl_1_1_program.html
I understand I'm doing something incorrectly. What I'm trying to do is call the function getBuildInfo on the Program[ii] cl_program object. The compiler is telling me
member reference type 'cl_program' (aka '_cl_program *') is a pointer; did
you mean to use '->'?
ctx->Program[ii].getBuildInfo((cl_int*)1);
~~~~~~~~~~~~~~~~^
->
But Program[ii] (cl_program) is not a pointer as you can see from the struct GpuContext. Is ctx->Program[ii]->getBuildInfo((cl_int*)1);
correct?