upgrade_val< T1, T2 > Struct Template Reference
[Traits]

upgrade_val is used to ensure an operation such as multiplication is possible between two types. values are upgraded only where necessary. used by: glue_div::apply_mixed(), glue_minus::apply_mixed(), glue_plus::apply_mixed(), glue_schur::apply_mixed() and glue_times::apply_mixed() via gemm_mixed(). More...

#include <traits.hpp>

List of all members.

Public Types

typedef promote_type< T1, T2 >
::result 
T1_result
typedef promote_type< T1, T2 >
::result 
T2_result

Static Public Member Functions

static arma_inline const
promote_type< T1, T2 >::result 
apply (const T1 x)
static arma_inline const
promote_type< T1, T2 >::result 
apply (const T2 x)

Detailed Description

template<typename T1, typename T2>
struct upgrade_val< T1, T2 >

upgrade_val is used to ensure an operation such as multiplication is possible between two types. values are upgraded only where necessary. used by: glue_div::apply_mixed(), glue_minus::apply_mixed(), glue_plus::apply_mixed(), glue_schur::apply_mixed() and glue_times::apply_mixed() via gemm_mixed().

Definition at line 683 of file traits.hpp.


Member Typedef Documentation

template<typename T1, typename T2>
typedef promote_type<T1,T2>::result upgrade_val< T1, T2 >::T1_result

Definition at line 685 of file traits.hpp.

template<typename T1, typename T2>
typedef promote_type<T1,T2>::result upgrade_val< T1, T2 >::T2_result

Definition at line 686 of file traits.hpp.


Member Function Documentation

template<typename T1, typename T2>
static arma_inline const promote_type<T1,T2>::result upgrade_val< T1, T2 >::apply ( const T1  x  )  [inline, static]

Definition at line 691 of file traits.hpp.

00692     {
00693     typedef typename promote_type<T1,T2>::result out_type;
00694     return out_type(x);
00695     }

template<typename T1, typename T2>
static arma_inline const promote_type<T1,T2>::result upgrade_val< T1, T2 >::apply ( const T2  x  )  [inline, static]

Definition at line 700 of file traits.hpp.

00701     {
00702     typedef typename promote_type<T1,T2>::result out_type;
00703     return out_type(x);
00704     }