Hydra  4.0.1
A header-only templated C++ framework to perform data analysis on massively parallel platforms.
hydra::Lambda< LambdaType, NPARAM > Class Template Reference

#include <Lambda.h>

Inheritance diagram for hydra::Lambda< LambdaType, NPARAM >:
Collaboration diagram for hydra::Lambda< LambdaType, NPARAM >:

Public Types

enum  { arity =detail::lambda_traits<LambdaType>::arity-2 }
 
typedef detail::trimmed_lambda_signature< typename detail::lambda_traits< LambdaType >::argument_type >::type argument_type
 
typedef void hydra_lambda_type
 
typedef detail::lambda_traits< LambdaType >::return_type return_type
 

Public Member Functions

 Lambda ()=delete
 
 Lambda (LambdaType const &lambda, std::initializer_list< Parameter > init_parameters)
 
 Lambda (LambdaType const &lambda, std::array< Parameter, NPARAM > const &init_parameters)
 
__hydra_host__ __hydra_device__ Lambda (Lambda< LambdaType, NPARAM > const &other)
 
__hydra_host__ __hydra_device__ LambdaType const & GetLambda () const
 
__hydra_host__ __hydra_device__ double GetNorm () const
 
template<typename ... T>
__hydra_host__ __hydra_device__ std::enable_if<(!detail::is_valid_type_pack< argument_type, T... >::value), return_type >::type operator() (T...x) const
 
template<typename ... T>
__hydra_host__ __hydra_device__ std::enable_if<(detail::is_valid_type_pack< argument_type, T... >::value), return_type >::type operator() (T...x) const
 
template<typename T >
__hydra_host__ __hydra_device__ std::enable_if<(detail::is_tuple_type< typename std::decay< T >::type >::value) &&(!detail::is_tuple_of_function_arguments< typename std::decay< T >::type >::value) &&(std::is_convertible< typename std::decay< T >::type, argument_rvalue_type >::value), return_type >::type operator() (T x) const
 
template<typename T >
__hydra_host__ __hydra_device__ std::enable_if<(detail::is_tuple_type< typename std::decay< T >::type >::value) &&(detail::is_tuple_of_function_arguments< typename std::decay< T >::type >::value), return_type >::type operator() (T x) const
 
template<typename T1 , typename T2 >
__hydra_host__ __hydra_device__ std::enable_if<(detail::is_tuple_type< typename std::decay< T1 >::type >::value) &&(detail::is_tuple_of_function_arguments< typename std::decay< T1 >::type >::value) &&(detail::is_tuple_type< typename std::decay< T2 >::type >::value) &&(detail::is_tuple_of_function_arguments< typename std::decay< T2 >::type >::value), return_type >::type operator() (T1 x, T2 y) const
 
template<typename T1 , typename T2 >
__hydra_host__ __hydra_device__ std::enable_if<(!detail::is_tuple_type< typename std::decay< T1 >::type >::value) &&(detail::is_function_argument< typename std::decay< T1 >::type >::value) &&(detail::is_tuple_type< typename std::decay< T2 >::type >::value) &&(detail::is_tuple_of_function_arguments< typename std::decay< T2 >::type >::value), return_type >::type operator() (T1 x, T2 y) const
 
template<typename T1 , typename T2 >
__hydra_host__ __hydra_device__ std::enable_if<(!detail::is_tuple_type< typename std::decay< T1 >::type >::value) &&(detail::is_function_argument< typename std::decay< T1 >::type >::value) &&(detail::is_tuple_type< typename std::decay< T2 >::type >::value) &&(detail::is_tuple_of_function_arguments< typename std::decay< T2 >::type >::value), return_type >::type operator() (T2 y, T1 x) const
 
template<typename T = LambdaType>
__hydra_host__ __hydra_device__ std::enable_if< std::is_copy_assignable< T >::value, Lambda< T, NPARAM > & >::type operator= (Lambda< T, NPARAM > const &other)
 
void PrintRegisteredParameters ()
 
__hydra_host__ __hydra_device__ void SetNorm (double norm)
 
- Public Member Functions inherited from hydra::detail::Parameters< NPARAM >
 Parameters ()=default
 
 Parameters (std::initializer_list< hydra::Parameter > init_parameters)
 
 Parameters (std::array< hydra::Parameter, N > const &init_parameters)
 
