Classes | Namespaces | Defines | Functions
packetmath.cpp File Reference
#include "main.h"
Include dependency graph for packetmath.cpp:

Go to the source code of this file.

Classes

struct  packet_helper< Cond, Packet >
struct  packet_helper< false, Packet >

Namespaces

namespace  Eigen
namespace  Eigen::internal

Defines

#define CHECK_CWISE1(REFOP, POP)
#define CHECK_CWISE1_IF(COND, REFOP, POP)
#define CHECK_CWISE2(REFOP, POP)
#define REF_ADD(a, b)   ((a)+(b))
#define REF_DIV(a, b)   ((a)/(b))
#define REF_MUL(a, b)   ((a)*(b))
#define REF_SUB(a, b)   ((a)-(b))

Functions

template<typename Scalar >
bool areApprox (const Scalar *a, const Scalar *b, int size)
template<typename Scalar >
bool areApproxAbs (const Scalar *a, const Scalar *b, int size, const typename NumTraits< Scalar >::Real &refvalue)
template<typename Scalar >
bool 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 packetmath ()
template<typename Scalar >
void packetmath_complex ()
template<typename Scalar >
void packetmath_real ()
template<typename Scalar , bool ConjLhs, bool ConjRhs>
void test_conj_helper (Scalar *data1, Scalar *data2, Scalar *ref, Scalar *pval)
void test_packetmath ()

Define Documentation

#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(areApprox(ref, data2, PacketSize) && #POP); \
}

Definition at line 75 of file packetmath.cpp.

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

Definition at line 102 of file packetmath.cpp.

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

Definition at line 68 of file packetmath.cpp.

#define REF_ADD (   a,
  b 
)    ((a)+(b))

Definition at line 110 of file packetmath.cpp.

#define REF_DIV (   a,
  b 
)    ((a)/(b))

Definition at line 113 of file packetmath.cpp.

#define REF_MUL (   a,
  b 
)    ((a)*(b))

Definition at line 112 of file packetmath.cpp.

#define REF_SUB (   a,
  b 
)    ((a)-(b))

Definition at line 111 of file packetmath.cpp.


Function Documentation

template<typename Scalar >
bool areApprox ( const Scalar a,
const Scalar b,
int  size 
)

Definition at line 54 of file packetmath.cpp.

template<typename Scalar >
bool areApproxAbs ( const Scalar a,
const Scalar b,
int  size,
const typename NumTraits< Scalar >::Real &  refvalue 
)

Definition at line 41 of file packetmath.cpp.

template<typename Scalar >
bool isApproxAbs ( const Scalar a,
const Scalar b,
const typename NumTraits< Scalar >::Real &  refvalue 
)

Definition at line 36 of file packetmath.cpp.

template<typename Scalar >
void packetmath ( )

Definition at line 115 of file packetmath.cpp.

template<typename Scalar >
void packetmath_complex ( )

Definition at line 313 of file packetmath.cpp.

template<typename Scalar >
void packetmath_real ( )

Definition at line 223 of file packetmath.cpp.

template<typename Scalar , bool ConjLhs, bool ConjRhs>
void test_conj_helper ( Scalar data1,
Scalar data2,
Scalar ref,
Scalar pval 
)

Definition at line 285 of file packetmath.cpp.

void test_packetmath ( )

Definition at line 345 of file packetmath.cpp.



libicr
Author(s): Robert Krug
autogenerated on Mon Jan 6 2014 11:34:06