Lattice Builder
Software Package for Constructing Rank-1 Lattices
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Groups Pages
LatBuilder::Vectorize Namespace Reference

Helpers to vectorize simple operations. More...

Classes

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