InterpolationWrapper< T, B, I > Class Template Reference

InterpolationWrapper&lt; T, B, I &gt; Class Template Reference#

3 min read time

Applies to Linux

rocCV: roccv::InterpolationWrapper< T, B, I > Class Template Reference
roccv::InterpolationWrapper< T, B, I > Class Template Reference

A kernel-friendly wrapper which provides interpolation logic based on the given coordinates. This tensor wrapper is typically only used for input tensors and does not provide write access to its underlying data. More...

#include <interpolation_wrapper.hpp>

Public Member Functions

__device__ __host__ const T at (int64_t n, float h, float w, int64_t c) const
 Retrieves an interpolated value at given image batch coordinates. More...
 
__device__ __host__ int64_t batches () const
 
__device__ __host__ int64_t channels () const
 
__device__ __host__ int64_t height () const
 
 InterpolationWrapper (BorderWrapper< T, B > borderWrapper)
 Wraps a BorderWrapper in an Interpolation wrapper. Extends capabilities to interpolate pixel values when given non-integer coordinates. More...
 
 InterpolationWrapper (const Tensor &tensor, T border_value)
 Wraps a roccv::Tensor in an InterpolationWrapper to provide pixel interpolation when accessing non-integer coordinate mappings. More...
 
__device__ __host__ int64_t width () const
 

Detailed Description

template<typename T, eBorderType B, eInterpolationType I>
class roccv::InterpolationWrapper< T, B, I >

A kernel-friendly wrapper which provides interpolation logic based on the given coordinates. This tensor wrapper is typically only used for input tensors and does not provide write access to its underlying data.

Template Parameters
TUnderlying data type of the tensor data.
CNumber of channels in data type.
BBorder type to use for interpolation.
IInterpolation type to use.

Constructor & Destructor Documentation

◆ InterpolationWrapper() [1/2]

template<typename T , eBorderType B, eInterpolationType I>
roccv::InterpolationWrapper< T, B, I >::InterpolationWrapper ( const Tensor tensor,
border_value 
)
inline

Wraps a roccv::Tensor in an InterpolationWrapper to provide pixel interpolation when accessing non-integer coordinate mappings.

Parameters
tensorThe tensor to wrap.
border_valueA fallback border value to use in the case of a constant border mode.

◆ InterpolationWrapper() [2/2]

template<typename T , eBorderType B, eInterpolationType I>
roccv::InterpolationWrapper< T, B, I >::InterpolationWrapper ( BorderWrapper< T, B >  borderWrapper)
inline

Wraps a BorderWrapper in an Interpolation wrapper. Extends capabilities to interpolate pixel values when given non-integer coordinates.

Parameters
borderWrapperThe BorderWrapper to wrap.

Member Function Documentation

◆ at()

template<typename T , eBorderType B, eInterpolationType I>
__device__ __host__ const T roccv::InterpolationWrapper< T, B, I >::at ( int64_t  n,
float  h,
float  w,
int64_t  c 
) const
inline

Retrieves an interpolated value at given image batch coordinates.

Parameters
nBatch index.
hHeight coordinates.
wWidth coordinates.
Returns
An interpolated value.

◆ batches()

template<typename T , eBorderType B, eInterpolationType I>
__device__ __host__ int64_t roccv::InterpolationWrapper< T, B, I >::batches ( ) const
inline

◆ channels()

template<typename T , eBorderType B, eInterpolationType I>
__device__ __host__ int64_t roccv::InterpolationWrapper< T, B, I >::channels ( ) const
inline

◆ height()

template<typename T , eBorderType B, eInterpolationType I>
__device__ __host__ int64_t roccv::InterpolationWrapper< T, B, I >::height ( ) const
inline

◆ width()

template<typename T , eBorderType B, eInterpolationType I>
__device__ __host__ int64_t roccv::InterpolationWrapper< T, B, I >::width ( ) const
inline

The documentation for this class was generated from the following file:
  • /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/core/wrappers/interpolation_wrapper.hpp