Host Namespace Reference

Host Namespace Reference#

6 min read time

Applies to Linux

rocCV: Kernels::Host Namespace Reference
Kernels::Host Namespace Reference

Functions

template<typename T , typename SrcWrapper , typename DstWrapper >
void bilateral_filter (SrcWrapper input, DstWrapper output, int radius, float sigmaColor, float sigmaSpace, int height, int width, int prevHeight, int prevWidth, float spaceCoeff, float colorCoeff)
 
template<typename SrcWrapper , typename DstWrapper >
void binary_generic (SrcWrapper input, DstWrapper output, roccv::GenericTensorWrapper< double > thresh, roccv::GenericTensorWrapper< double > maxVal, const int32_t maxBatchSize)
 
template<typename SrcWrapper , typename DstWrapper >
void binary_inv_generic (SrcWrapper input, DstWrapper output, roccv::GenericTensorWrapper< double > thresh, roccv::GenericTensorWrapper< double > maxVal, const int32_t maxBatchSize)
 
template<bool has_alpha, typename T , typename SrcWrapper , typename DstWrapper , typename BT = detail::BaseType<T>>
void bndbox_kernel (SrcWrapper input, DstWrapper output, Rect_t *rects, size_t n_rects, int64_t batch, int64_t height, int64_t width)
 
template<typename SrcWrapper , typename MaskWrapper , typename DstWrapper >
void composite (SrcWrapper foreground, SrcWrapper background, MaskWrapper mask, DstWrapper output)
 
template<typename SrcDesc , typename DstDesc >
void copy_make_border (SrcDesc src, DstDesc dst, int32_t top, int32_t left)
 
template<typename SrcWrapper , typename DstWrapper >
void custom_crop (SrcWrapper input, DstWrapper output, Box_t cropRect)
 
template<eAxis FlipType, typename SrcWrapper , typename DstWrapper >
void flip (SrcWrapper input, DstWrapper output)
 
template<typename SrcWrapper , typename DstWrapper >
void gamma_contrast (SrcWrapper input, DstWrapper output, float gamma)
 
template<typename T , typename SrcWrapper , typename MaskWrapper >
void histogram_kernel (SrcWrapper input, MaskWrapper mask, roccv::GenericTensorWrapper< T > histogram)
 
template<typename T , typename SrcWrapper >
void histogram_kernel (SrcWrapper input, roccv::GenericTensorWrapper< T > histogram)
 
void non_maximum_suppression (roccv::GenericTensorWrapper< short4 > input, roccv::GenericTensorWrapper< uint8_t > output, roccv::GenericTensorWrapper< float > scores, int numBoxes, float scoresThreshold, float iouThreshold)
 
template<bool ScaleStddev, typename SrcWrapper , typename DstWrapper , typename ScaleWrapper , typename BaseWrapper >
void normalize (SrcWrapper input, BaseWrapper base, ScaleWrapper scale, DstWrapper output, float globalScale, float shift, float epsilon)
 
template<typename SrcWrapper , typename DstWrapper , typename MapWrapper >
void remap (SrcWrapper input, DstWrapper output, MapWrapper map)
 
template<typename T , roccv::eSwizzle S, typename SrcWrapper , typename DstWrapper >
void reorder (SrcWrapper input, DstWrapper output)
 
template<typename SrcWrapper , typename DstWrapper >
void resize (SrcWrapper input, DstWrapper output, float scaleX, float scaleY)
 
template<typename T , roccv::eSwizzle S, typename SrcWrapper , typename DstWrapper >
void rgb_or_bgr_to_grayscale (SrcWrapper input, DstWrapper output)
 
template<typename T , roccv::eSwizzle S, typename SrcWrapper , typename DstWrapper >
void rgb_or_bgr_to_yuv (SrcWrapper input, DstWrapper output, float delta)
 
template<typename SrcWrapper , typename DstWrapper , typename MatWrapper >
void rotate (SrcWrapper src, DstWrapper dst, MatWrapper affineMat)
 
template<typename SrcWrapper , typename DstWrapper >
void tozero_generic (SrcWrapper input, DstWrapper output, roccv::GenericTensorWrapper< double > thresh, const int32_t maxBatchSize)
 
template<typename SrcWrapper , typename DstWrapper >
void tozeroinv_generic (SrcWrapper input, DstWrapper output, roccv::GenericTensorWrapper< double > thresh, const int32_t maxBatchSize)
 
template<typename SrcWrapper , typename DstWrapper >
void trunc_generic (SrcWrapper input, DstWrapper output, roccv::GenericTensorWrapper< double > thresh, const int32_t maxBatchSize)
 
template<typename SrcWrapper , typename DstWrapper , typename Mat >
void warp_perspective (SrcWrapper input, DstWrapper output, Mat mat)
 
template<typename T , roccv::eSwizzle S, typename SrcWrapper , typename DstWrapper >
void yuv_to_rgb_or_bgr (SrcWrapper input, DstWrapper output, float delta)
 

Detailed Description

Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Function Documentation

◆ bilateral_filter()

template<typename T , typename SrcWrapper , typename DstWrapper >
void Kernels::Host::bilateral_filter ( SrcWrapper  input,
DstWrapper  output,
int  radius,
float  sigmaColor,
float  sigmaSpace,
int  height,
int  width,
int  prevHeight,
int  prevWidth,
float  spaceCoeff,
float  colorCoeff 
)

◆ binary_generic()

template<typename SrcWrapper , typename DstWrapper >
void Kernels::Host::binary_generic ( SrcWrapper  input,
DstWrapper  output,
roccv::GenericTensorWrapper< double >  thresh,
roccv::GenericTensorWrapper< double >  maxVal,
const int32_t  maxBatchSize 
)

◆ binary_inv_generic()

template<typename SrcWrapper , typename DstWrapper >
void Kernels::Host::binary_inv_generic ( SrcWrapper  input,
DstWrapper  output,
roccv::GenericTensorWrapper< double >  thresh,
roccv::GenericTensorWrapper< double >  maxVal,
const int32_t  maxBatchSize 
)

◆ bndbox_kernel()

template<bool has_alpha, typename T , typename SrcWrapper , typename DstWrapper , typename BT = detail::BaseType<T>>
void Kernels::Host::bndbox_kernel ( SrcWrapper  input,
DstWrapper  output,
Rect_t rects,
size_t  n_rects,
int64_t  batch,
int64_t  height,
int64_t  width 
)

◆ composite()

template<typename SrcWrapper , typename MaskWrapper , typename DstWrapper >
void Kernels::Host::composite ( SrcWrapper  foreground,
SrcWrapper  background,
MaskWrapper  mask,
DstWrapper  output 
)
inline

◆ copy_make_border()

template<typename SrcDesc , typename DstDesc >
void Kernels::Host::copy_make_border ( SrcDesc  src,
DstDesc  dst,
int32_t  top,
int32_t  left 
)

◆ custom_crop()

template<typename SrcWrapper , typename DstWrapper >
void Kernels::Host::custom_crop ( SrcWrapper  input,
DstWrapper  output,
Box_t  cropRect 
)

◆ flip()

template<eAxis FlipType, typename SrcWrapper , typename DstWrapper >
void Kernels::Host::flip ( SrcWrapper  input,
DstWrapper  output 
)

◆ gamma_contrast()

template<typename SrcWrapper , typename DstWrapper >
void Kernels::Host::gamma_contrast ( SrcWrapper  input,
DstWrapper  output,
float  gamma 
)

◆ histogram_kernel() [1/2]

template<typename T , typename SrcWrapper , typename MaskWrapper >
void Kernels::Host::histogram_kernel ( SrcWrapper  input,
MaskWrapper  mask,
roccv::GenericTensorWrapper< T >  histogram 
)

◆ histogram_kernel() [2/2]

template<typename T , typename SrcWrapper >
void Kernels::Host::histogram_kernel ( SrcWrapper  input,
roccv::GenericTensorWrapper< T >  histogram 
)

◆ non_maximum_suppression()

void Kernels::Host::non_maximum_suppression ( roccv::GenericTensorWrapper< short4 >  input,
roccv::GenericTensorWrapper< uint8_t >  output,
roccv::GenericTensorWrapper< float >  scores,
int  numBoxes,
float  scoresThreshold,
float  iouThreshold 
)
inline

◆ normalize()

template<bool ScaleStddev, typename SrcWrapper , typename DstWrapper , typename ScaleWrapper , typename BaseWrapper >
void Kernels::Host::normalize ( SrcWrapper  input,
BaseWrapper  base,
ScaleWrapper  scale,
DstWrapper  output,
float  globalScale,
float  shift,
float  epsilon 
)

◆ remap()

template<typename SrcWrapper , typename DstWrapper , typename MapWrapper >
void Kernels::Host::remap ( SrcWrapper  input,
DstWrapper  output,
MapWrapper  map 
)

◆ reorder()

template<typename T , roccv::eSwizzle S, typename SrcWrapper , typename DstWrapper >
void Kernels::Host::reorder ( SrcWrapper  input,
DstWrapper  output 
)

◆ resize()

template<typename SrcWrapper , typename DstWrapper >
void Kernels::Host::resize ( SrcWrapper  input,
DstWrapper  output,
float  scaleX,
float  scaleY 
)

◆ rgb_or_bgr_to_grayscale()

template<typename T , roccv::eSwizzle S, typename SrcWrapper , typename DstWrapper >
void Kernels::Host::rgb_or_bgr_to_grayscale ( SrcWrapper  input,
DstWrapper  output 
)

◆ rgb_or_bgr_to_yuv()

template<typename T , roccv::eSwizzle S, typename SrcWrapper , typename DstWrapper >
void Kernels::Host::rgb_or_bgr_to_yuv ( SrcWrapper  input,
DstWrapper  output,
float  delta 
)

◆ rotate()

template<typename SrcWrapper , typename DstWrapper , typename MatWrapper >
void Kernels::Host::rotate ( SrcWrapper  src,
DstWrapper  dst,
MatWrapper  affineMat 
)

◆ tozero_generic()

template<typename SrcWrapper , typename DstWrapper >
void Kernels::Host::tozero_generic ( SrcWrapper  input,
DstWrapper  output,
roccv::GenericTensorWrapper< double >  thresh,
const int32_t  maxBatchSize 
)

◆ tozeroinv_generic()

template<typename SrcWrapper , typename DstWrapper >
void Kernels::Host::tozeroinv_generic ( SrcWrapper  input,
DstWrapper  output,
roccv::GenericTensorWrapper< double >  thresh,
const int32_t  maxBatchSize 
)

◆ trunc_generic()

template<typename SrcWrapper , typename DstWrapper >
void Kernels::Host::trunc_generic ( SrcWrapper  input,
DstWrapper  output,
roccv::GenericTensorWrapper< double >  thresh,
const int32_t  maxBatchSize 
)

◆ warp_perspective()

template<typename SrcWrapper , typename DstWrapper , typename Mat >
void Kernels::Host::warp_perspective ( SrcWrapper  input,
DstWrapper  output,
Mat  mat 
)

◆ yuv_to_rgb_or_bgr()

template<typename T , roccv::eSwizzle S, typename SrcWrapper , typename DstWrapper >
void Kernels::Host::yuv_to_rgb_or_bgr ( SrcWrapper  input,
DstWrapper  output,
float  delta 
)