Contains the OpenCL and CUDA kernels for the Generate skeleton. More...
#include <string>

Go to the source code of this file.
Namespaces | |
| skepu | |
| The main namespace for SkePU library. | |
Functions | |
| static std::string | skepu::GenerateKernel_CL ("__kernel void GenerateKernel_KERNELNAME(__global TYPE* output, size_t numElements, size_t indexOffset, CONST_TYPE const1)\n""{\n"" size_t i = get_global_id(0);\n"" size_t gridSize = get_local_size(0)*get_num_groups(0);\n"" while(i < numElements)\n"" {\n"" output[i] = FUNCTIONNAME(i+indexOffset, const1);\n"" i += gridSize;\n"" }\n""}\n") |
| static std::string | skepu::GenerateKernel_CL_Matrix ("__kernel void GenerateKernel_Matrix_KERNELNAME(__global TYPE* output, size_t numElements, size_t xsize, size_t ysize, size_t yoffset, CONST_TYPE const1)\n""{\n"" size_t xindex = get_global_id(0);\n"" size_t yindex = get_global_id(1);\n"" size_t i = yindex*xsize + xindex; \n"" if(i < numElements && xindex<xsize && yindex <ysize)\n"" {\n"" output[i] = FUNCTIONNAME(xindex, yindex+yoffset, const1);\n"" }\n""}\n") |
| template<typename T , typename GenerateFunc > | |
| __global__ void | skepu::GenerateKernel_CU (GenerateFunc generateFunc, T *output, size_t numElements, size_t indexOffset) |
| template<typename T , typename GenerateFunc > | |
| __global__ void | skepu::GenerateKernel_CU_Matrix (GenerateFunc generateFunc, T *output, size_t numElements, size_t xsize, size_t ysize, size_t yoffset) |
Contains the OpenCL and CUDA kernels for the Generate skeleton.
1.8.5