Fermat
Public Types | Public Methods | List of all members
cugar::if_constant< T, R > Struct Template Reference

Detailed description

template<typename T, typename R>
struct cugar::if_constant< T, R >

A functor to select between two output values based on equality to a given constant

#include <functors.h>

Public Types

typedef unary_function_tag function_tag
 
typedef T argument_type
 
typedef R result_type
 

Public Methods

CUGAR_HOST_DEVICE if_constant (const T c, const R r0, const R r1)
 
CUGAR_HOST_DEVICE R operator() (const T &v) const
 

Constructor & Destructor Documentation

◆ if_constant()

template<typename T , typename R >
CUGAR_HOST_DEVICE cugar::if_constant< T, R >::if_constant ( const T  c,
const R  r0,
const R  r1 
)
inline

constructor

Parameters
cconstant value
r0true output value
r1false output value

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