Tool/software: Linux
I want t use the openCL to accelerate my program. And I read the guide http://downloads.ti.com/mctools/esd/docs/opencl/compilation.html
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Linux
I want t use the openCL to accelerate my program. And I read the guide http://downloads.ti.com/mctools/esd/docs/opencl/compilation.html
Thanks for your reply.
It seems that there was an error when I entered the question. My question is not all displayed.
My question is can I use openCL in c language project. When I read the documentation, the all example is based c++. But, my project is based on c. So, if I can use the openCL in c, what's the way?
Now, I can use opencl in c progect. But there's a question about how to use clocl-compiled .dsp_h files in c project?
I have tested like these, but the core dumped:
#include "add_vec.dsp_h‘
//fp = fopen("add_vec.cl", "r");
//kernel_code_size = fread(kernel_src_str, 1, MAX_SOURCE_SIZE, fp);
//fclose(fp);
kernel_code_size = add_vec_dsp_bin_len;
printf("111\n");
program = clCreateProgramWithSource(context, 1, (const char **)add_vec_dsp_bin,
(const size_t *)&kernel_code_size, &ret);
Hi,
It seems that you are creating an OpenCL program from binary with embedded binary. In that case, it seems to me that you are not following the instruction in
Rex
Hi,
TI OpenCL implementation is based on Khronos OpenCL 1.1 and the support of offloading on TI multicore platforms. For foundamental info on OpenCL, please refer to Khronos's page on OpenCL Overview. Khronos' reference example and library are provided in C++. TI's example is based on Khronos OpenCL C++ Wrapper API. You should find if Khronos has C API for OpenCL to support your requirement.
The Khronos OpenCL website is at https://www.khronos.org/opencl/resources
If this answers your questions, please click "Resolved".
Rex