ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Array.h File Reference
#include "Shape.h"
#include "Dims.h"
#include "Macro.h"

Go to the source code of this file.

Functions

template<typename ArrayType1 , typename ArrayType2 >
int MatchingArraySize (const ArrayType1 &array1, int index1, const ArrayType2 &array2, int index2)
 
template<typename ArrayType1 , typename ArrayType2 , typename... Args>
int MatchingArraySize (const ArrayType1 &array1, int index1, const ArrayType2 &array2, int index2, Args... args)
 

Function Documentation

◆ MatchingArraySize() [1/2]

template<typename ArrayType1 , typename ArrayType2 >
int MatchingArraySize ( const ArrayType1 &  array1,
int  index1,
const ArrayType2 &  array2,
int  index2 
)

Definition at line 31 of file Array.h.

32{
33 DCHECK_EQ(ArraySize(array1, index1), ArraySize(array2, index2));
34 return ArraySize(array1, index1);
35}
int ArraySize(const Dims< N > &array, int index)
Definition Dims.h:76
#define DCHECK_EQ(x, y)
Definition Macro.h:29

References ArraySize(), and DCHECK_EQ.

Referenced by Add(), AveragePool(), Concatenation(), optimized_ops::DepthwiseConv(), Div(), Im2col(), MatchingArraySize(), MaxPool(), Mul(), Softmax(), and Sub().

◆ MatchingArraySize() [2/2]

template<typename ArrayType1 , typename ArrayType2 , typename... Args>
int MatchingArraySize ( const ArrayType1 &  array1,
int  index1,
const ArrayType2 &  array2,
int  index2,
Args...  args 
)

Definition at line 39 of file Array.h.

41{
42 DCHECK_EQ(ArraySize(array1, index1), ArraySize(array2, index2));
43 return MatchingArraySize(array1, index1, args...);
44}
int MatchingArraySize(const ArrayType1 &array1, int index1, const ArrayType2 &array2, int index2)
Definition Array.h:31
args
Definition infer.py:21

References ArraySize(), DCHECK_EQ, and MatchingArraySize().