Border functions
- group Border functions
Functions
-
template<bool Active = true, typename T>
constexpr bool __host__ __device__ IsOutside(T c, T s) Function to check if given coordinate is outside range defined by given size.
- Template Parameters:
Active – Flag to turn this function active.
T – Type of the values given to this function.
- Parameters:
c – [in] Coordinate to check if it is outside the range [0, s).
s – [in] Size that defines the inside range [0, s).
- Returns:
True if given coordinate is outside given size.
-
template<NVCVBorderType B, bool Active = true, typename T>
constexpr T __host__ __device__ GetIndexWithBorder(T c, T s) Function to get a border-aware index considering the range defined by given size.
Note
This function does not work for NVCV_BORDER_CONSTANT.
- Template Parameters:
B – It is a NVCVBorderType indicating the border to be used.
Active – Flag to turn this function active.
T – Type of the values given to this function.
- Parameters:
c – [in] Coordinate (input index) to put back inside valid range [0, s).
s – [in] Size that defines the valid range [0, s).
-
namespace detail
Typedefs
-
template<typename T, NVCVBorderType B>
using BorderVarShapeWrapImpl = BorderIWImpl<ImageBatchVarShapeWrap<T>, B>
-
template<typename T, NVCVBorderType B>
using BorderVarShapeWrapNHWCImpl = BorderIWImpl<ImageBatchVarShapeWrapNHWC<T>, B>
-
template<class FROM, class TO>
using CopyConstness_t = typename CopyConstness<FROM, TO>::type
-
template<class BT, class T>
using ConvertBaseTypeTo_t = typename ConvertBaseTypeTo<BT, T>::type
Functions
-
template<typename T, typename U>
__host__ __device__ inline T RangeCastFloatingToUnsignedIntegral(U u)
-
template<typename T, typename U>
__host__ __device__ inline T RangeCastUnsignedIntegralToFloating(U u)
-
template<typename T, typename U, typename Min, typename Max>
__host__ __device__ inline T BoundedCast(U u, Min minValue, Max maxValue)
-
template<>
__host__ __device__ __forceinline__ unsigned char SaturateCastImpl<unsigned char, signed char>(signed char u)
-
template<>
__host__ __device__ __forceinline__ unsigned char SaturateCastImpl<unsigned char, short>(short u)
-
template<>
__host__ __device__ __forceinline__ unsigned char SaturateCastImpl<unsigned char, unsigned short>(unsigned short u)
-
template<>
__host__ __device__ __forceinline__ unsigned char SaturateCastImpl<unsigned char, int>(int u)
-
template<>
__host__ __device__ __forceinline__ unsigned char SaturateCastImpl<unsigned char, unsigned int>(unsigned int u)
-
template<>
__host__ __device__ __forceinline__ unsigned char SaturateCastImpl<unsigned char, float>(float u)
-
template<>
__host__ __device__ __forceinline__ unsigned char SaturateCastImpl<unsigned char, double>(double u)
-
template<>
__host__ __device__ __forceinline__ signed char SaturateCastImpl<signed char, unsigned char>(unsigned char u)
-
template<>
__host__ __device__ __forceinline__ signed char SaturateCastImpl<signed char, short>(short u)
-
template<>
__host__ __device__ __forceinline__ signed char SaturateCastImpl<signed char, unsigned short>(unsigned short u)
-
template<>
__host__ __device__ __forceinline__ signed char SaturateCastImpl<signed char, int>(int u)
-
template<>
__host__ __device__ __forceinline__ signed char SaturateCastImpl<signed char, unsigned int>(unsigned int u)
-
template<>
__host__ __device__ __forceinline__ signed char SaturateCastImpl<signed char, float>(float u)
-
template<>
__host__ __device__ __forceinline__ signed char SaturateCastImpl<signed char, double>(double u)
-
template<>
__host__ __device__ __forceinline__ unsigned short SaturateCastImpl<unsigned short, signed char>(signed char u)
-
template<>
__host__ __device__ __forceinline__ unsigned short SaturateCastImpl<unsigned short, short>(short u)
-
template<>
__host__ __device__ __forceinline__ unsigned short SaturateCastImpl<unsigned short, int>(int u)
-
template<>
__host__ __device__ __forceinline__ unsigned short SaturateCastImpl<unsigned short, unsigned int>(unsigned int u)
-
template<>
__host__ __device__ __forceinline__ unsigned short SaturateCastImpl<unsigned short, float>(float u)
-
template<>
__host__ __device__ __forceinline__ unsigned short SaturateCastImpl<unsigned short, double>(double u)
-
template<>
__host__ __device__ __forceinline__ short SaturateCastImpl<short, unsigned short>(unsigned short u)
-
template<>
__host__ __device__ __forceinline__ short SaturateCastImpl<short, int>(int u)
-
template<>
__host__ __device__ __forceinline__ short SaturateCastImpl<short, unsigned int>(unsigned int u)
-
template<>
__host__ __device__ __forceinline__ short SaturateCastImpl<short, float>(float u)
-
template<>
__host__ __device__ __forceinline__ short SaturateCastImpl<short, double>(double u)
-
template<>
__host__ __device__ __forceinline__ int SaturateCastImpl<int, unsigned int>(unsigned int u)
-
template<>
__host__ __device__ __forceinline__ int SaturateCastImpl<int, float>(float u)
-
template<>
__host__ __device__ __forceinline__ int SaturateCastImpl<int, double>(double u)
-
template<>
__host__ __device__ __forceinline__ unsigned int SaturateCastImpl<unsigned int, signed char>(signed char u)
-
template<>
__host__ __device__ __forceinline__ unsigned int SaturateCastImpl<unsigned int, short>(short u)
-
template<>
__host__ __device__ __forceinline__ unsigned int SaturateCastImpl<unsigned int, int>(int u)
-
template<>
__host__ __device__ __forceinline__ unsigned int SaturateCastImpl<unsigned int, float>(float u)
-
template<>
__host__ __device__ __forceinline__ unsigned int SaturateCastImpl<unsigned int, double>(double u)
Variables
-
template<class T, class U, class = Require<HasTypeTraits<T, U>>>
constexpr bool IsSameCompound = IsCompound<T> && TypeTraits<T>::components == TypeTraits<U>::components
-
template<typename T, typename U, class = Require<HasTypeTraits<T, U>>>
constexpr bool OneIsCompound = (TypeTraits<T>::components == 0 && TypeTraits<U>::components >= 1) || (TypeTraits<T>::components >= 1 && TypeTraits<U>::components == 0) || IsSameCompound<T, U>
-
template<typename T, class = Require<HasTypeTraits<T>>>
constexpr bool IsIntegral = std::is_integral_v<typename TypeTraits<T>::base_type>
-
template<typename T, typename U, class = Require<HasTypeTraits<T, U>>>
constexpr bool OneIsCompoundAndBothAreIntegral = OneIsCompound<T, U> && IsIntegral<T> && IsIntegral<U>
-
template<typename T, class = Require<HasTypeTraits<T>>>
constexpr bool IsIntegralCompound = IsIntegral<T> && IsCompound<T>
-
template<class IW, NVCVBorderType B>
class BorderIWImpl - #include <BorderVarShapeWrap.hpp>
Subclassed by nvcv::cuda::BorderVarShapeWrap< T, B >, nvcv::cuda::BorderVarShapeWrap< T, NVCV_BORDER_CONSTANT >, nvcv::cuda::BorderVarShapeWrapNHWC< T, B >, nvcv::cuda::BorderVarShapeWrapNHWC< T, NVCV_BORDER_CONSTANT >
-
template<class TW, NVCVBorderType B, bool... ActiveDimensions>
class BorderWrapImpl - #include <BorderWrap.hpp>
-
template<class BT, class T>
struct ConvertBaseTypeTo - #include <Metaprogramming.hpp>
-
template<class BT, class T>
struct ConvertBaseTypeTo<BT, volatile const T> - #include <Metaprogramming.hpp>
-
template<class FROM, class TO>
struct CopyConstness - #include <Metaprogramming.hpp>
-
template<typename T, typename = void>
struct HasTypeTraits_t : public false_type - #include <Metaprogramming.hpp>
-
template<typename T>
struct HasTypeTraits_t<T, std::void_t<typename TypeTraits<T>::base_type>> : public true_type - #include <Metaprogramming.hpp>
-
template<typename T, NVCVBorderType B, NVCVInterpolationType I>
class InterpolationVarShapeWrapImpl - #include <InterpolationVarShapeWrap.hpp>
Subclassed by nvcv::cuda::InterpolationVarShapeWrap< T, B, I >
-
template<class BW, NVCVInterpolationType I>
class InterpolationWrapImpl - #include <InterpolationWrap.hpp>
Subclassed by nvcv::cuda::InterpolationWrap< BW, I >
-
template<class T, int C>
struct MakeType - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<char, 0> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<char, 1> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<char, 2> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<char, 3> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<char, 4> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<double, 0> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<double, 1> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<double, 2> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<double, 3> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<double, 4> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<float, 0> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<float, 1> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<float, 2> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<float, 3> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<float, 4> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<int, 0> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<int, 1> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<int, 2> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<int, 3> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<int, 4> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<long long, 0> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<long long, 1> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<long long, 2> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<long long, 3> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<long long, 4> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<long, 0> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<long, 1> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<long, 2> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<long, 3> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<long, 4> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<short, 0> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<short, 1> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<short, 2> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<short, 3> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<short, 4> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<signed char, 0> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<signed char, 1> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<signed char, 2> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<signed char, 3> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<signed char, 4> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned char, 0> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned char, 1> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned char, 2> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned char, 3> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned char, 4> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned int, 0> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned int, 1> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned int, 2> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned int, 3> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned int, 4> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned long long, 0> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned long long, 1> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned long long, 2> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned long long, 3> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned long long, 4> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned long, 0> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned long, 1> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned long, 2> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned long, 3> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned long, 4> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned short, 0> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned short, 1> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned short, 2> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned short, 3> - #include <Metaprogramming.hpp>
-
template<>
struct MakeType<unsigned short, 4> - #include <Metaprogramming.hpp>
-
template<class T>
struct TypeTraits - #include <Metaprogramming.hpp>
Subclassed by nvcv::cuda::detail::TypeTraits< const T >, nvcv::cuda::detail::TypeTraits< const volatile T >, nvcv::cuda::detail::TypeTraits< volatile T >
-
template<>
struct TypeTraits<char> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<char1> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<char2> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<char3> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<char4> - #include <Metaprogramming.hpp>
-
template<class T>
struct TypeTraits<const T> : public nvcv::cuda::detail::TypeTraits<T> - #include <Metaprogramming.hpp>
-
template<class T>
struct TypeTraits<volatile const T> : public nvcv::cuda::detail::TypeTraits<T> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<dim3> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<double> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<double1> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<double2> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<double3> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<double4_16a> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<float> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<float1> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<float2> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<float3> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<float4> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<int> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<int1> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<int2> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<int3> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<int4> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<long> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<long long> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<long1> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<long2> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<long3> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<long4_16a> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<longlong1> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<longlong2> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<longlong3> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<longlong4_16a> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<short> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<short1> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<short2> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<short3> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<short4> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<signed char> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<uchar1> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<uchar2> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<uchar3> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<uchar4> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<uint1> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<uint2> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<uint3> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<uint4> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<ulong1> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<ulong2> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<ulong3> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<ulong4_16a> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<ulonglong1> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<ulonglong2> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<ulonglong3> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<ulonglong4_16a> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<unsigned char> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<unsigned int> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<unsigned long> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<unsigned long long> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<unsigned short> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<ushort1> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<ushort2> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<ushort3> - #include <Metaprogramming.hpp>
-
template<>
struct TypeTraits<ushort4> - #include <Metaprogramming.hpp>
-
template<typename T, NVCVBorderType B>
-
template<bool Active = true, typename T>