Hydra  4.0.1
A header-only templated C++ framework to perform data analysis on massively parallel platforms.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Generic

Generic types, definitions and algorithms. More...

Collaboration diagram for Generic:

Files

file  Hash.h
 
file  Types.h
 Common and useful typedefs.
 
file  TypeTraits.h
 

Data Structures

struct  hydra::Parameter
 
, More...
 

Functions

template<hydra::detail::Backend BACKEND, typename Iterator , typename Functor >
auto hydra::eval (hydra::detail::BackendPolicy< BACKEND >, Functor const &functor, Iterator begin, Iterator end) -> typename hydra::detail::BackendPolicy< BACKEND >::template container< typename Functor::return_type >
 Evaluate a hydra functor on a range using the parallel policy. More...
 
template<hydra::detail::Backend BACKEND, typename Iterator , typename ... Functors>
auto hydra::eval (hydra::detail::BackendPolicy< BACKEND >,hydra::thrust::tuple< Functors... > const &functors, Iterator begin, Iterator end) -> multivector< hydra::thrust::tuple< typename Functors::return_type ... >, hydra::detail::BackendPolicy< BACKEND >>
 Evaluate a tuple of hydra functors on a range using the parallel policy. More...
 
template<hydra::detail::Backend BACKEND, typename Functor , typename Iterator , typename ... Iterators>
auto hydra::eval (hydra::detail::BackendPolicy< BACKEND >, Functor const &functor, Iterator begin, Iterator end, Iterators... begins) -> typename hydra::detail::BackendPolicy< BACKEND >::template container< typename Functor::return_type >
 Evaluate a functor over a list of ranges. More...
 
template<hydra::detail::Backend BACKEND, typename Iterator , typename ... Iterators, typename ... Functors>
auto hydra::eval (hydra::detail::BackendPolicy< BACKEND >, hydra::thrust::tuple< Functors... > const &functors, Iterator begin, Iterator end, Iterators... begins) -> multivector< hydra::thrust::tuple< typename Functors::return_type ... >, hydra::detail::BackendPolicy< BACKEND > >
 Evaluate a tuple of functors over a list of ranges. More...
 

Detailed Description

Generic types, definitions and algorithms.


Data Structure Documentation

◆ hydra::Parameter

struct hydra::Parameter


,

This class represents named parameters that hold information of value, error, limits and implements the interface with ROOT::Minuit2.

hydra::Parameter instances are constructible, assignable and copiable in all backends, and because that the storage to hold the name needs be managed by the user (ex. no std::string support in CUDA). hydra::Parameter overloads the GReal_t operator()() and the arithmetic operators. hydra::Parameter instances can be constructed using named parameter semantic or parameter list semantic:

//using named parameter idiom
.Name(name)
.Value(3.0)
.Error(0.000)
.Limits(1.0, 4.0)
;
//using unnamed parameter idiom
Parameter mean(name, 3.0, 0.000, 1.0, 4.0);
Examples:
basic_fit_range_semantics.inl, binned_extended_logLL_fit.inl, breit_wigner_plus_polynomial.inl, crystal_ball_plus_exponential.inl, dalitz_plot.C, dalitz_plot.inl, double_gaussian_plus_exponential.inl, extended_logLL_fit.inl, fit_convoluted_pdfs.inl, fractional_logLL_fit.inl, gaussian_plus_argus.inl, multidimensional_fit.inl, pseudo_experiment.inl, and splot.inl.
Collaboration diagram for hydra::Parameter:

Public Member Functions

__hydra_host__ __hydra_device__ Parameter ()
 
__hydra_host__ __hydra_device__ Parameter (GReal_t value)
 
 Parameter (GChar_t const *const name, GReal_t value, GReal_t error, GReal_t downlim, GReal_t uplim, GBool_t fixed=0)
 
 Parameter (GChar_t const *name, GReal_t value, GReal_t error, GBool_t fixed=0)
 
 Parameter (std::string const &name, GReal_t value, GBool_t fixed=0)
 
