-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtensor_compare_lib.h
55 lines (37 loc) · 1.78 KB
/
tensor_compare_lib.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef _TENSOR_COMPARE_LIB_H_
#define _TENSOR_COMPARE_LIB_H_
// Namespace
namespace tensor_lib {
namespace internal {
template <typename T>
static inline T abs(const T& value);
}
template <typename T>
bool compareArray(const T* A, const T* B, const size_t Size);
template <typename T>
bool compare2Darray(const T** A, const T** B, const size_t SizeY, const size_t SizeX);
template <typename T>
bool compareTensors(const std::vector<T> & A, const std::vector<T> & B);
template <typename T>
bool compareTensors(const std::vector<std::vector<T> > & A, const std::vector<std::vector<T> > & B);
template <typename T>
bool compareTensors(const std::vector<std::vector<std::vector<T> > >& A, const std::vector<std::vector<std::vector<T> > >& B);
template <typename T>
bool compareTensors(const std::vector<std::vector<std::vector<std::vector<T> > > >& A, const std::vector<std::vector<std::vector<std::vector<T> > > >& B);
// W. Threshold
template <typename T>
bool compareArray(const T* A, const T* B, const size_t Size, const T t);
template <typename T>
bool compare2Darray(const T** A, const T** B, const size_t SizeY, const size_t SizeX, const T t);
template <typename T>
bool compareTensors(const std::vector<T> & A, const std::vector<T> & B, const T t);
template <typename T>
bool compareTensors(const std::vector<std::vector<T> > & A, const std::vector<std::vector<T> > & B, const T t);
template <typename T>
bool compareTensors(const std::vector<std::vector<std::vector<T> > >& A, const std::vector<std::vector<std::vector<T> > >& B, const T t);
template <typename T>
bool compareTensors(const std::vector<std::vector<std::vector<std::vector<T> > > >& A, const std::vector<std::vector<std::vector<std::vector<T> > > >& B, const T t);
// End Namespace
}
#include "tpp/tensor_compare_lib.cpp"
#endif