Hydra  4.0.1
A header-only templated C++ framework to perform data analysis on massively parallel platforms.
hydra::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature > Class Template Reference

#include <BaseCompositeFunctor.h>

Inheritance diagram for hydra::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >:
Collaboration diagram for hydra::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >:

Public Types

enum  { arity =detail::signature_traits<Signature>::arity }
 
typedef detail::signature_traits< Signature >::argument_type argument_type
 
typedef void hydra_functor_type
 
typedef detail::signature_traits< Signature >::return_type return_type
 
- Public Types inherited from hydra::detail::ParametersCompositeFunctor< F1, F2, Fs... >
typedef hydra::thrust::tuple< F1, F2, Fs... > functors_type
 

Public Member Functions

 BaseCompositeFunctor ()=delete
 Default constructor. More...
 
 BaseCompositeFunctor (F1 const &f1, F2 const &f2, Fs const &...fs)
 
__hydra_host__ __hydra_device__ BaseCompositeFunctor (BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature > const &other)
 Copy constructor. More...
 
__hydra_host__ __hydra_device__ GReal_t 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
 Function call operator overload taking a pack of parameters convertible to the lambda signature. More...
 
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) &&(hydra::thrust::detail::is_convertible< typename std::decay< T >::type, argument_type >::value), return_type >::type operator() (T x) const
 Unary function call operator overload taking a tuple containing the lambda arguments in any other. More...
 
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
 Unary function call operator overload taking a tuple containing the lambda arguments in any other. More...
 
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
 Binary function call operator overload taking two tuples containing the lambda arguments in any other. More...
 
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
 Binary function call operator overload taking one tuple and a non-tuple, that containing put together would contain the lambda arguments in any other. More...
 
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
 Binary function call operator overload taking one tuple and a non-tuple, that containing put together would contain the lambda arguments in any other. More...
 
__hydra_host__ __hydra_device__ BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature > & operator= (BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature > const &other)
 Assignment operator. More...
 
__hydra_host__ __hydra_device__ void SetNorm (GReal_t norm)
 
- Public Member Functions inherited from hydra::detail::ParametersCompositeFunctor< F1, F2, Fs... >
 ParametersCompositeFunctor ()=delete
 
 ParametersCompositeFunctor (F1 const &f0, F2 const &f1, Fs const &...fs)
 
__hydra_host__ __hydra_device__ ParametersCompositeFunctor (ParametersCompositeFunctor< F1, F2, Fs... > const &other)
 
virtual ~ParametersCompositeFunctor ()=default
 
void AddUserParameters (std::vector< hydra::Parameter * > &user_parameters)
 
hydra::thrust::tuple_element< I, functors_type >::type & GetFunctor (hydra::placeholders::placeholder< I > const &)
 
__hydra_host__ __hydra_device__ const functors_typeGetFunctors () const
 
size_t GetNumberOfParameters () const
 
const hydra::ParameterGetParameter (Int i) const
 
const hydra::ParameterGetParameter (const char *name) const
 
size_t GetParametersKey ()
 
__hydra_host__ __hydra_device__ ParametersCompositeFunctor< F1, F2, Fs... > & operator= (ParametersCompositeFunctor< F1, F2, Fs... > const &other)
 
hydra::ParameterParameter (Int i)
 
hydra::ParameterParameter (const char *name)
 
void PrintRegisteredParameters ()
 
void SetParameter (Int i, hydra::Parameter const &value)
 
void SetParameter (Int i, double value)
 
void SetParameter (const char *name, hydra::Parameter const &value)
 
void SetParameter (const char *name, double value)
 
void SetParameters (const std::vector< double > &parameters)
 
virtual void Update ()
 

Detailed Description

template<typename Composite, typename Signature, typename F1, typename F2, typename ... Fs>
class hydra::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >

Member Typedef Documentation

◆ argument_type

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
typedef detail::signature_traits<Signature>::argument_type hydra::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >::argument_type

◆ hydra_functor_type

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
typedef void hydra::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >::hydra_functor_type

◆ return_type

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
typedef detail::signature_traits<Signature>::return_type hydra::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >::return_type

Member Enumeration Documentation

◆ anonymous enum

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
anonymous enum
Enumerator
arity 

Constructor & Destructor Documentation

◆ BaseCompositeFunctor() [1/3]

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
hydra::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >::BaseCompositeFunctor ( )
delete

Default constructor.

◆ BaseCompositeFunctor() [2/3]

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
hydra::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >::BaseCompositeFunctor ( F1 const &  f1,
F2 const &  f2,
Fs const &...  fs 
)
inlineexplicit

◆ BaseCompositeFunctor() [3/3]

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
__hydra_host__ __hydra_device__ hydra::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >::BaseCompositeFunctor ( BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature > const &  other)
inline

Copy constructor.

Member Function Documentation

◆ GetNorm()

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
__hydra_host__ __hydra_device__ GReal_t hydra::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >::GetNorm ( ) const
inline

◆ operator()() [1/7]

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
template<typename ... T>
__hydra_host__ __hydra_device__ std::enable_if< (!detail::is_valid_type_pack< argument_type, T...>::value), return_type>::type hydra::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >::operator() ( T...  x) const
inline

◆ operator()() [2/7]

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
template<typename ... T>
__hydra_host__ __hydra_device__ std::enable_if< detail::is_valid_type_pack< argument_type, T...>::value, return_type>::type hydra::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >::operator() ( T...  x) const
inline

Function call operator overload taking a pack of parameters convertible to the lambda signature.

◆ operator()() [3/7]

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
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) && ( hydra::thrust::detail::is_convertible< typename std::decay<T>::type, argument_type >::value ), return_type >::type hydra::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >::operator() ( x) const
inline

Unary function call operator overload taking a tuple containing the lambda arguments in any other.

◆ operator()() [4/7]

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
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::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >::operator() ( x) const
inline

Unary function call operator overload taking a tuple containing the lambda arguments in any other.

◆ operator()() [5/7]

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
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::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >::operator() ( T1  x,
T2  y 
) const
inline

Binary function call operator overload taking two tuples containing the lambda arguments in any other.

◆ operator()() [6/7]

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
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::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >::operator() ( T1  x,
T2  y 
) const
inline

Binary function call operator overload taking one tuple and a non-tuple, that containing put together would contain the lambda arguments in any other.

◆ operator()() [7/7]

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
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::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >::operator() ( T2  y,
T1  x 
) const
inline

Binary function call operator overload taking one tuple and a non-tuple, that containing put together would contain the lambda arguments in any other.

◆ operator=()

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
__hydra_host__ __hydra_device__ BaseCompositeFunctor<Composite, hydra::thrust::tuple<F1, F2, Fs...>, Signature>& hydra::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >::operator= ( BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature > const &  other)
inline

Assignment operator.

◆ SetNorm()

template<typename Composite , typename Signature , typename F1 , typename F2 , typename ... Fs>
__hydra_host__ __hydra_device__ void hydra::BaseCompositeFunctor< Composite, hydra::thrust::tuple< F1, F2, Fs... >, Signature >::SetNorm ( GReal_t  norm)
inline

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