Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
76 Views

openCL problem

Hey guys.

I have a little doubt and I really need your help.
My problem is this:
I create an opencl buffer as follows:

 

d_sample = clCreateBuffer(context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR,
sizeof(float) * (1 * 3 * 224 * 224), NULL, &status);
checkError(status, "Failed to create buffer d_sample");

 

Then I have 1 array full of values like my_array [99999]
And I want to pass these values from my array to the buffer.

How can I do it?

 

Labels (1)
0 Kudos
1 Reply
Highlighted
66 Views

Hello,

 

Please, take a look at example, which is coming with Intel(R) OpenCL SDK in CPU/GPU Template.

Also, take a look at OpenCL documentation.

 

Best regards,

Sergey

0 Kudos