Lattice Builder Manual
Software Package for Constructing Rank-1 Lattices
LatBuilder::Vectorize Namespace Reference

Helpers to vectorize simple operations. More...

Classes

struct  BinaryOperator
 Automatic dispatcher for binary operators. More...
 
struct  BinaryOperator< OP, true, false >
 Vector-scalar specialization of BinaryOperator. More...
 
struct  BinaryOperator< OP, true, true >
 Vector-vector specialization of BinaryOperator. More...
 
struct  BinaryOperatorResult
 Guesses the result type of the binary operator OP given arguments of type T1 and T2. More...
 
class  IsIndexable
 Type traits class that checks if T is indexable with []. More...
 

Functions

template<typename OP , typename T1 , typename T2 >
BinaryOperatorResult< OP, T1, T2 >::type apply (const T1 &x, const T2 &y)
 Applies the scalar binary operator OP to x and y. More...
 

Detailed Description

Helpers to vectorize simple operations.

Function Documentation

template<typename OP , typename T1 , typename T2 >
BinaryOperatorResult<OP, T1, T2>::type LatBuilder::Vectorize::apply ( const T1 &  x,
const T2 &  y 
)

Applies the scalar binary operator OP to x and y.

Example definition of OP:

struct Sum {
typedef double result_type;
static constexpr result_type apply(const arg_type& x, const arg_type& y)
{ return x + y; }
};