Classes | Namespaces | Macros | Functions | Variables
packetmath_test_shared.h File Reference
#include "main.h"
#include <typeinfo>
Include dependency graph for packetmath_test_shared.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Eigen::internal::bit_andnot
 
struct  Eigen::test::packet_helper< Cond, Packet >
 
struct  Eigen::test::packet_helper< false, Packet >
 
struct  Eigen::test::runall< Scalar, PacketType, IsComplex, IsInteger >
 
struct  Eigen::test::runner< Scalar, PacketType, Vectorized, HasHalf >
 
struct  Eigen::test::runner< Scalar, PacketType, false, false >
 
struct  Eigen::test::runner< Scalar, PacketType, true, false >
 
struct  Eigen::test::runner< Scalar, PacketType, true, true >
 

Namespaces

 Eigen
 Namespace containing all symbols from the Eigen library.
 
 Eigen::internal
 
 Eigen::test
 

Macros

#define CHECK_CWISE1(REFOP, POP)
 
#define CHECK_CWISE1_BYREF1_IF(COND, REFOP, POP)
 
#define CHECK_CWISE1_EXACT_IF(COND, REFOP, POP)
 
#define CHECK_CWISE1_IF(COND, REFOP, POP)
 
#define CHECK_CWISE1_N(REFOP, POP, N)
 
#define CHECK_CWISE2_IF(COND, REFOP, POP)
 
#define CHECK_CWISE3_IF(COND, REFOP, POP)
 
#define EIGEN_TEST_MAKE_BITWISE(OP, FUNC)
 
#define EIGEN_TEST_MAKE_BITWISE2(OP, FUNC, T)
 

Functions

template<typename T , typename Bits , typename Func >
T Eigen::internal::apply_bit_op (Bits a, Bits b, Func f)
 
template<typename Scalar >
bool Eigen::test::areApprox (const Scalar *a, const Scalar *b, int size)
 
template<typename Scalar >
bool Eigen::test::areApproxAbs (const Scalar *a, const Scalar *b, int size, const typename NumTraits< Scalar >::Real &refvalue)
 
template<typename Scalar >
bool Eigen::test::areEqual (const Scalar *a, const Scalar *b, int size)
 
template<typename T >
bool Eigen::internal::biteq (T a, T b)
 
template<typename T >
Map< const Array< unsigned char, sizeof(T), 1 > > Eigen::internal::bits (const T &x)
 
template<typename Scalar >
EIGEN_DONT_INLINE bool Eigen::test::isApproxAbs (const Scalar &a, const Scalar &b, const typename NumTraits< Scalar >::Real &refvalue)
 
template<typename T >
T Eigen::internal::negate (const T &x)
 
template<typename Scalar >
void Eigen::test::print_mismatch (const Scalar *ref, const Scalar *vec, int size)
 

Variables

bool g_first_pass = true
 

Macro Definition Documentation

◆ CHECK_CWISE1

