#include <TensorSliceEnumerator.h>
Definition at line 29 of file TensorSliceEnumerator.h.
◆ TensorSliceEnumerator()
moco::TensorSliceEnumerator::TensorSliceEnumerator |
( |
| ) |
|
|
default |
◆ advance()
void moco::TensorSliceEnumerator::advance |
( |
void |
| ) |
|
◆ begin()
void moco::TensorSliceEnumerator::begin |
( |
u32v_t & |
b | ) |
|
|
inline |
◆ cursor() [1/2]
uint32_t moco::TensorSliceEnumerator::cursor |
( |
uint32_t |
rank | ) |
const |
◆ cursor() [2/2]
const u32v_t moco::TensorSliceEnumerator::cursor |
( |
void |
| ) |
const |
|
inline |
◆ end()
void moco::TensorSliceEnumerator::end |
( |
u32v_t & |
e | ) |
|
|
inline |
◆ shape()
◆ start()
void moco::TensorSliceEnumerator::start |
( |
void |
| ) |
|
Definition at line 48 of file TensorSliceEnumerator.cpp.
49{
50 auto rank = _rank_in;
51
52 _cursor.resize(rank);
53 _boundary.resize(rank);
54 for (uint32_t r = 0;
r < rank; ++
r)
55 {
56 _cursor.at(r) = _begin[
r];
57 _boundary.at(r) = _end[
r];
58 }
59}
◆ valid()
bool moco::TensorSliceEnumerator::valid |
( |
void |
| ) |
|
Definition at line 61 of file TensorSliceEnumerator.cpp.
62{
63 auto rank = _rank_in;
64 for (uint32_t r = 0;
r < rank; ++
r)
65 {
66 if (_cursor.at(r) >= _boundary.at(r))
67 return false;
68 }
69 return true;
70}
The documentation for this class was generated from the following files: