ONE - On-device Neural Engine
|
Data Structures | |
class | Comparator |
Class to compare two tensors (expected and obtained to compare) More... | |
struct | Diff |
Struct to have information after comparing two elements of two tensors. More... | |
struct | Index |
Struct to represent index of each dimension of a tensor. More... | |
class | IndexEnumerator |
Class to enumerate index of a tensor. More... | |
class | IndexFormatter |
Class to send Index object to output stream. More... | |
class | IndexIterator |
Class to iterate indexes available for given shape. More... | |
class | NonIncreasingStride |
Class to represent strides where stride[N-1] >= stride[N] holds for all N < rank. More... | |
class | Object |
Class to build a tensor using specific generator. More... | |
struct | Reader |
Struct to read element of tensor. More... | |
class | Shape |
Class to represent shape of a tensor. More... | |
class | Zipper |
Class to apply a function with three params: Index , elements of a tensor at passed index read by Reader objects. More... | |
Functions | |
std::ostream & | operator<< (std::ostream &os, const IndexFormatter &fmt) |
Send IndexFormatter object to output stream. | |
IndexIterator | iterate (const Shape &shape) |
Get an IndexItator object. | |
template<typename Callable > | |
IndexIterator & | operator<< (IndexIterator &&it, Callable cb) |
Iterate all indexes and apply a function. | |
bool | operator== (const Shape &, const Shape &) |
Check equality of two Shape . | |
std::ostream & | operator<< (std::ostream &os, const Shape &shape) |
Send Shape to std::ostream . | |
template<typename T , typename Callable > | |
const Zipper< T > & | operator<< (const Zipper< T > &zipper, Callable cb) |
Apply cb by using lhs and rhs passed to the constructor of zipper . | |
template<typename T > | |
Zipper< T > | zip (const Shape &shape, const Reader< T > &lhs, const Reader< T > &rhs) |
Get Zipper object constructed using passed params. | |
|
inline |
Get an IndexItator
object.
[in] | shape | Shape of tensor of which index will be iterated |
IndexIterator
object Definition at line 89 of file IndexIterator.h.
Referenced by nnfw::misc::tensor::Object< T >::Object(), and nnfw::misc::tensor::Zipper< T >::zip().
const Zipper< T > & nnfw::misc::tensor::operator<< | ( | const Zipper< T > & | zipper, |
Callable | cb | ||
) |
Apply cb
by using lhs
and rhs
passed to the constructor of zipper
.
[in] | zipper | Zipper object |
[in] | cb | Function to zpply using zip function |
zipper
object after applying cb
to zipper
Definition at line 82 of file Zipper.h.
References nnfw::misc::tensor::Zipper< T >::zip().
IndexIterator & nnfw::misc::tensor::operator<< | ( | IndexIterator && | it, |
Callable | cb | ||
) |
Iterate all indexes and apply a function.
[in] | it | IndexIterator object that is constructed with a tensor shape |
[in] | cb | A function that will receive a specific index. Inside the function, the index is used to manipulate tensor element. |
IndexIterator
object Definition at line 98 of file IndexIterator.h.
References nnfw::misc::tensor::IndexIterator::iter().
std::ostream & nnfw::misc::tensor::operator<< | ( | std::ostream & | os, |
const IndexFormatter & | fmt | ||
) |
Send IndexFormatter
object to output stream.
[in] | os | Output stream |
[in] | fmt | IndexFormatter object that is sent to output stream |
Definition at line 28 of file IndexFormatter.cpp.
std::ostream & nnfw::misc::tensor::operator<< | ( | std::ostream & | os, |
const Shape & | shape | ||
) |
Send Shape
to std::ostream
.
[in] | os | std::ostream to process this Shape |
[in] | shape | Shape to send to ostream |
std::ostream
Definition at line 90 of file Shape.cpp.
References nnfw::misc::tensor::Shape::dim(), and nnfw::misc::tensor::Shape::rank().
Check equality of two Shape
.
[in] | Shape | First shape to compare |
[in] | Shape | Second shape to compare |
true
if both shapes are equal, otherwise false
Definition at line 30 of file Shape.cpp.
References nnfw::misc::tensor::Shape::dim(), and nnfw::misc::tensor::Shape::rank().
Zipper< T > nnfw::misc::tensor::zip | ( | const Shape & | shape, |
const Reader< T > & | lhs, | ||
const Reader< T > & | rhs | ||
) |
Get Zipper
object constructed using passed params.
shape | Shape of lhs and rhs |
lhs | Reader object of a tensor |
rhs | Reader object of a tensor |
Zipper
object Definition at line 95 of file Zipper.h.
Referenced by nnfw::misc::tensor::Comparator::compare().