8 Replies Latest reply on Sep 11, 2012 1:28 PM by amdkid

    How to use clCreateProgramWithSource function with not single string?[CLOSED]


      Hi to all.


      I try to use clCreateProgramWithSource function with  strings parameter equivalent not single string.

      I equate count parameter to number of strings in strings parameter

      then as strings parameter I use pointer to an array of PChar strings

      as lengths parameter I use NULL


      In that case function  clCreateProgramWithSource not returns an error, but function clBuildProgram return error code -11 (CL_BUILD_PROGRAM_FAILURE)

      which is not arises if in function  clCreateProgramWithSource i use single PChar string as strings parameter and count=1  lengths=NULL.


      Below I show my cl code:


      inline void Work0()





      inline void Work1(__global const float4 * a1, __global const float4 * b1, __global float4 * c1, int i1)


           float4 bufa;             

           float4 bufb;



           bufa += bufb;        




      __kernel void VectorAdd( __global const float4 * a, __global const float4 * b, __global float4 * c, int N)


           int i = get_global_id(0);   // Получаем номер потока







                Work1(a, b, c, i);




      Somebody please help me to solve that's problem.


      Answer find in post Sep 10, 2012 7:32 AM