ONE - On-device Neural Engine
|
Class to enumerate index of a tensor. More...
#include <IndexEnumerator.h>
Public Member Functions | |
IndexEnumerator (const Shape &shape) | |
Construct a new IndexEnumerator object. | |
IndexEnumerator (IndexEnumerator &&)=delete | |
Prevent constructing IndexEnumerator object by using R-value reference. | |
IndexEnumerator (const IndexEnumerator &)=delete | |
Prevent copy constructor. | |
bool | valid (void) const |
Check if more enumeration is available. | |
const Index & | curr (void) const |
Get the current index to enumerate. | |
void | advance (void) |
Advance index by +1. | |
Data Fields | |
const Shape | _shape |
Shape to enumerate. | |
Class to enumerate index of a tensor.
Definition at line 39 of file IndexEnumerator.h.
|
inlineexplicit |
Construct a new IndexEnumerator
object.
[in] | shape | Shape of tensor of which index will be enumerate |
Definition at line 46 of file IndexEnumerator.h.
References _shape, nnfw::misc::tensor::Index::at(), nnfw::misc::tensor::Shape::dim(), and nnfw::misc::tensor::Shape::rank().
|
delete |
Prevent constructing IndexEnumerator
object by using R-value reference.
|
delete |
Prevent copy constructor.
|
inline |
Advance index by +1.
Definition at line 92 of file IndexEnumerator.h.
References _shape, nnfw::misc::tensor::Index::at(), nnfw::misc::tensor::Shape::dim(), and nnfw::misc::tensor::Shape::rank().
|
inline |
Get the current index to enumerate.
Definition at line 86 of file IndexEnumerator.h.
|
inline |
Check if more enumeration is available.
true
if more advance()
is available, otherwise false
Definition at line 79 of file IndexEnumerator.h.
References _shape, and nnfw::misc::tensor::Shape::rank().
const Shape nnfw::misc::tensor::IndexEnumerator::_shape |
Shape to enumerate.
Definition at line 120 of file IndexEnumerator.h.
Referenced by advance(), IndexEnumerator(), and valid().