Changes between Version 3 and Version 4 of OpenCLTransformation


Ignore:
Timestamp:
06/26/14 14:57:54 (12 years ago)
Author:
fuufusuu
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenCLTransformation

    v3 v4  
    3232memcpy(input, data, sizeof(int) * count);
    3333}}}
     34
     35err  = clSetKernelArg(kernel, 0, sizeof(cl_mem), &input);
     36err |= clSetKernelArg(kernel, 1, sizeof(cl_mem), &output);
     37err |= clSetKernelArg(kernel, 2, sizeof(unsigned int), &count);
     38
     39clSetKernelArg sets arguments for an array of each device in the kernel.
     40{{{
     41  $assert(global%local == 0);
     42  kernel param[global/local];
     43  for(int i = 0; i < global/local; i++)
     44  {
     45  //Also picks the device to be used
     46    param[i].device_id = device_id[0];
     47    //other parts of the struct
     48    param[i].input = input;
     49    param[i].output = output;
     50    param[i].count = count;
     51  }
     52}}}