ONE - On-device Neural Engine
|
Class to represent strides where stride[N-1] >= stride[N] holds for all N < rank. More...
#include <NonIncreasingStride.h>
Public Member Functions | |
void | init (const Shape &shape) |
Initialize the stride data using Shape . | |
uint32_t | at (uint32_t axis) const |
Get an stride value for specific axis. | |
uint32_t | offset (const Index &index) const |
Get the 1-D offset of specified index for n-D tensor. | |
Class to represent strides where stride[N-1] >= stride[N] holds for all N < rank.
Definition at line 40 of file NonIncreasingStride.h.
|
inline |
Get an stride value for specific axis.
[in] | axis | Axis of stride |
Definition at line 70 of file NonIncreasingStride.h.
Referenced by nnfw::misc::tensor::Object< T >::Object().
|
inline |
Initialize the stride data using Shape
.
[in] | shape | to build stride info |
Definition at line 48 of file NonIncreasingStride.h.
References nnfw::misc::tensor::Shape::dim(), and nnfw::misc::tensor::Shape::rank().
Referenced by nnfw::misc::tensor::Object< T >::Object().
uint32_t nnfw::misc::tensor::NonIncreasingStride::offset | ( | const Index & | index | ) | const |
Get the 1-D offset of specified index for n-D tensor.
index | Index object |
Definition at line 28 of file NonIncreasingStride.cpp.
References offset().
Referenced by nnfw::misc::tensor::Object< T >::at(), nnfw::misc::tensor::Object< T >::Object(), and offset().