|  | 
| static std::string | skepu::GenerateKernel_CL ("__kernel void GenerateKernel_KERNELNAME(__global TYPE* output, unsigned int numElements, unsigned int offset, CONST_TYPE const1)\n""{\n""    output = (__global void *)output + offset; /* partitioning is special with opencl */ \n""    unsigned int i = get_global_id(0);\n""    unsigned int gridSize = get_local_size(0)*get_num_groups(0);\n""    while(i < numElements)\n""    {\n""        output[i] = FUNCTIONNAME(i+offset, const1);\n""        i += gridSize;\n""    }\n""}\n") | 
|  | 
| static std::string | skepu::GenerateKernel_CL_Matrix ("__kernel void GenerateKernel_Matrix_KERNELNAME(__global TYPE* output, unsigned int numElements, unsigned int xsize, unsigned int ysize, unsigned int offset, CONST_TYPE const1)\n""{\n""    output = (__global void *)output + offset; /* partitioning is special with opencl */ \n""    int xindex = get_global_id(0);\n""    int yindex = get_global_id(1);\n""    int i = yindex*xsize + xindex; \n""    if(i < numElements && xindex<xsize && yindex <ysize)\n""    {\n""        output[i] = FUNCTIONNAME(xindex, yindex+offset, const1);\n""    }\n""}\n") | 
|  | 
| template<typename T , typename GenerateFunc > | 
| __global__ void | skepu::GenerateKernel_CU (GenerateFunc generateFunc, T *output, unsigned int numElements, unsigned int indexOffset) | 
|  | 
| template<typename T , typename GenerateFunc > | 
| __global__ void | skepu::GenerateKernel_CU_Matrix (GenerateFunc generateFunc, T *output, unsigned int numElements, unsigned int xsize, unsigned int ysize, unsigned int yoffset) | 
|  | 
Definitions of CUDA and OpenCL kernels for the Generate skeleton. 
  
  | 
        
          | static std::string skepu::GenerateKernel_CL | ( | "__kernel void GenerateKernel_KERNELNAME(__global TYPE* output, unsigned int numElements, unsigned int offset, CONST_TYPE const1)\n""{\n""    output = (__global void *)output + offset; /* partitioning is special with opencl */ \n""    unsigned int i = get_global_id(0);\n""    unsigned int gridSize = get_local_size(0)*get_num_groups(0);\n""    while(i < numElements)\n""    {\n""        output[i] = FUNCTIONNAME(i+offset, const1);\n""        i += gridSize;\n""    }\n""}\n" |  | ) |  |  | static | 
 
 
  
  | 
        
          | static std::string skepu::GenerateKernel_CL_Matrix | ( | "__kernel void GenerateKernel_Matrix_KERNELNAME(__global TYPE* output, unsigned int numElements, unsigned int xsize, unsigned int ysize, unsigned int offset, CONST_TYPE const1)\n""{\n""    output = (__global void *)output + offset; /* partitioning is special with opencl */ \n""    int xindex = get_global_id(0);\n""    int yindex = get_global_id(1);\n""    int i = yindex*xsize + xindex; \n""    if(i < numElements && xindex<xsize && yindex <ysize)\n""    {\n""        output[i] = FUNCTIONNAME(xindex, yindex+offset, const1);\n""    }\n""}\n" |  | ) |  |  | static | 
 
 
template<typename T , typename GenerateFunc > 
      
        
          | __global__ void skepu::GenerateKernel_CU | ( | GenerateFunc | generateFunc, | 
        
          |  |  | T * | output, | 
        
          |  |  | unsigned int | numElements, | 
        
          |  |  | unsigned int | indexOffset | 
        
          |  | ) |  |  | 
      
 
 
template<typename T , typename GenerateFunc > 
      
        
          | __global__ void skepu::GenerateKernel_CU_Matrix | ( | GenerateFunc | generateFunc, | 
        
          |  |  | T * | output, | 
        
          |  |  | unsigned int | numElements, | 
        
          |  |  | unsigned int | xsize, | 
        
          |  |  | unsigned int | ysize, | 
        
          |  |  | unsigned int | yoffset | 
        
          |  | ) |  |  |