QTrk
Public Member Functions | Public Attributes | List of all members
Image4DCudaArray< T >::KernelInst Struct Reference

#include <cudaImageList.h>

Public Member Functions

CUBOTH int2 getImagePos (int image)
 
__device__ T readSurfacePixel (surface< void, cudaSurfaceType2DLayered > surf, int x, int y, int z)
 
__device__ void writeSurfacePixel (surface< void, cudaSurfaceType2DLayered > surf, int x, int y, int z, T value)
 

Public Attributes

int imgw
 
int imgh
 
int layerw
 

Detailed Description

template<typename T>
struct Image4DCudaArray< T >::KernelInst

Definition at line 227 of file cudaImageList.h.

Member Function Documentation

§ getImagePos()

template<typename T >
CUBOTH int2 Image4DCudaArray< T >::KernelInst::getImagePos ( int  image)
inline

Definition at line 231 of file cudaImageList.h.

232  {
233  return make_int2(imgw * (image % layerw), imgh * (image / layerw));
234  }

§ readSurfacePixel()

template<typename T >
__device__ T Image4DCudaArray< T >::KernelInst::readSurfacePixel ( surface< void, cudaSurfaceType2DLayered >  surf,
int  x,
int  y,
int  z 
)
inline

Definition at line 236 of file cudaImageList.h.

237  {
238  T r;
239  surf2DLayeredread (&r, image_lut_surface, sizeof(T)*x, y, z, cudaBoundaryModeTrap);
240  return r;
241  }
surface< void, cudaSurfaceType2DLayered > image_lut_surface
Definition: Kernels.h:3

§ writeSurfacePixel()

template<typename T >
__device__ void Image4DCudaArray< T >::KernelInst::writeSurfacePixel ( surface< void, cudaSurfaceType2DLayered >  surf,
int  x,
int  y,
int  z,
value 
)
inline

Definition at line 243 of file cudaImageList.h.

244  {
245  surf2DLayeredwrite(value, surf, sizeof(T)*x, y, z, cudaBoundaryModeTrap);
246  }

Member Data Documentation

§ imgh

template<typename T >
int Image4DCudaArray< T >::KernelInst::imgh

Definition at line 228 of file cudaImageList.h.

§ imgw

template<typename T >
int Image4DCudaArray< T >::KernelInst::imgw

Definition at line 228 of file cudaImageList.h.

§ layerw

template<typename T >
int Image4DCudaArray< T >::KernelInst::layerw

Definition at line 229 of file cudaImageList.h.


The documentation for this struct was generated from the following file: