ONE - On-device Neural Engine
Loading...
Searching...
No Matches
IndexEnumerator.cpp File Reference
#include "nncc/core/ADT/tensor/IndexEnumerator.h"
#include <cassert>

Go to the source code of this file.

Namespaces

namespace  nncc
 
namespace  nncc::core
 
namespace  nncc::core::ADT
 
namespace  nncc::core::ADT::tensor
 

Functions

uint32_t axis_of (const Shape &shape, uint32_t cursor)
 

Function Documentation

◆ axis_of()

uint32_t axis_of ( const Shape shape,
uint32_t  cursor 
)
inline

Definition at line 23 of file IndexEnumerator.cpp.

24{
25 const uint32_t rank = shape.rank();
26 assert(cursor < rank);
27 return rank - cursor - 1;
28}
uint32_t rank(void) const
Definition Shape.cpp:35

References nncc::core::ADT::tensor::Shape::rank().

Referenced by nncc::core::ADT::tensor::IndexEnumerator::advance(), and nncc::core::ADT::tensor::IndexEnumerator::IndexEnumerator().