__hydra_host__ __hydra_device__ Parameter (Parameter const &other)
 
__hydra_host__ ParameterError (GReal_t error)
 
__hydra_host__ ParameterFixed (GBool_t flag=1)
 
__hydra_host__ __hydra_device__ GReal_t GetError () const
 
__hydra_host__ __hydra_device__ unsigned int GetIndex () const
 
__hydra_host__ __hydra_device__ GReal_t GetLowerLim () const
 
__hydra_host__ __hydra_device__ GChar_t const * GetName () const
 
__hydra_host__ __hydra_device__ GReal_t GetUpperLim () const
 
__hydra_host__ __hydra_device__ GReal_t GetValue () const
 
__hydra_host__ __hydra_device__ GBool_t HasError () const
 
__hydra_host__ __hydra_device__ GBool_t IsFixed () const
 
__hydra_host__ __hydra_device__ GBool_t IsLimited () const
 
__hydra_host__ ParameterLimits (GReal_t lowlim, GReal_t uplim)
 
__hydra_host__ ParameterName (std::string const &name)
 
__hydra_host__ ParameterName (GChar_t const *name)
 
__hydra_host__ __hydra_device__ operator GReal_t ()
 
__hydra_host__ __hydra_device__ operator GReal_t () const
 
__hydra_host__ __hydra_device__ GReal_t operator() ()
 
__hydra_host__ __hydra_device__ GReal_t operator() () const
 
__hydra_host__ __hydra_device__ Parameteroperator*= (const GReal_t value)
 
__hydra_host__ __hydra_device__ Parameteroperator*= (Parameter const &other)
 
__hydra_host__ __hydra_device__ Parameteroperator+= (const GReal_t value)
 
__hydra_host__ __hydra_device__ Parameteroperator+= (Parameter const &other)
 
__hydra_host__ __hydra_device__ Parameteroperator-= (const GReal_t value)
 
__hydra_host__ __hydra_device__ Parameteroperator-= (Parameter const &other)
 
__hydra_host__ __hydra_device__ Parameteroperator/= (const GReal_t value)
 
__hydra_host__ __hydra_device__ Parameteroperator/= (Parameter const &other)
 
__hydra_host__ __hydra_device__ Parameteroperator= (Parameter const &other)
 
__hydra_host__ __hydra_device__ Parameteroperator= (const GReal_t value)
 
__hydra_host__ void Reset (const std::vector< double > &parameters)
 
__hydra_host__ __hydra_device__ void SetError (GReal_t error)
 
__hydra_host__ __hydra_device__ void SetFixed (GBool_t constant)
 
__hydra_host__ __hydra_device__ void SetHasError (GBool_t nullError)
 
__hydra_host__ __hydra_device__ void SetIndex (unsigned int index)
 
__hydra_host__ __hydra_device__ void SetLimited (GBool_t limited)
 
__hydra_host__ __hydra_device__ void SetLimits (GReal_t lower, GReal_t upper)
 
__hydra_host__ __hydra_device__ void SetLowerLim (GReal_t downLim)
 
__hydra_host__ void SetName (const std::string &name)
 
__hydra_host__ void SetName (const GChar_t *name)
 
__hydra_host__ __hydra_device__ void SetUpperLim (GReal_t upLim)
 
__hydra_host__ __hydra_device__ void SetValue (GReal_t value)
 
__hydra_host__ ParameterValue (GReal_t value)
 

Static Public Member Functions

static __hydra_host__ Parameter Create ()
 
static __hydra_host__ Parameter Create (GChar_t const *name)
 

Constructor & Destructor Documentation

◆ Parameter() [1/6]

__hydra_host__ __hydra_device__ hydra::Parameter::Parameter ( )
inline

◆ Parameter() [2/6]

__hydra_host__ __hydra_device__ hydra::Parameter::Parameter ( GReal_t  value)
inline

◆ Parameter() [3/6]

hydra::Parameter::Parameter ( GChar_t const *const  name,
GReal_t  value,
GReal_t  error,
GReal_t  downlim,
GReal_t  uplim,
GBool_t  fixed = 0 
)
inline

◆ Parameter() [4/6]

hydra::Parameter::Parameter ( GChar_t const *  name,
GReal_t  value,
GReal_t  error,
GBool_t  fixed = 0 
)
inline

◆ Parameter() [5/6]

hydra::Parameter::Parameter ( std::string const &  name,
GReal_t  value,
GBool_t  fixed = 0 
)
inline

◆ Parameter() [6/6]

__hydra_host__ __hydra_device__ hydra::Parameter::Parameter ( Parameter const &  other)
inline

Member Function Documentation

◆ Create() [1/2]

◆ Create() [2/2]

static __hydra_host__ Parameter hydra::Parameter::Create ( GChar_t const *  name)
inlinestatic

◆ Error()

◆ Fixed()

◆ GetError()

__hydra_host__ __hydra_device__ GReal_t hydra::Parameter::GetError ( ) const
inline

◆ GetIndex()

__hydra_host__ __hydra_device__ unsigned int hydra::Parameter::GetIndex ( ) const
inline

◆ GetLowerLim()

__hydra_host__ __hydra_device__ GReal_t hydra::Parameter::GetLowerLim ( ) const
inline

◆ GetName()

__hydra_host__ __hydra_device__ GChar_t const* hydra::Parameter::GetName ( ) const
inline

◆ GetUpperLim()

__hydra_host__ __hydra_device__ GReal_t hydra::Parameter::GetUpperLim ( ) const
inline

◆ GetValue()

__hydra_host__ __hydra_device__ GReal_t hydra::Parameter::GetValue ( ) const
inline

◆ HasError()

__hydra_host__ __hydra_device__ GBool_t hydra::Parameter::HasError ( ) const
inline

◆ IsFixed()

__hydra_host__ __hydra_device__ GBool_t hydra::Parameter::IsFixed ( ) const
inline

◆ IsLimited()

__hydra_host__ __hydra_device__ GBool_t hydra::Parameter::IsLimited ( ) const
inline

◆ Limits()

◆ Name() [1/2]

◆ Name() [2/2]

__hydra_host__ Parameter& hydra::Parameter::Name ( GChar_t const *  name)
inline

◆ operator GReal_t() [1/2]

__hydra_host__ __hydra_device__ hydra::Parameter::operator GReal_t ( )
inline

◆ operator GReal_t() [2/2]

__hydra_host__ __hydra_device__ hydra::Parameter::operator GReal_t ( ) const
inline

◆ operator()() [1/2]

__hydra_host__ __hydra_device__ GReal_t hydra::Parameter::operator() ( void  )
inline

◆ operator()() [2/2]

__hydra_host__ __hydra_device__ GReal_t hydra::Parameter::operator() ( void  ) const
inline

