Jetson Inference
DNN Vision Library
cudaVector.h File Reference
#include "cudaMath.h"
#include <type_traits>

Go to the source code of this file.

Classes

struct  cudaVectorTypeInfo< T >
 
struct  cudaVectorTypeInfo< uchar >
 
struct  cudaVectorTypeInfo< uchar3 >
 
struct  cudaVectorTypeInfo< uchar4 >
 
struct  cudaVectorTypeInfo< float >
 
struct  cudaVectorTypeInfo< float3 >
 
struct  cudaVectorTypeInfo< float4 >
 
struct  cuda_assert_false< T >
 

Vector Templates

struct cudaVectorTypeInfo< uchar__attribute__
 
template<typename T >
__host__ __device__ T make_vec (typename cudaVectorTypeInfo< T >::Base x, typename cudaVectorTypeInfo< T >::Base y, typename cudaVectorTypeInfo< T >::Base z, typename cudaVectorTypeInfo< T >::Base w)
 
template<>
__host__ __device__ uchar make_vec (uint8_t x, uint8_t y, uint8_t z, uint8_t w)
 
template<>
__host__ __device__ uchar3 make_vec (uint8_t x, uint8_t y, uint8_t z, uint8_t w)
 
template<>
__host__ __device__ uchar4 make_vec (uint8_t x, uint8_t y, uint8_t z, uint8_t w)
 
template<>
__host__ __device__ float make_vec (float x, float y, float z, float w)
 
template<>
__host__ __device__ float3 make_vec (float x, float y, float z, float w)
 
template<>
__host__ __device__ float4 make_vec (float x, float y, float z, float w)
 
template<typename T >
__host__ __device__ T cast_vec (const uchar3 &a)
 
template<typename T >
__host__ __device__ T cast_vec (const uchar4 &a)
 
template<typename T >
__host__ __device__ T cast_vec (const float3 &a)
 
template<typename T >
__host__ __device__ T cast_vec (const float4 &a)
 
template<>
__host__ __device__ uchar3 cast_vec (const uchar3 &a)
 
template<>
__host__ __device__ uchar4 cast_vec (const uchar3 &a)
 
template<>
__host__ __device__ float3 cast_vec (const uchar3 &a)
 
template<>
__host__ __device__ float4 cast_vec (const uchar3 &a)
 
template<>
__host__ __device__ uchar3 cast_vec (const uchar4 &a)
 
template<>
__host__ __device__ uchar4 cast_vec (const uchar4 &a)
 
template<>
__host__ __device__ float3 cast_vec (const uchar4 &a)
 
template<>
__host__ __device__ float4 cast_vec (const uchar4 &a)
 
template<>
__host__ __device__ uchar3 cast_vec (const float3 &a)
 
template<>
__host__ __device__ uchar4 cast_vec (const float3 &a)
 
template<>
__host__ __device__ float3 cast_vec (const float3 &a)
 
template<>
__host__ __device__ float4 cast_vec (const float3 &a)
 
template<>
__host__ __device__ uchar3 cast_vec (const float4 &a)
 
template<>
__host__ __device__ uchar4 cast_vec (const float4 &a)
 
template<>
__host__ __device__ float3 cast_vec (const float4 &a)
 
template<>
__host__ __device__ float4 cast_vec (const float4 &a)
 
template<typename T >
__device__ cudaVectorTypeInfo< T >::Base alpha (T vec, typename cudaVectorTypeInfo< T >::Base default_alpha=255)
 
template<>
__host__ __device__ uint8_t alpha (uchar3 vec, uint8_t default_alpha)
 
template<>
__host__ __device__ uint8_t alpha (uchar4 vec, uint8_t default_alpha)
 
template<>
__host__ __device__ float alpha (float3 vec, float default_alpha)
 
template<>
__host__ __device__ float alpha (float4 vec, float default_alpha)
 

Function Documentation

◆ alpha() [1/5]

template<typename T >
__device__ cudaVectorTypeInfo<T>::Base alpha ( vec,
typename cudaVectorTypeInfo< T >::Base  default_alpha = 255 
)
inline

◆ alpha() [2/5]

template<>
__host__ __device__ uint8_t alpha ( uchar3  vec,
uint8_t  default_alpha 
)
inline

◆ alpha() [3/5]

template<>
__host__ __device__ uint8_t alpha ( uchar4  vec,
uint8_t  default_alpha 
)
inline