#define CHECK_CWISE1 (   REFOP,
  POP 
)
Value:
{ \
for (int i=0; i<PacketSize; ++i) \
ref[i] = REFOP(data1[i]); \
internal::pstore(data2, POP(internal::pload<Packet>(data1))); \
VERIFY(test::areApprox(ref, data2, PacketSize) && #POP); \
}

Definition at line 126 of file packetmath_test_shared.h.

◆ CHECK_CWISE1_BYREF1_IF

#define CHECK_CWISE1_BYREF1_IF (   COND,
  REFOP,
  POP 
)
Value:
if(COND) { \
test::packet_helper<COND,Packet> h; \
for (int i=0; i<PacketSize; ++i) \
ref[i] = Scalar(REFOP(data1[i], ref[i+PacketSize])); \
Packet pout; \
Scalar sout; \
h.store(data2, POP(h.load(data1), h.forward_reference(pout, sout))); \
h.store(data2+PacketSize, h.forward_reference(pout, sout)); \
VERIFY(test::areApprox(ref, data2, 2 * PacketSize) && #POP); \
}

Definition at line 213 of file packetmath_test_shared.h.

◆ CHECK_CWISE1_EXACT_IF

#define CHECK_CWISE1_EXACT_IF (   COND,
  REFOP,
  POP 
)
Value:
if(COND) { \
test::packet_helper<COND,Packet> h; \
for (int i=0; i<PacketSize; ++i) \
ref[i] = Scalar(REFOP(data1[i])); \
h.store(data2, POP(h.load(data1))); \
VERIFY(test::areEqual(ref, data2, PacketSize) && #POP); \
}

Definition at line 196 of file packetmath_test_shared.h.

◆ CHECK_CWISE1_IF

#define CHECK_CWISE1_IF (   COND,
  REFOP,
  POP 
)
Value:
if(COND) { \
test::packet_helper<COND,Packet> h; \
for (int i=0; i<PacketSize; ++i) \
ref[i] = Scalar(REFOP(data1[i])); \
h.store(data2, POP(h.load(data1))); \
VERIFY(test::areApprox(ref, data2, PacketSize) && #POP); \
}

Definition at line 188 of file packetmath_test_shared.h.

◆ CHECK_CWISE1_N

#define CHECK_CWISE1_N (   REFOP,
  POP,
  N 
)
Value:
{ \
for (int i=0; i<N; ++i) \
ref[i] = REFOP(data1[i]); \
for (int j=0; j<N; j+=PacketSize) \
internal::pstore(data2 + j, POP(internal::pload<Packet>(data1 + j))); \
VERIFY(test::areApprox(ref, data2, N) && #POP); \
}

Definition at line 136 of file packetmath_test_shared.h.

◆ CHECK_CWISE2_IF

#define CHECK_CWISE2_IF (   COND,
  REFOP,
  POP 
)
Value:
if(COND) { \
test::packet_helper<COND,Packet> h; \
for (int i=0; i<PacketSize; ++i) \
ref[i] = Scalar(REFOP(data1[i], data1[i+PacketSize])); \
h.store(data2, POP(h.load(data1),h.load(data1+PacketSize))); \
VERIFY(test::areApprox(ref, data2, PacketSize) && #POP); \
}

Definition at line 204 of file packetmath_test_shared.h.

◆ CHECK_CWISE3_IF

#define CHECK_CWISE3_IF (   COND,
  REFOP,
  POP 
)
Value:
if (COND) { \
test::packet_helper<COND, Packet> h; \
for (int i = 0; i < PacketSize; ++i) \
ref[i] = Scalar(REFOP(data1[i], data1[i + PacketSize], \
data1[i + 2 * PacketSize])); \
h.store(data2, POP(h.load(data1), h.load(data1 + PacketSize), \
h.load(data1 + 2 * PacketSize))); \
VERIFY(test::areApprox(ref, data2, PacketSize) && #POP); \
}

Definition at line 224 of file packetmath_test_shared.h.

◆ EIGEN_TEST_MAKE_BITWISE

#define EIGEN_TEST_MAKE_BITWISE (   OP,
  FUNC 
)
Value:
EIGEN_TEST_MAKE_BITWISE2(OP,FUNC,double) \
EIGEN_TEST_MAKE_BITWISE2(OP,FUNC,half) \
EIGEN_TEST_MAKE_BITWISE2(OP,FUNC,bfloat16) \
EIGEN_TEST_MAKE_BITWISE2(OP,FUNC,std::complex<float>) \
EIGEN_TEST_MAKE_BITWISE2(OP,FUNC,std::complex<double>)

Definition at line 49 of file packetmath_test_shared.h.

◆ EIGEN_TEST_MAKE_BITWISE2

#define EIGEN_TEST_MAKE_BITWISE2 (   OP,
  FUNC,
  T 
)
Value:
template<> T EIGEN_CAT(p,OP)(const T& a,const T& b) { \
return apply_bit_op<T>(bits(a),bits(b),FUNC); \
}

Definition at line 44 of file packetmath_test_shared.h.

Variable Documentation

◆ g_first_pass

bool g_first_pass = true

Definition at line 19 of file packetmath_test_shared.h.

Eigen::internal::bits
Map< const Array< unsigned char, sizeof(T), 1 > > bits(const T &x)
Definition: packetmath_test_shared.h:28
b
Scalar * b
Definition: benchVecAdd.cpp:17
Eigen::test::areEqual
bool areEqual(const Scalar *a, const Scalar *b, int size)
Definition: packetmath_test_shared.h:113
EIGEN_TEST_MAKE_BITWISE2
#define EIGEN_TEST_MAKE_BITWISE2(OP, FUNC, T)
Definition: packetmath_test_shared.h:44
h
const double h
Definition: testSimpleHelicopter.cpp:19
Eigen::bfloat16
Definition: BFloat16.h:58
j
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2
EIGEN_CAT
#define EIGEN_CAT(a, b)
Definition: Macros.h:902
Eigen::Triplet< double >
Eigen::test::areApprox
bool areApprox(const Scalar *a, const Scalar *b, int size)
Definition: packetmath_test_shared.h:99
Eigen::internal::pstore
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
Definition: GenericPacketMath.h:696
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
OP
#define OP(X)
Definition: gtsam/3rdparty/Eigen/blas/common.h:47
p
float * p
Definition: Tutorial_Map_using.cpp:9
ref
Reference counting helper.
Definition: object.h:67
N
#define N
Definition: igam.h:9
Eigen::half
Definition: Half.h:142
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Scalar
SCALAR Scalar
Definition: bench_gemm.cpp:46


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:09:49