Plugging some holes in the NVIDIA® texture fetch API, and making it less annoying to use in template code. More...
Functions | |
__device__ int | sp::getTexWidth (cudaTextureObject_t tex) |
Query the width of a texture object. More... | |
__device__ int | sp::getTexHeight (cudaTextureObject_t tex) |
Query the height of a texture object. More... | |
__device__ int | sp::getTexDepth (cudaTextureObject_t tex) |
Query the depth of a texture object. More... | |
template<> | |
__device__ float4 | sp::tex1Dfetch (cudaTextureObject_t tex, int x) |
template<> | |
__device__ float4 | sp::tex1DOffsetfetch (cudaTextureObject_t tex, int x, int xO) |
Read from a 1D texture at an integer offset with offset addressing (API extension) More... | |
template<> | |
__device__ float4 | sp::tex2Dfetch (cudaTextureObject_t tex, int x, int y) |
Read from a 2D texture using integer coordinates. (API extension) More... | |
template<> | |
__device__ float4 | sp::tex2DOffsetfetch (cudaTextureObject_t tex, int x, int y, int xO, int yO) |
Read from a 2D texture using integer coordinates with offset addressing. (API extension) More... | |
template<> | |
__device__ float4 | sp::tex3Dfetch (cudaTextureObject_t tex, int x, int y, int z) |
Read from a 3D texture using integer coordinates. (API extension) More... | |
template<> | |
__device__ float4 | sp::tex3DOffsetfetch (cudaTextureObject_t tex, int x, int y, int z, int xO, int yO, int zO) |
Read from a 3D texture using integer coordinates. with offset addressing (API extension) More... | |
template<> | |
__device__ float4 | sp::tex1D (cudaTextureObject_t tex, float x) |
Read from a 1D texture at a floating-point offset. More... | |
template<> | |
__device__ float4 | sp::tex2D (cudaTextureObject_t tex, float x, float y) |
Read from a 2D texture using floating-point coordinates. More... | |
template<> | |
__device__ float4 | sp::tex3D (cudaTextureObject_t tex, float x, float y, float z) |
Read from a 3D texture using floating-point coordinates. More... | |
Plugging some holes in the NVIDIA® texture fetch API, and making it less annoying to use in template code.
The NVIDIA APIs don't expose non-interpolating accessors for 2 or 3 dimensions, among other things. This additional flexibility is needed to implement speclib's TexTensor
(which, unless you're porting legacy code, is probably the only sensible way to use these functions).
__device__ int sp::getTexDepth | ( | cudaTextureObject_t | tex | ) |
Query the depth of a texture object.
__device__ int sp::getTexHeight | ( | cudaTextureObject_t | tex | ) |
Query the height of a texture object.
__device__ int sp::getTexWidth | ( | cudaTextureObject_t | tex | ) |
Query the width of a texture object.
__device__ float4 sp::tex1D | ( | cudaTextureObject_t | tex, |
float | x | ||
) |
Read from a 1D texture at a floating-point offset.
__device__ float4 sp::tex1Dfetch | ( | cudaTextureObject_t | tex, |
int | x | ||
) |
Read from a 1D texture at an integer offset.
__device__ float4 sp::tex1DOffsetfetch | ( | cudaTextureObject_t | tex, |
int | x, | ||
int | xO | ||
) |
Read from a 1D texture at an integer offset with offset addressing (API extension)
__device__ float4 sp::tex2D | ( | cudaTextureObject_t | tex, |
float | x, | ||
float | y | ||
) |
Read from a 2D texture using floating-point coordinates.
__device__ float4 sp::tex2Dfetch | ( | cudaTextureObject_t | tex, |
int | x, | ||
int | y | ||
) |
Read from a 2D texture using integer coordinates. (API extension)
__device__ float4 sp::tex2DOffsetfetch | ( | cudaTextureObject_t | tex, |
int | x, | ||
int | y, | ||
int | xO, | ||
int | yO | ||
) |
Read from a 2D texture using integer coordinates with offset addressing. (API extension)
__device__ float4 sp::tex3D | ( | cudaTextureObject_t | tex, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Read from a 3D texture using floating-point coordinates.
__device__ float4 sp::tex3Dfetch | ( | cudaTextureObject_t | tex, |
int | x, | ||
int | y, | ||
int | z | ||
) |
Read from a 3D texture using integer coordinates. (API extension)
__device__ float4 sp::tex3DOffsetfetch | ( | cudaTextureObject_t | tex, |
int | x, | ||
int | y, | ||
int | z, | ||
int | xO, | ||
int | yO, | ||
int | zO | ||
) |
Read from a 3D texture using integer coordinates. with offset addressing (API extension)