vspline 1.1.0
Generic C++11 Code for Uniform B-Splines
Public Types | Public Member Functions | List of all members
vspline::callable< derived_type, IN, OUT, vsize > Struct Template Reference

mixin 'callable' is used with CRTP: it serves as additional base to unary functors which are meant to provide operator() and takes the derived class as it's first template argument, followed be the argument types and vectorization width, so that the parameter and return type for operator() and - if vsize is greater than 1 - it's vectorized overload can be produced. This formulation has the advantage of not having to rely on the 'out_type_of' mechanism I was using before and provides precisely the operator() overload(s) which are appropriate. More...

#include <unary_functor.h>

Public Types

typedef vector_traits< IN, vsize >::type cl_in_v
 
typedef vector_traits< OUT, vsize >::type cl_out_v
 

Public Member Functions

OUT operator() (const IN &in) const
 
OUT operator() (const IN &in)
 
template<typename = std::enable_if < ( vsize > 1 ) >>
cl_out_v operator() (const cl_in_v &in) const
 
template<typename = std::enable_if < ( vsize > 1 ) >>
cl_out_v operator() (const cl_in_v &in)
 

Detailed Description

template<class derived_type, typename IN, typename OUT = IN, size_t vsize = vspline::vector_traits < IN > :: size>
struct vspline::callable< derived_type, IN, OUT, vsize >

mixin 'callable' is used with CRTP: it serves as additional base to unary functors which are meant to provide operator() and takes the derived class as it's first template argument, followed be the argument types and vectorization width, so that the parameter and return type for operator() and - if vsize is greater than 1 - it's vectorized overload can be produced. This formulation has the advantage of not having to rely on the 'out_type_of' mechanism I was using before and provides precisely the operator() overload(s) which are appropriate.

Definition at line 287 of file unary_functor.h.

Member Typedef Documentation

◆ cl_in_v

template<class derived_type , typename IN , typename OUT = IN, size_t vsize = vspline::vector_traits < IN > :: size>
typedef vector_traits<IN,vsize>::type vspline::callable< derived_type, IN, OUT, vsize >::cl_in_v

Definition at line 292 of file unary_functor.h.

◆ cl_out_v

template<class derived_type , typename IN , typename OUT = IN, size_t vsize = vspline::vector_traits < IN > :: size>
typedef vector_traits<OUT,vsize>::type vspline::callable< derived_type, IN, OUT, vsize >::cl_out_v

Definition at line 293 of file unary_functor.h.

Member Function Documentation

◆ operator()() [1/4]

template<class derived_type , typename IN , typename OUT = IN, size_t vsize = vspline::vector_traits < IN > :: size>
template<typename = std::enable_if < ( vsize > 1 ) >>
cl_out_v vspline::callable< derived_type, IN, OUT, vsize >::operator() ( const cl_in_v in)
inline

Definition at line 321 of file unary_functor.h.

◆ operator()() [2/4]

template<class derived_type , typename IN , typename OUT = IN, size_t vsize = vspline::vector_traits < IN > :: size>
template<typename = std::enable_if < ( vsize > 1 ) >>
cl_out_v vspline::callable< derived_type, IN, OUT, vsize >::operator() ( const cl_in_v in) const
inline

Definition at line 312 of file unary_functor.h.

◆ operator()() [3/4]

template<class derived_type , typename IN , typename OUT = IN, size_t vsize = vspline::vector_traits < IN > :: size>
OUT vspline::callable< derived_type, IN, OUT, vsize >::operator() ( const IN &  in)
inline

Definition at line 303 of file unary_functor.h.

◆ operator()() [4/4]

template<class derived_type , typename IN , typename OUT = IN, size_t vsize = vspline::vector_traits < IN > :: size>
OUT vspline::callable< derived_type, IN, OUT, vsize >::operator() ( const IN &  in) const
inline

Definition at line 295 of file unary_functor.h.


The documentation for this struct was generated from the following file: