ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
onert::exec::feature::nchw::View< T > Class Template Referencefinal

#include <View.h>

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

Public Types

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

Public Member Functions

 View (const ir::FeatureShape &shape, const Strides &strides, T *ptr, size_t len)
 
 View (::onert::backend::ITensor *tensor)
 
T & at (uint32_t batch, uint32_t ch, uint32_t row, uint32_t col)
 
T & at (uint32_t ch, uint32_t row, uint32_t col)
 
- Public Member Functions inherited from onert::exec::feature::nchw::Reader< T >
 Reader (const ir::FeatureShape &shape, const Strides &strides, const T *ptr, size_t len)
 
 Reader (backend::ITensor *tensor)
 
at (uint32_t batch, uint32_t ch, uint32_t row, uint32_t col) const final
 Get the value used by four indexes.
 
at (uint32_t ch, uint32_t row, uint32_t col) 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::nchw::Reader< T >
const T & getRef (uint32_t batch, uint32_t ch, uint32_t row, uint32_t col) const
 

Detailed Description

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

Definition at line 31 of file View.h.

Member Typedef Documentation

◆ Strides

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

Definition at line 34 of file View.h.

Constructor & Destructor Documentation

◆ View() [1/2]

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

Definition at line 36 of file View.h.

37 : Reader<T>{shape, strides, ptr, len}
38 {
39 // DO NOTHING
40 }

◆ View() [2/2]

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

Definition at line 43 of file View.h.

43 : Reader<T>{tensor}
44 {
45 // DO NOTHING
46 }

Member Function Documentation

◆ at() [1/2]

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

Definition at line 50 of file View.h.

51 {
52 return const_cast<T &>(Reader<T>::getRef(batch, ch, row, col));
53 }
const T & getRef(uint32_t batch, uint32_t ch, uint32_t row, uint32_t col) const
Definition Reader.h:69

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

◆ at() [2/2]

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

Definition at line 54 of file View.h.

55 {
56 return const_cast<T &>(Reader<T>::getRef(0, ch, row, col));
57 }

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


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