CopyMakeBorder Class Reference

CopyMakeBorder Class Reference#

3 min read time

Applies to Linux

rocCV: roccv::CopyMakeBorder Class Reference
roccv::CopyMakeBorder Class Referencefinal

Class for managing the CopyMakeBorder operator. More...

#include <op_copy_make_border.hpp>

Inheritance diagram for roccv::CopyMakeBorder:
roccv::IOperator

Public Member Functions

 CopyMakeBorder ()
 
void operator() (hipStream_t stream, const Tensor &input, const Tensor &output, int32_t top, int32_t left, eBorderType border_mode, float4 border_value, const eDeviceType device=eDeviceType::GPU) const
 Executes the CopyMakeBorder operation on the given HIP stream and device. This operation will create a border around the images based on the given border mode. The output tensor's height must be of size (input.height. More...
 
 ~CopyMakeBorder ()
 
- Public Member Functions inherited from roccv::IOperator
virtual ~IOperator ()
 

Detailed Description

Class for managing the CopyMakeBorder operator.

Constructor & Destructor Documentation

◆ CopyMakeBorder()

roccv::CopyMakeBorder::CopyMakeBorder ( )
inlineexplicit

◆ ~CopyMakeBorder()

roccv::CopyMakeBorder::~CopyMakeBorder ( )
inline

Member Function Documentation

◆ operator()()

void roccv::CopyMakeBorder::operator() ( hipStream_t  stream,
const Tensor input,
const Tensor output,
int32_t  top,
int32_t  left,
eBorderType  border_mode,
float4  border_value,
const eDeviceType  device = eDeviceType::GPU 
) const

Executes the CopyMakeBorder operation on the given HIP stream and device. This operation will create a border around the images based on the given border mode. The output tensor's height must be of size (input.height.

  • top * 2), the width must be of size (input.width + left * 2) to create a uniform border around the input images.

Limitations:

Input: Supported TensorLayout(s): [NHWC, HWC] Channels: [1, 3, 4] Supported DataType(s): [U8, S8, U16, S16, U32, S32, F32, F64]

Output: Supported TensorLayout(s): [NHWC, HWC] Channels: [1, 3, 4] Supported DataType(s): [U8, S8, U16, S16, U32, S32, F32, F64]

Input/Output dependency:

  Property      |  Input == Output
 -------------- | -------------
  TensorLayout  | Yes
  DataType      | Yes
  Channels      | Yes
  Width         | No
  Height        | No
  Batch         | Yes
Parameters
streamThe HIP stream to execute this operation on.
inputTensor representing the input images.
outputTensor representing the output images.
topThe top-most pixel of the output images where the border should end.
leftThe left-most pixel of the output images where the border should end.
border_modeThe border mode used for creating the image border.
border_valueThe color of the border is a constant border type is used.
deviceThe device to execute this operation on. Defaults to GPU.

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/op_copy_make_border.hpp