Flip Class Reference

Flip Class Reference#

2 min read time

Applies to Linux

rocCV: roccv::Flip Class Reference
roccv::Flip Class Referencefinal

Class for managing the Flip operator. More...

#include <op_flip.hpp>

Inheritance diagram for roccv::Flip:
roccv::IOperator

Public Member Functions

 Flip ()
 Construct a new Op Flip object. More...
 
void operator() (hipStream_t stream, const Tensor &input, const Tensor &output, int32_t flipCode, const eDeviceType device=eDeviceType::GPU) const
 construct a new Op Flip object. the object can be used to flip an image batch about the horizontal, vertical or both axes More...
 
 ~Flip ()
 Destroy the Op Flip object. More...
 
- Public Member Functions inherited from roccv::IOperator
virtual ~IOperator ()
 

Detailed Description

Class for managing the Flip operator.

Constructor & Destructor Documentation

◆ Flip()

roccv::Flip::Flip ( )
inline

Construct a new Op Flip object.

◆ ~Flip()

roccv::Flip::~Flip ( )
inline

Destroy the Op Flip object.

Member Function Documentation

◆ operator()()

void roccv::Flip::operator() ( hipStream_t  stream,
const Tensor input,
const Tensor output,
int32_t  flipCode,
const eDeviceType  device = eDeviceType::GPU 
) const

construct a new Op Flip object. the object can be used to flip an image batch about the horizontal, vertical or both axes

Limitations:

Input: Supported TensorLayout(s): [TENSOR_LAYOUT_NHWC, TENSOR_LAYOUT_HWC] Channels: [1, 3, 4] Supported DataType(s): [U8, S32, F32]

Output: Supported TensorLayout(s): [TENSOR_LAYOUT_NHWC, TENSOR_LAYOUT_HWC] Channels: [1, 3, 4] Supported DataType(s) [U8, S32, F32]

Input/Output dependency:

  Property      |  Input == Output
 -------------- | -------------
  TensorLayout  | Yes
  DataType      | Yes
  Channels      | Yes
  Width         | Yes
  Height        | Yes
  Batch         | Yes
Parameters
[in]streamHIP stream to run this operator on.
[in]inputInput tensor with image batch data
[out]outputOutput tensor for storing modified image batch data
[in]flipCodeFlip code used to determine how the images in the batch will be flipped. 0 will flip along the x-axis, a positive number (e.g. 1) will flip around the y-axis, and a negative number (e.g. -1) will flip around both axis.
[in]deviceThe device to run this operation on. (Default: 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_flip.hpp