◆ alpha() [4/5]

template<>
__host__ __device__ float alpha ( float3  vec,
float  default_alpha 
)
inline

◆ alpha() [5/5]

template<>
__host__ __device__ float alpha ( float4  vec,
float  default_alpha 
)
inline

◆ cast_vec() [1/20]

template<typename T >
__host__ __device__ T cast_vec ( const uchar3 &  a)
inline

◆ cast_vec() [2/20]

template<typename T >
__host__ __device__ T cast_vec ( const uchar4 &  a)
inline

◆ cast_vec() [3/20]

template<typename T >
__host__ __device__ T cast_vec ( const float3 &  a)
inline

◆ cast_vec() [4/20]

template<typename T >
__host__ __device__ T cast_vec ( const float4 &  a)
inline

◆ cast_vec() [5/20]

template<>
__host__ __device__ uchar3 cast_vec ( const uchar3 &  a)
inline

◆ cast_vec() [6/20]

template<>
__host__ __device__ uchar4 cast_vec ( const uchar3 &  a)
inline

◆ cast_vec() [7/20]

template<>
__host__ __device__ float3 cast_vec ( const uchar3 &  a)
inline

◆ cast_vec() [8/20]

template<>
__host__ __device__ float4 cast_vec ( const uchar3 &  a)
inline

◆ cast_vec() [9/20]

template<>
__host__ __device__ uchar3 cast_vec ( const uchar4 &  a)
inline

◆ cast_vec() [10/20]

template<>
__host__ __device__ uchar4 cast_vec ( const uchar4 &  a)
inline

◆ cast_vec() [11/20]

template<>
__host__ __device__ float3 cast_vec ( const uchar4 &  a)
inline

◆ cast_vec() [12/20]

template<>
__host__ __device__ float4 cast_vec ( const uchar4 &  a)
inline

◆ cast_vec() [13/20]

template<>
__host__ __device__ uchar3 cast_vec ( const float3 &  a)
inline

◆ cast_vec() [14/20]

template<>
__host__ __device__ uchar4 cast_vec ( const float3 &  a)
inline

◆ cast_vec() [15/20]

template<>
__host__ __device__ float3 cast_vec ( const float3 &  a)
inline

◆ cast_vec() [16/20]

template<>
__host__ __device__ float4 cast_vec ( const float3 &  a)
inline

◆ cast_vec() [17/20]

template<>
__host__ __device__ uchar3 cast_vec ( const float4 &  a)
inline

◆ cast_vec() [18/20]

template<>
__host__ __device__ uchar4 cast_vec ( const float4 &  a)
inline

◆ cast_vec() [19/20]

template<>
__host__ __device__ float3 cast_vec ( const float4 &  a)
inline

◆ cast_vec() [20/20]

template<>
__host__ __device__ float4 cast_vec ( const float4 &  a)
inline

◆ make_vec() [1/7]

template<typename T >
__host__ __device__ T make_vec ( typename cudaVectorTypeInfo< T >::Base  x,
typename cudaVectorTypeInfo< T >::Base  y,
typename cudaVectorTypeInfo< T >::Base  z,
typename cudaVectorTypeInfo< T >::Base  w 
)
inline

◆ make_vec() [2/7]

template<>
__host__ __device__ uchar make_vec ( uint8_t  x,
uint8_t  y,
uint8_t  z,
uint8_t  w 
)
inline

◆ make_vec() [3/7]

template<>
__host__ __device__ uchar3 make_vec ( uint8_t  x,
uint8_t  y,
uint8_t  z,
uint8_t  w 
)
inline

◆ make_vec() [4/7]

template<>
__host__ __device__ uchar4 make_vec ( uint8_t  x,
uint8_t  y,
uint8_t  z,
uint8_t  w 
)
inline

◆ make_vec() [5/7]

template<>
__host__ __device__ float make_vec ( float  x,
float  y,
float  z,
float  w 
)
inline

◆ make_vec() [6/7]

template<>
__host__ __device__ float3 make_vec ( float  x,
float  y,
float  z,
float  w 
)
inline

◆ make_vec() [7/7]

template<>
__host__ __device__ float4 make_vec ( float  x,
float  y,
float  z,
float  w 
)
inline

Variable Documentation

◆ __attribute__

struct cudaVectorTypeInfo< uchar > __attribute__