__hydra_host__ __hydra_device__ Parameters (hydra::Parameter(&init_parameters)[N])
 
__hydra_host__ __hydra_device__ Parameters (Parameters< N > const &other)
 
void AddUserParameters (std::vector< hydra::Parameter * > &user_parameters)
 
__hydra_host__ __hydra_device__ size_t GetNumberOfParameters () const
 
__hydra_host__ __hydra_device__ const hydra::ParameterGetParameter (Int i) const
 
__hydra_host__ const hydra::ParameterGetParameter (const char *name) const
 
__hydra_host__ __hydra_device__ const hydra::ParameterGetParameters () const
 
size_t GetParametersKey ()
 
__hydra_host__ __hydra_device__ Parameters< N > & operator= (Parameters< N > const &other)
 
__hydra_host__ __hydra_device__ GReal_t operator[] (Int i) const
 
__hydra_host__ __hydra_device__ hydra::ParameterParameter (Int i)
 
__hydra_host__ hydra::ParameterParameter (const char *name)
 
void PrintParameters ()
 Print registered parameters. More...
 
__hydra_host__ __hydra_device__ void SetParameter (Int i, hydra::Parameter const &value)
 
__hydra_host__ __hydra_device__ void SetParameter (Int i, double value)
 
__hydra_host__ void SetParameter (const char *name, hydra::Parameter const &value)
 
__hydra_host__ void SetParameter (const char *name, double value)
 
__hydra_host__ void SetParameters (const std::vector< double > &parameters)
 Set parameters. More...
 
virtual void Update (void)
 This method offers an opportunity to redo calculations and update values that depends only on the functor parameters. More...
 

Additional Inherited Members

- Static Public Attributes inherited from hydra::detail::Parameters< NPARAM >
static const size_t parameter_count
 

Detailed Description

template<typename LambdaType, size_t NPARAM>
class hydra::Lambda< LambdaType, NPARAM >

Member Typedef Documentation

◆ argument_type

template<typename LambdaType , size_t NPARAM>
typedef detail::trimmed_lambda_signature<typename detail::lambda_traits<LambdaType>::argument_type>::type hydra::Lambda< LambdaType, NPARAM >::argument_type

◆ hydra_lambda_type

template<typename LambdaType , size_t NPARAM>
typedef void hydra::Lambda< LambdaType, NPARAM >::hydra_lambda_type

◆ return_type

template<typename LambdaType , size_t NPARAM>
typedef detail::lambda_traits<LambdaType>::return_type hydra::Lambda< LambdaType, NPARAM >::return_type

Member Enumeration Documentation

◆ anonymous enum

template<typename LambdaType , size_t NPARAM>
anonymous enum
Enumerator
arity 

Constructor & Destructor Documentation

◆ Lambda() [1/4]

template<typename LambdaType , size_t NPARAM>
hydra::Lambda< LambdaType, NPARAM >::Lambda ( )
explicitdelete

◆ Lambda() [2/4]

template<typename LambdaType , size_t NPARAM>
hydra::Lambda< LambdaType, NPARAM >::Lambda ( LambdaType const &  lambda,
std::initializer_list< Parameter init_parameters 
)
inline

◆ Lambda() [3/4]

template<typename LambdaType , size_t NPARAM>
hydra::Lambda< LambdaType, NPARAM >::Lambda ( LambdaType const &  lambda,
std::array< Parameter, NPARAM > const &  init_parameters 
)
inline

◆ Lambda() [4/4]

template<typename LambdaType , size_t NPARAM>
__hydra_host__ __hydra_device__ hydra::Lambda< LambdaType, NPARAM >::Lambda ( Lambda< LambdaType, NPARAM > const &  other)
inline

Member Function Documentation

◆ GetLambda()

template<typename LambdaType , size_t NPARAM>
__hydra_host__ __hydra_device__ LambdaType const& hydra::Lambda< LambdaType, NPARAM >::GetLambda ( ) const
inline

◆ GetNorm()

template<typename LambdaType , size_t NPARAM>
__hydra_host__ __hydra_device__ double hydra::Lambda< LambdaType, NPARAM >::GetNorm ( ) const
inline

◆ operator()() [1/7]

