ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::exec::feature::nhwc::View< T > Class Template Referencefinal

#include <View.h>

Collaboration diagram for onert::exec::feature::nhwc::View< T >:

Public Types

using Strides = typename Reader< T >::Strides
 
- Public Types inherited from onert::exec::feature::nhwc::Reader< T >
using Strides = ir::FeatureShape
 

Public Member Functions

 View (const ir::FeatureShape &shape, const Strides &strides, T *ptr, size_t len)
 
 View (backend::ITensor *tensor)
 
T & at (uint32_t batch, uint32_t row, uint32_t col, uint32_t ch)
 
T & at (uint32_t row, uint32_t col, uint32_t ch)
 
- Public Member Functions inherited from onert::exec::feature::nhwc::Reader< T >
 Reader (const ir::FeatureShape &shape, const Strides &strides, const T *ptr, size_t len)
 
 Reader (const backend::ITensor *tensor)
 
at (uint32_t batch, uint32_t row, uint32_t col, uint32_t ch) const final
 Get the value used by four indexes.
 
at (uint32_t row, uint32_t col, uint32_t ch) const final
 Get the value used by three indexes.
 
- Public Member Functions inherited from onert::exec::feature::Reader< T >
virtual ~Reader ()=default
 Destruct Reader object using default destructor.
 

Additional Inherited Members

- Protected Member Functions inherited from onert::exec::feature::nhwc::Reader< T >
const T & getRef (uint32_t batch, uint32_t row, uint32_t col, uint32_t ch) const
 

Detailed Description

template<typename T>
class onert::exec::feature::nhwc::View< T >

Definition at line 38 of file View.h.

Member Typedef Documentation

◆ Strides

template<typename T >
using onert::exec::feature::nhwc::View< T >::Strides = typename Reader<T>::Strides

Definition at line 41 of file View.h.

Constructor & Destructor Documentation

◆ View() [1/2]

template<typename T >
onert::exec::feature::nhwc::View< T >::View ( const ir::FeatureShape shape,
const Strides strides,
T *  ptr,
size_t  len 
)
inline

Definition at line 43 of file View.h.

44 : Reader<T>{shape, strides, ptr, len}
45 {
46 // DO NOTHING
47 }

◆ View() [2/2]

template<typename T >
onert::exec::feature::nhwc::View< T >::View ( backend::ITensor tensor)
inline

Definition at line 50 of file View.h.

50 : Reader<T>{tensor}
51 {
52 // DO NOTHING
53 }

Member Function Documentation

◆ at() [1/2]

template<typename T >
T & onert::exec::feature::nhwc::View< T >::at ( uint32_t  batch,
uint32_t  row,
uint32_t  col,
uint32_t  ch 
)
inline

Definition at line 57 of file View.h.

58 {
59 return const_cast<T &>(Reader<T>::getRef(batch, row, col, ch));
60 }
const T & getRef(uint32_t batch, uint32_t row, uint32_t col, uint32_t ch) const
Definition Reader.h:75

References onert::exec::feature::nhwc::Reader< T >::getRef().

◆ at() [2/2]

template<typename T >
T & onert::exec::feature::nhwc::View< T >::at ( uint32_t  row,
uint32_t  col,
uint32_t  ch 
)
inline

Definition at line 61 of file View.h.

62 {
63 return const_cast<T &>(Reader<T>::getRef(0, row, col, ch));
64 }

References onert::exec::feature::nhwc::Reader< T >::getRef().


The documentation for this class was generated from the following file: