I have a question about OpenCL the example listed in the following link :
OpenCL vector addition program
I replaced one old line with one new - actually reading strings as elements of array of pointers as stated in documentation.
const cl_uint NumberOfStrings = 1; // Works ONLY FOR just one string
const char* sourcearr[] = { source_str1 , source_str2, source_str3 }; // array pointers to strings
const size_t sourcesizearr[] = { source_size1 , source_size2, source_size3}; // pointers to string sizes
// new
cl_program program = clCreateProgramWithSource(context, NumberOfStrings , (const char**)&sourcearr, (const size_t*)&sourcesizearr, &ret);
// old
// cl_program program = clCreateProgramWithSource(context, 1 , (const char**)&source_str, (const size_t*)&source_size, &ret);
All is working for just one string. If I put the value of NumberOfStrings > 1 I get a bunch of zeroes again.
I do not understand what happens. I was not albe to find an example of reading more that one string into memory. It is always 1.