template<typename LambdaType , size_t NPARAM>
template<typename ... T>
__hydra_host__ __hydra_device__ std::enable_if< (!detail::is_valid_type_pack<argument_type, T...>::value), return_type>::type hydra::Lambda< LambdaType, NPARAM >::operator() ( T...  x) const
inline

◆ operator()() [2/7]

template<typename LambdaType , size_t NPARAM>
template<typename ... T>
__hydra_host__ __hydra_device__ std::enable_if< (detail::is_valid_type_pack<argument_type, T...>::value), return_type>::type hydra::Lambda< LambdaType, NPARAM >::operator() ( T...  x) const
inline

◆ operator()() [3/7]

template<typename LambdaType , size_t NPARAM>
template<typename T >
__hydra_host__ __hydra_device__ std::enable_if< ( detail::is_tuple_type< typename std::decay<T>::type >::value ) && (!detail::is_tuple_of_function_arguments< typename std::decay<T>::type >::value) && ( std::is_convertible<typename std::decay<T>::type, argument_rvalue_type>::value ), return_type >::type hydra::Lambda< LambdaType, NPARAM >::operator() ( x) const
inline

◆ operator()() [4/7]

template<typename LambdaType , size_t NPARAM>
template<typename T >
__hydra_host__ __hydra_device__ std::enable_if< ( detail::is_tuple_type<typename std::decay<T>::type>::value ) && ( detail::is_tuple_of_function_arguments< typename std::decay<T>::type >::value), return_type>::type hydra::Lambda< LambdaType, NPARAM >::operator() ( x) const
inline

◆ operator()() [5/7]

template<typename LambdaType , size_t NPARAM>
template<typename T1 , typename T2 >
__hydra_host__ __hydra_device__ std::enable_if< ( detail::is_tuple_type<typename std::decay<T1>::type>::value ) && ( detail::is_tuple_of_function_arguments< typename std::decay<T1>::type >::value ) && ( detail::is_tuple_type<typename std::decay<T2>::type>::value ) && ( detail::is_tuple_of_function_arguments< typename std::decay<T2>::type >::value ) , return_type>::type hydra::Lambda< LambdaType, NPARAM >::operator() ( T1  x,
T2  y 
) const
inline

◆ operator()() [6/7]

template<typename LambdaType , size_t NPARAM>
template<typename T1 , typename T2 >
__hydra_host__ __hydra_device__ std::enable_if< (!detail::is_tuple_type< typename std::decay<T1>::type>::value ) && ( detail::is_function_argument< typename std::decay<T1>::type >::value ) && ( detail::is_tuple_type< typename std::decay<T2>::type>::value ) && ( detail::is_tuple_of_function_arguments< typename std::decay<T2>::type >::value ), return_type>::type hydra::Lambda< LambdaType, NPARAM >::operator() ( T1  x,
T2  y 
) const
inline

◆ operator()() [7/7]

template<typename LambdaType , size_t NPARAM>
template<typename T1 , typename T2 >
__hydra_host__ __hydra_device__ std::enable_if< (!detail::is_tuple_type< typename std::decay<T1>::type>::value ) && ( detail::is_function_argument< typename std::decay<T1>::type >::value ) && ( detail::is_tuple_type< typename std::decay<T2>::type>::value ) && ( detail::is_tuple_of_function_arguments< typename std::decay<T2>::type >::value ), return_type>::type hydra::Lambda< LambdaType, NPARAM >::operator() ( T2  y,
T1  x 
) const
inline

◆ operator=()

template<typename LambdaType , size_t NPARAM>
template<typename T = LambdaType>
__hydra_host__ __hydra_device__ std::enable_if<std::is_copy_assignable<T>::value, Lambda<T, NPARAM>&>::type hydra::Lambda< LambdaType, NPARAM >::operator= ( Lambda< T, NPARAM > const &  other)
inline

◆ PrintRegisteredParameters()

template<typename LambdaType , size_t NPARAM>
void hydra::Lambda< LambdaType, NPARAM >::PrintRegisteredParameters ( )
inline

◆ SetNorm()

template<typename LambdaType , size_t NPARAM>
__hydra_host__ __hydra_device__ void hydra::Lambda< LambdaType, NPARAM >::SetNorm ( double  norm)
inline

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