ONE - On-device Neural Engine
|
Class to have information of the operand for vector. More...
#include <Object.h>
Public Types | |
using | Generator = std::function< T(int32_t size, int32_t offset)> |
Public Member Functions | |
Object (int32_t size, const Generator &gen) | |
Construct Object object with size of vector and set value used by Generator. | |
int32_t | size (void) const |
Get size of vector. | |
T | at (uint32_t nth) const override |
Get the value used by index. | |
Public Member Functions inherited from nnfw::misc::vector::Reader< T > | |
virtual | ~Reader ()=default |
Destruct Reader object using default destructor. | |
Class to have information of the operand for vector.
using nnfw::misc::vector::Object< T >::Generator = std::function<T(int32_t size, int32_t offset)> |
|
inline |
Construct Object object with size of vector and set value used by Generator.
[in] | size | The size of vector |
[in] | gen | A function to set values of operand tensor |
Definition at line 52 of file Object.h.
References offset(), and nnfw::misc::vector::Object< T >::size().
|
inlineoverridevirtual |
Get the value used by index.
[in] | nth | The vector index |
Implements nnfw::misc::vector::Reader< T >.
Definition at line 75 of file Object.h.
|
inline |
Get size of vector.
Definition at line 67 of file Object.h.
Referenced by nnfw::misc::vector::Object< T >::Object().