/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/op_normalize.hpp Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/op_normalize.hpp Source File#

2 min read time

Applies to Linux

rocCV: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/op_normalize.hpp Source File
op_normalize.hpp
Go to the documentation of this file.
1 
23 #pragma once
24 
25 #include <hip/hip_runtime.h>
26 
27 #include "core/tensor.hpp"
28 #include "i_operator.hpp"
29 #include "operator_types.h"
30 
31 namespace roccv {
32 
33 // Flag to interpret the scale tensor as the standard deviation for normalize.
34 #define ROCCV_NORMALIZE_SCALE_IS_STDDEV 1
35 
40 class Normalize final : public IOperator {
41  public:
46  Normalize() {}
47 
52 
112  void operator()(hipStream_t stream, const Tensor& input, const Tensor& base, const Tensor& scale,
113  const Tensor& output, float global_scale, float shift, float epsilon, uint32_t flags,
114  const eDeviceType device = eDeviceType::GPU) const;
115 };
116 } // namespace roccv
Interface class for all roccv operators.
Definition: i_operator.hpp:31
Class for managing the Normalize operator.
Definition: op_normalize.hpp:40
void operator()(hipStream_t stream, const Tensor &input, const Tensor &base, const Tensor &scale, const Tensor &output, float global_scale, float shift, float epsilon, uint32_t flags, const eDeviceType device=eDeviceType::GPU) const
Executes the Normalize operation on the given HIP stream.
~Normalize()
Destroy the Op Normalize object.
Definition: op_normalize.hpp:51
Normalize()
Constructs an OpNormalize object.
Definition: op_normalize.hpp:46
Definition: tensor.hpp:37
Definition: strided_data_wrap.hpp:33
eDeviceType
Describes the device type. Used to determine where Tensor data should be allocated and whether operat...
Definition: util_enums.h:69