vector_expression.hpp File Reference
#include "detail/expression_optimizers.hpp"
#include "kernels/dot.hpp"
#include "kernels/vector_fold.hpp"
#include "kernels/vector_max.hpp"

Go to the source code of this file.

Macros

#define REMORA_UNARY_VECTOR_TRANSFORMATION(name, F)
 
#define REMORA_BINARY_VECTOR_EXPRESSION(name, F)
 
#define REMORA_VECTOR_SCALAR_TRANSFORMATION(name, F)
 
#define REMORA_VECTOR_SCALAR_TRANSFORMATION_2(name, F)
 

Macro Definition Documentation

◆ REMORA_BINARY_VECTOR_EXPRESSION

#define REMORA_BINARY_VECTOR_EXPRESSION (   name,
 
)
Value:
template<class VecV1, class VecV2, class Device>\
vector_binary<VecV1, VecV2, typename device_traits<Device>:: template F<typename common_value_type<VecV1,VecV2>::type> >\
name(vector_expression<VecV1, Device> const& v1, vector_expression<VecV2, Device> const& v2){\
REMORA_SIZE_CHECK(v1().size() == v2().size());\
typedef typename common_value_type<VecV1,VecV2>::type type;\
typedef typename device_traits<Device>:: template F<type> functor_type;\
return vector_binary<VecV1, VecV2, functor_type >(v1(),v2(), functor_type());\
}

Definition at line 168 of file vector_expression.hpp.

◆ REMORA_UNARY_VECTOR_TRANSFORMATION

#define REMORA_UNARY_VECTOR_TRANSFORMATION (   name,
 
)
Value:
template<class VecV, class Device>\
vector_unary<VecV,typename device_traits<Device>:: template F<typename VecV::value_type> >\
name(vector_expression<VecV, Device> const& v){\
typedef typename device_traits<Device>:: template F<typename VecV::value_type> functor_type;\
return vector_unary<VecV, functor_type >(v(), functor_type());\
}

Definition at line 74 of file vector_expression.hpp.

◆ REMORA_VECTOR_SCALAR_TRANSFORMATION

#define REMORA_VECTOR_SCALAR_TRANSFORMATION (   name,
 
)
Value:
template<class T, class VecV, class Device> \
typename std::enable_if< \
std::is_convertible<T, typename VecV::value_type >::value,\
vector_binary<VecV, scalar_vector<typename VecV::value_type, Device>, \
typename device_traits<Device>:: template F<typename VecV::value_type> > \
>::type \
name (vector_expression<VecV, Device> const& v, T t){ \
typedef typename VecV::value_type type;\
typedef typename device_traits<Device>:: template F<type> functor_type;\
return vector_binary<VecV, scalar_vector<type, Device>, functor_type >(v(), scalar_vector<type, Device>(v().size(),(type)t), functor_type()); \
}

Definition at line 188 of file vector_expression.hpp.

◆ REMORA_VECTOR_SCALAR_TRANSFORMATION_2

#define REMORA_VECTOR_SCALAR_TRANSFORMATION_2 (   name,
 
)
Value:
template<class T, class VecV, class Device> \
typename std::enable_if< \
std::is_convertible<T, typename VecV::value_type >::value,\
vector_binary<scalar_vector<typename VecV::value_type, Device>, VecV, typename device_traits<Device>:: template F<typename VecV::value_type> > \
>::type \
name (T t, vector_expression<VecV, Device> const& v){ \
typedef typename VecV::value_type type;\
typedef typename device_traits<Device>:: template F<type> functor_type;\
return vector_binary<scalar_vector<T, Device>, VecV, functor_type >(scalar_vector<T, Device>(v().size(),t), v() ,functor_type()); \
}

Definition at line 213 of file vector_expression.hpp.