KASKADE 7 development version
Loading...
Searching...
No Matches
Kaskade::ScalarTraits< Scalar > Class Template Reference

Helper class for working with (real or complex) scalar field types. More...

#include <scalar.hh>

Public Types

typedef Scalar Real
 The real type on which the scalar field is based.

Static Public Member Functions

static Real real (Scalar const &s)
 Conversion to the real type, ignoring the imaginary part if nonzero.

Static Public Attributes

static bool const isBLAStype = std::is_same_v<Scalar,float> || std::is_same_v<Scalar,double>
 Whether the scalar is BLAS/LAPACK compatible or not.

Detailed Description

template<class Scalar>
class Kaskade::ScalarTraits< Scalar >

Helper class for working with (real or complex) scalar field types.

Definition at line 35 of file scalar.hh.

Member Typedef Documentation

◆ Real

template<class Scalar>
typedef Scalar Kaskade::ScalarTraits< Scalar >::Real

The real type on which the scalar field is based.

For real types such as float or double, this is just Scalar. For complex types such as std::complex<T>, this is T.

Definition at line 49 of file scalar.hh.

Member Function Documentation

◆ real()

template<class Scalar>
Real Kaskade::ScalarTraits< Scalar >::real ( Scalar const & s)
inlinestatic

Conversion to the real type, ignoring the imaginary part if nonzero.

Definition at line 54 of file scalar.hh.

Member Data Documentation

◆ isBLAStype

template<class Scalar>
bool const Kaskade::ScalarTraits< Scalar >::isBLAStype = std::is_same_v<Scalar,float> || std::is_same_v<Scalar,double>
static

Whether the scalar is BLAS/LAPACK compatible or not.

Definition at line 41 of file scalar.hh.


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