OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.

openCL problem

SPere43
Beginner
869 Views

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
Sergey_I_Intel1
Employee
859 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
Reply