ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnfw::misc::feature::Index Class Reference

Class to have the index information for calculating the offset. More...

#include <Index.h>

Public Member Functions

 Index ()=default
 Construct Index object using default constrcutor.
 
 Index (int32_t ch, int32_t row, int32_t col)
 Construct Index object with three indexes of dimensions.
 
 Index (int32_t batch, int32_t ch, int32_t row, int32_t col)
 Construct Index object with four indexes of dimensions.
 
int32_t batch (void) const
 Get the batch index.
 
int32_t ch (void) const
 Get the depth index.
 
int32_t row (void) const
 Get the height index.
 
int32_t col (void) const
 Get the width index.
 
int32_t & batch (void)
 Get the batch index as the lvalue reference.
 
int32_t & ch (void)
 Get the depth index as the lvalue reference.
 
int32_t & row (void)
 Get the height index as the lvalue reference.
 
int32_t & col (void)
 Get the width index as the lvalue reference.
 

Detailed Description

Class to have the index information for calculating the offset.

Definition at line 38 of file Index.h.

Constructor & Destructor Documentation

◆ Index() [1/3]

nnfw::misc::feature::Index::Index ( )
default

Construct Index object using default constrcutor.

◆ Index() [2/3]

nnfw::misc::feature::Index::Index ( int32_t  ch,
int32_t  row,
int32_t  col 
)
inline

Construct Index object with three indexes of dimensions.

Parameters
[in]chThe depth index
[in]rowThe heigth index
[in]colThe width index

Definition at line 53 of file Index.h.

53 : _batch{1}, _ch{ch}, _row{row}, _col{col}
54 {
55 // DO NOTHING
56 }
int32_t row(void) const
Get the height index.
Definition Index.h:85
int32_t col(void) const
Get the width index.
Definition Index.h:90
int32_t ch(void) const
Get the depth index.
Definition Index.h:80

◆ Index() [3/3]

nnfw::misc::feature::Index::Index ( int32_t  batch,
int32_t  ch,
int32_t  row,
int32_t  col 
)
inline

Construct Index object with four indexes of dimensions.

Parameters
[in]batchThe batch index
[in]chThe depth index
[in]rowThe height index
[in]colThe width index

Definition at line 64 of file Index.h.

65 : _batch{batch}, _ch{ch}, _row{row}, _col{col}
66 {
67 // DO NOTHING
68 }
int32_t batch(void) const
Get the batch index.
Definition Index.h:75

Member Function Documentation

◆ batch() [1/2]

int32_t & nnfw::misc::feature::Index::batch ( void  )
inline

Get the batch index as the lvalue reference.

Returns
The reference of the batch value

Definition at line 97 of file Index.h.

97{ return _batch; }

◆ batch() [2/2]

int32_t nnfw::misc::feature::Index::batch ( void  ) const
inline

Get the batch index.

Returns
The batch index

Definition at line 75 of file Index.h.

75{ return _batch; }

◆ ch() [1/2]

int32_t & nnfw::misc::feature::Index::ch ( void  )
inline

Get the depth index as the lvalue reference.

Returns
The reference of the depth value

Definition at line 102 of file Index.h.

102{ return _ch; }

◆ ch() [2/2]

int32_t nnfw::misc::feature::Index::ch ( void  ) const
inline

Get the depth index.

Returns
The depth index

Definition at line 80 of file Index.h.

80{ return _ch; }

◆ col() [1/2]

int32_t & nnfw::misc::feature::Index::col ( void  )
inline

Get the width index as the lvalue reference.

Returns
The reference of the width value

Definition at line 112 of file Index.h.

112{ return _col; }

◆ col() [2/2]

int32_t nnfw::misc::feature::Index::col ( void  ) const
inline

Get the width index.

Returns
The width index

Definition at line 90 of file Index.h.

90{ return _col; }

◆ row() [1/2]

int32_t & nnfw::misc::feature::Index::row ( void  )
inline

Get the height index as the lvalue reference.

Returns
The reference of the height value

Definition at line 107 of file Index.h.

107{ return _row; }

◆ row() [2/2]

int32_t nnfw::misc::feature::Index::row ( void  ) const
inline

Get the height index.

Returns
The height index

Definition at line 85 of file Index.h.

85{ return _row; }

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