◆ operator*=() [1/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator*= ( const GReal_t  value)
inline

◆ operator*=() [2/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator*= ( Parameter const &  other)
inline

◆ operator+=() [1/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator+= ( const GReal_t  value)
inline

◆ operator+=() [2/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator+= ( Parameter const &  other)
inline

◆ operator-=() [1/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator-= ( const GReal_t  value)
inline

◆ operator-=() [2/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator-= ( Parameter const &  other)
inline

◆ operator/=() [1/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator/= ( const GReal_t  value)
inline

◆ operator/=() [2/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator/= ( Parameter const &  other)
inline

◆ operator=() [1/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator= ( Parameter const &  other)
inline

◆ operator=() [2/2]

__hydra_host__ __hydra_device__ Parameter& hydra::Parameter::operator= ( const GReal_t  value)
inline

◆ Reset()

__hydra_host__ void hydra::Parameter::Reset ( const std::vector< double > &  parameters)
inline

◆ SetError()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetError ( GReal_t  error)
inline

◆ SetFixed()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetFixed ( GBool_t  constant)
inline

◆ SetHasError()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetHasError ( GBool_t  nullError)
inline

◆ SetIndex()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetIndex ( unsigned int  index)
inline

◆ SetLimited()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetLimited ( GBool_t  limited)
inline

◆ SetLimits()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetLimits ( GReal_t  lower,
GReal_t  upper 
)
inline

◆ SetLowerLim()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetLowerLim ( GReal_t  downLim)
inline

◆ SetName() [1/2]

__hydra_host__ void hydra::Parameter::SetName ( const std::string &  name)
inline

◆ SetName() [2/2]

__hydra_host__ void hydra::Parameter::SetName ( const GChar_t name)
inline

◆ SetUpperLim()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetUpperLim ( GReal_t  upLim)
inline

◆ SetValue()

__hydra_host__ __hydra_device__ void hydra::Parameter::SetValue ( GReal_t  value)
inline

◆ Value()

Function Documentation

◆ eval() [1/4]

template<hydra::detail::Backend BACKEND, typename Iterator , typename Functor >
auto hydra::eval ( hydra::detail::BackendPolicy< BACKEND >  ,
Functor const &  functor,
Iterator  begin,
Iterator  end 
) -> typename hydra::detail::BackendPolicy< BACKEND >::template container< typename Functor::return_type >

#include <Evaluate.inl>

Evaluate a hydra functor on a range using the parallel policy.

Parameters
policy: parallel policy
functor: hydra functor to be evaluated
begin: interator pointing to be begin of the range
end: interator pointing to be begin of the range
Returns
a vector with the results

◆ eval() [2/4]

template<hydra::detail::Backend BACKEND, typename Iterator , typename ... Functors>
auto hydra::eval ( hydra::detail::BackendPolicy< BACKEND >  ,
hydra::thrust::tuple< Functors... > const &  functors,
Iterator  begin,
Iterator  end 
) -> multivector< hydra::thrust::tuple< typename Functors::return_type ... >, hydra::detail::BackendPolicy< BACKEND >>

#include <Evaluate.inl>

Evaluate a tuple of hydra functors on a range using the parallel policy.

Parameters
policy: parallel policy
functor: hydra functor to be evaluated
begin: interator pointing to be begin of the range
end: interator pointing to be begin of the range
Returns
a multivectors with the results

◆ eval() [3/4]

template<hydra::detail::Backend BACKEND, typename Functor , typename Iterator , typename ... Iterators>
auto hydra::eval ( hydra::detail::BackendPolicy< BACKEND >  ,
Functor const &  functor,
Iterator  begin,
Iterator  end,
Iterators...  begins 
) -> typename hydra::detail::BackendPolicy< BACKEND >::template container< typename Functor::return_type >

#include <Evaluate.inl>

Evaluate a functor over a list of ranges.

Parameters
policy: parallel policy
functor: hydra functor to be evaluated
begin: interator pointing to be begin of the range
end: interator pointing to be begin of the range
begins: interator pointing to be begin of the range
Returns
a multivectors with the results

◆ eval() [4/4]

template<hydra::detail::Backend BACKEND, typename Iterator , typename ... Iterators, typename ... Functors>
auto hydra::eval ( hydra::detail::BackendPolicy< BACKEND >  ,
hydra::thrust::tuple< Functors... > const &  functors,
Iterator  begin,
Iterator  end,
Iterators...  begins 
) -> multivector< hydra::thrust::tuple< typename Functors::return_type ... >, hydra::detail::BackendPolicy< BACKEND > >

#include <Evaluate.inl>

Evaluate a tuple of functors over a list of ranges.

Parameters
policy: parallel policy
functor: hydra functor to be evaluated
begin: interator pointing to be begin of the range
end: interator pointing to be begin of the range
begins: interator pointing to be begin of the range
Returns
a multivectors with the results