SkePU(integratedwithStarPU)  0.8.1
 All Classes Namespaces Files Functions Enumerations Friends Macros Groups Pages
Functions
Generate Kernels
Collaboration diagram for Generate Kernels:

Functions

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)
 

Detailed Description

Definitions of CUDA and OpenCL kernels for the Generate skeleton.

Function Documentation

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

OpenCL Generate kernel for vector.

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

OpenCL Generate kernel for matrix.

template<typename T , typename GenerateFunc >
__global__ void skepu::GenerateKernel_CU ( GenerateFunc  generateFunc,
T *  output,
unsigned int  numElements,
unsigned int  indexOffset 
)

CUDA Generate kernel for vector.

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 
)

CUDA Generate kernel for matrix.