|
__host__ | KernelData (const LinearDeviceMemory< PixelType, Ndim > &mem) |
|
__host__ | ~KernelData () |
|
template<typename ResultType = void> |
__device__ std::enable_if
<(Ndim==2), ResultType >::type | getPosition (const unsigned int &linear_idx, unsigned int &idx0, unsigned int &idx1) |
|
template<typename ResultType = void> |
__device__ std::enable_if
<(Ndim==3), ResultType >::type | getPosition (const unsigned int &linear_idx, unsigned int &idx0, unsigned int &idx1, unsigned int &idx2) |
|
template<typename ResultType = void> |
__device__ std::enable_if
<(Ndim==4), ResultType >::type | getPosition (const unsigned int &linear_idx, unsigned int &idx0, unsigned int &idx1, unsigned int &idx2, unsigned int &idx3) |
|
template<typename ResultType = void> |
__device__ std::enable_if
<(Ndim==5), ResultType >::type | getPosition (const unsigned int &linear_idx, unsigned int &idx0, unsigned int &idx1, unsigned int &idx2, unsigned int &idx3, unsigned int &idx4) |
|
template<typename ResultType = unsigned int> |
__device__ std::enable_if
<(Ndim > 1), ResultType >
::type | getLinearIndex (const unsigned int &idx0, const unsigned int &idx1) |
|
template<typename ResultType = unsigned int> |
__device__ std::enable_if
<(Ndim > 2), ResultType >
::type | getLinearIndex (const unsigned int &idx0, const unsigned int &idx1, const unsigned int &idx2) |
|
template<typename ResultType = unsigned int> |
__device__ std::enable_if
<(Ndim > 3), ResultType >
::type | getLinearIndex (const unsigned int &idx0, const unsigned int &idx1, const unsigned int &idx2, const unsigned int &idx3) |
|
template<typename ResultType = unsigned int> |
__device__ std::enable_if
<(Ndim > 4), ResultType >
::type | getLinearIndex (const unsigned int &idx0, const unsigned int &idx1, const unsigned int &idx2, const unsigned int &idx3, const unsigned int &idx4) |
|
__device__ PixelType & | operator() (const unsigned int &idx) |
|
template<typename ResultType = PixelType> |
__device__ std::enable_if
<(Ndim > 1), ResultType & >
::type | operator() (const unsigned int &idx0, const unsigned int &idx1) |
|
template<typename ResultType = PixelType> |
__device__ std::enable_if
<(Ndim > 2), ResultType & >
::type | operator() (const unsigned int &idx0, const unsigned int &idx1, const unsigned int &idx2) |
|
template<typename ResultType = PixelType> |
__device__ std::enable_if
<(Ndim > 3), ResultType & >
::type | operator() (const unsigned int &idx0, const unsigned int &idx1, const unsigned int &idx2, const unsigned int &idx3) |
|
template<typename ResultType = PixelType> |
__device__ std::enable_if
<(Ndim > 4), ResultType & >
::type | operator() (const unsigned int &idx0, const unsigned int &idx1, const unsigned int &idx2, const unsigned int &idx3, const unsigned int &idx4) |
|
template<typename PixelType, unsigned int Ndim>
struct iu::LinearDeviceMemory< PixelType, Ndim >::KernelData
Struct pointer KernelData that can be used in CUDA kernels.
This struct provides the device data pointer as well as important class properties.
template<typename PixelType>
{
const unsigned int x = threadIdx.x + blockIdx.x * blockDim.x;
{
img(x) += value;
}
}
template<typename PixelType>
{
dim3 dimBlock(32,1);
dim3 dimGrid(iu::divUp(img->
numel(), dimBlock.x), 1);
cudaFunctionKernel<PixelType><<<dimGrid, dimBlock>>>(*memory, value);
IU_CUDA_CHECK;
}