CUDA utilities and image processing kernels.
More...
|
| cudaFont |
| TTF font rasterization and image overlay rendering using CUDA.
|
|
| Color Conversion |
| Colorspace conversion functions for various YUV formats, RGB, BGR, ect.
|
|
| Warping |
| Various image warps and matrix transforms.
|
|
|
bool | cudaAllocMapped (void **cpuPtr, void **gpuPtr, size_t size) |
| Allocate ZeroCopy mapped memory, shared between CUDA and CPU. More...
|
|
cudaError_t | cudaNormalizeRGBA (float4 *input, const float2 &input_range, float4 *output, const float2 &output_range, size_t width, size_t height) |
| Rebase the pixel intensities of an image between two scales. More...
|
|
cudaError_t | cudaRectFill (float4 *input, float4 *output, uint32_t width, uint32_t height, float4 *rects, int numRects, const float4 &color) |
| cudaRectFill More...
|
|
cudaError_t | cudaResize (float *input, size_t inputWidth, size_t inputHeight, float *output, size_t outputWidth, size_t outputHeight) |
| Function for increasing or decreasing the size of an image on the GPU. More...
|
|
cudaError_t | cudaResizeRGBA (float4 *input, size_t inputWidth, size_t inputHeight, float4 *output, size_t outputWidth, size_t outputHeight) |
| Function for increasing or decreasing the size of an image on the GPU. More...
|
|
cudaError_t | cudaCheckError (cudaError_t retval, const char *txt, const char *file, int line) |
| cudaCheckError More...
|
|
__device__ __host__ int | iDivUp (int a, int b) |
| If a / b has a remainder, round up. More...
|
|
CUDA utilities and image processing kernels.
◆ CUDA
Execute a CUDA call and print out any errors.
- Returns
- the original cudaError_t result
◆ CUDA_FAILED
#define CUDA_FAILED |
( |
|
x | ) |
(CUDA(x) != cudaSuccess) |
Evaluates to true on failure.
◆ CUDA_SUCCESS
#define CUDA_SUCCESS |
( |
|
x | ) |
(CUDA(x) == cudaSuccess) |
Evaluates to true on success.
◆ CUDA_VERIFY
#define CUDA_VERIFY |
( |
|
x | ) |
if(CUDA_FAILED(x)) return false; |
Return from the boolean function if CUDA call fails.
◆ LOG_CUDA
#define LOG_CUDA "[cuda] " |
◆ cudaAllocMapped()
bool cudaAllocMapped |
( |
void ** |
cpuPtr, |
|
|
void ** |
gpuPtr, |
|
|
size_t |
size |
|
) |
| |
|
inline |
Allocate ZeroCopy mapped memory, shared between CUDA and CPU.
◆ cudaCheckError()
cudaError_t cudaCheckError |
( |
cudaError_t |
retval, |
|
|
const char * |
txt, |
|
|
const char * |
file, |
|
|
int |
line |
|
) |
| |
|
inline |
◆ cudaNormalizeRGBA()
cudaError_t cudaNormalizeRGBA |
( |
float4 * |
input, |
|
|
const float2 & |
input_range, |
|
|
float4 * |
output, |
|
|
const float2 & |
output_range, |
|
|
size_t |
width, |
|
|
size_t |
height |
|
) |
| |
Rebase the pixel intensities of an image between two scales.
For example, convert an image with values 0.0-255 to 0.0-1.0.
◆ cudaRectFill()
cudaError_t cudaRectFill |
( |
float4 * |
input, |
|
|
float4 * |
output, |
|
|
uint32_t |
width, |
|
|
uint32_t |
height, |
|
|
float4 * |
rects, |
|
|
int |
numRects, |
|
|
const float4 & |
color |
|
) |
| |
◆ cudaResize()
cudaError_t cudaResize |
( |
float * |
input, |
|
|
size_t |
inputWidth, |
|
|
size_t |
inputHeight, |
|
|
float * |
output, |
|
|
size_t |
outputWidth, |
|
|
size_t |
outputHeight |
|
) |
| |
Function for increasing or decreasing the size of an image on the GPU.
◆ cudaResizeRGBA()
cudaError_t cudaResizeRGBA |
( |
float4 * |
input, |
|
|
size_t |
inputWidth, |
|
|
size_t |
inputHeight, |
|
|
float4 * |
output, |
|
|
size_t |
outputWidth, |
|
|
size_t |
outputHeight |
|
) |
| |
Function for increasing or decreasing the size of an image on the GPU.
◆ iDivUp()
__device__ __host__ int iDivUp |
( |
int |
a, |
|
|
int |
b |
|
) |
| |
|
inline |
If a / b has a remainder, round up.