QTrk
|
Stores a large number of small images into a single large memory space. Optimizes GPU memory copies. It has no constructor/destructor, so it can be passed to CUDA kernels. The memory is allocated using cudaMallocPitch. It allows binding to a texture. More...
#include <cudaImageList.h>
Public Types | |
enum | { MaxImageWidth = 8192 } |
Public Member Functions | |
CUBOTH int | fullwidth () |
CUBOTH int | fullheight () |
CUBOTH int | capacity () |
CUBOTH int | numpixels () |
CUBOTH bool | isEmpty () |
template<int Flags> | |
void | allocateHostImageBuffer (pinned_array< T, Flags > &hostImgBuf) |
CUBOTH T * | get (int i) |
CUBOTH T | pixel_oobcheck (int x, int y, int imgIndex, T border=0.0f) |
CUBOTH T & | pixel (int x, int y, int imgIndex) |
CUBOTH T * | pixelAddress (int x, int y, int imgIndex) |
CUBOTH bool | boundaryHit (float2 center, float radius) |
void | free () |
void | copyImageToHost (int img, T *dst, bool async=false, cudaStream_t s=0) |
void | copyImageToDevice (int img, T *src, bool async=false, cudaStream_t s=0) |
void | copyToHost (T *dst, bool async=false, cudaStream_t s=0) |
void | copyToDevice (T *src, bool async=false, cudaStream_t s=0) |
void | copyToDevice (T *src, int numImages, bool async=false, cudaStream_t s=0) |
void | clear () |
CUBOTH int | totalNumPixels () |
CUBOTH int | totalNumBytes () |
CUBOTH T | interpolate (float x, float y, int idx, bool &outside) |
void | bind (texture< T, cudaTextureType2D, cudaReadModeElementType > &texref) |
void | unbind (texture< T, cudaTextureType2D, cudaReadModeElementType > &texref) |
CUBOTH void | computeImagePos (int &x, int &y, int idx) |
__device__ T | interpolateFromTexture (texture< T, cudaTextureType2D, cudaReadModeElementType > texref, float x, float y, int idx, bool &outside) |
Static Public Member Functions | |
static cudaImageList< T > | emptyList () |
static cudaImageList< T > | alloc (int w, int h, int amount) |
static CUBOTH T | interp (T a, T b, float x) |
Public Attributes | |
T * | data |
size_t | pitch |
int | w |
int | h |
int | count |
Stores a large number of small images into a single large memory space. Optimizes GPU memory copies. It has no constructor/destructor, so it can be passed to CUDA kernels. The memory is allocated using cudaMallocPitch. It allows binding to a texture.
Definition at line 10 of file cudaImageList.h.
anonymous enum |
Enumerator | |
---|---|
MaxImageWidth |
Definition at line 19 of file cudaImageList.h.
|
inlinestatic |
Definition at line 35 of file cudaImageList.h.
|
inline |
Definition at line 47 of file cudaImageList.h.
|
inline |
Definition at line 166 of file cudaImageList.h.
|
inline |
Definition at line 79 of file cudaImageList.h.
|
inline |
Definition at line 21 of file cudaImageList.h.
|
inline |
Definition at line 136 of file cudaImageList.h.
|
inline |
Definition at line 174 of file cudaImageList.h.
|
inline |
Definition at line 106 of file cudaImageList.h.
|
inline |
Definition at line 97 of file cudaImageList.h.
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Definition at line 24 of file cudaImageList.h.
|
inline |
Definition at line 88 of file cudaImageList.h.
|
inline |
Definition at line 17 of file cudaImageList.h.
|
inline |
Definition at line 16 of file cudaImageList.h.
|
inline |
Definition at line 51 of file cudaImageList.h.
|
inlinestatic |
Definition at line 143 of file cudaImageList.h.
|
inline |
Definition at line 145 of file cudaImageList.h.
|
inline |
Definition at line 180 of file cudaImageList.h.
|
inline |
Definition at line 33 of file cudaImageList.h.
|
inline |
Definition at line 22 of file cudaImageList.h.
|
inline |
Definition at line 64 of file cudaImageList.h.
|
inline |
Definition at line 55 of file cudaImageList.h.
|
inline |
Definition at line 71 of file cudaImageList.h.
|
inline |
Definition at line 141 of file cudaImageList.h.
|
inline |
Definition at line 140 of file cudaImageList.h.
|
inline |
Definition at line 170 of file cudaImageList.h.
int cudaImageList< T >::count |
Definition at line 14 of file cudaImageList.h.
T* cudaImageList< T >::data |
Definition at line 11 of file cudaImageList.h.
int cudaImageList< T >::h |
Definition at line 13 of file cudaImageList.h.
size_t cudaImageList< T >::pitch |
Definition at line 12 of file cudaImageList.h.
int cudaImageList< T >::w |
Definition at line 13 of file cudaImageList.h.