ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnfw::misc::tensor::Diff< T > Struct Template Reference

Struct to have information after comparing two elements of two tensors. More...

#include <Diff.h>

Collaboration diagram for nnfw::misc::tensor::Diff< T >:

Public Member Functions

 Diff (const Index &i)
 Construct a new Diff object.
 
 Diff (const Index &i, const T &e, const T &o)
 Construct a new Diff object.
 

Data Fields

Index index
 
expected
 
obtained
 

Detailed Description

template<typename T>
struct nnfw::misc::tensor::Diff< T >

Struct to have information after comparing two elements of two tensors.

Definition at line 38 of file Diff.h.

Constructor & Destructor Documentation

◆ Diff() [1/2]

template<typename T >
nnfw::misc::tensor::Diff< T >::Diff ( const Index i)
inline

Construct a new Diff object.

Parameters
[in]iInitial value of index

Definition at line 49 of file Diff.h.

49 : index(i)
50 {
51 // DO NOTHING
52 }

◆ Diff() [2/2]

template<typename T >
nnfw::misc::tensor::Diff< T >::Diff ( const Index i,
const T &  e,
const T &  o 
)
inline

Construct a new Diff object.

Parameters
[in]iIndex value
[in]eExpected value of element of first tensor
[in]oObtained value of element of second tensor

Definition at line 60 of file Diff.h.

60 : index(i), expected{e}, obtained{o}
61 {
62 // DO NOTHING
63 }

Field Documentation

◆ expected

template<typename T >
T nnfw::misc::tensor::Diff< T >::expected

Expected value of element of first tensor

Definition at line 42 of file Diff.h.

◆ index

template<typename T >
Index nnfw::misc::tensor::Diff< T >::index

Index of elements in two tensors, which turn out to be different

Definition at line 40 of file Diff.h.

◆ obtained

template<typename T >
T nnfw::misc::tensor::Diff< T >::obtained

Obtained value of element of second tensor

Definition at line 43 of file Diff.h.


The documentation for this struct was generated from the following file: