tfel
Loading...
Searching...
No Matches
BasicOperations.hxx File Reference

Classes

struct  tfel ::math::OpPlus
struct  tfel ::math::OpMinus
struct  tfel ::math::OpMult
struct  tfel ::math::OpDiv
struct  tfel ::math::OpNeg
struct  tfel ::math::OpDotProduct
struct  tfel ::math::OpDiadicProduct
struct  tfel::typetraits::IsUnaryOperator< tfel::math::OpNeg >
 partial Specialisation for OpNeg More...

Namespaces

namespace  tfel
 the namespace tfel encloses all the TFEL project. This namespace is empty.
namespace  tfel::math
 This namespace contains various classes and functions défining mathematical objects and numerical algorithms.

Concepts

concept  tfel ::math::BasicScalarBinaryOperationConcept
 an helpful concept for the partial specialization of the ResultType, ComputeBinaryResultType classes, etc.

Macros

#define TFEL_MATH_RESULT_TYPE_(X, Y)
#define TFEL_MATH_RESULT_TYPE(X)
#define TFEL_MATH_RESULT_TYPE_COMPLEX_(X, Y)
#define TFEL_MATH_RESULT_TYPE_COMPLEX(X)

Typedefs

template<typename X, typename Y>
using tfel::math::promote_type = typename tfel::typetraits::Promote<X, Y>::type

Functions

 tfel::math::TFEL_MATH_RESULT_TYPE (unsigned short)
 tfel::math::TFEL_MATH_RESULT_TYPE (unsigned int)
 tfel::math::TFEL_MATH_RESULT_TYPE (long unsigned int)
 tfel::math::TFEL_MATH_RESULT_TYPE (short)
 tfel::math::TFEL_MATH_RESULT_TYPE (int)
 tfel::math::TFEL_MATH_RESULT_TYPE (long int)
 tfel::math::TFEL_MATH_RESULT_TYPE (float)
 tfel::math::TFEL_MATH_RESULT_TYPE (double)
 tfel::math::TFEL_MATH_RESULT_TYPE (long double)
template<typename T>
requires ((tfel::typetraits::isScalar<T>()) && (!tfel::typetraits::IsComplex<T>::cond))
TFEL_HOST_DEVICE constexpr auto tfel::math::conj (const T src) noexcept
template<typename T>
requires ((tfel::typetraits::isScalar<T>()) && (!tfel::typetraits::IsComplex<T>::cond))
TFEL_HOST_DEVICE constexpr auto tfel::math::real (const T src) noexcept
 tfel::math::TFEL_MATH_RESULT_TYPE_COMPLEX (unsigned short)
 tfel::math::TFEL_MATH_RESULT_TYPE_COMPLEX (unsigned int)
 tfel::math::TFEL_MATH_RESULT_TYPE_COMPLEX (long unsigned int)
 tfel::math::TFEL_MATH_RESULT_TYPE_COMPLEX (short)
 tfel::math::TFEL_MATH_RESULT_TYPE_COMPLEX (int)
 tfel::math::TFEL_MATH_RESULT_TYPE_COMPLEX (long int)
 tfel::math::TFEL_MATH_RESULT_TYPE_COMPLEX (float)
 tfel::math::TFEL_MATH_RESULT_TYPE_COMPLEX (double)
 tfel::math::TFEL_MATH_RESULT_TYPE_COMPLEX (long double)

Detailed Description

Author
Thomas Helfer

Macro Definition Documentation

◆ TFEL_MATH_RESULT_TYPE

#define TFEL_MATH_RESULT_TYPE ( X)
Value:
TFEL_MATH_RESULT_TYPE_(X, unsigned short); \
TFEL_MATH_RESULT_TYPE_(X, unsigned int); \
TFEL_MATH_RESULT_TYPE_(X, long unsigned int); \
TFEL_MATH_RESULT_TYPE_(X, short); \
TFEL_MATH_RESULT_TYPE_(X, int); \
TFEL_MATH_RESULT_TYPE_(X, long int); \
TFEL_MATH_RESULT_TYPE_(X, float); \
TFEL_MATH_RESULT_TYPE_(X, double); \
TFEL_MATH_RESULT_TYPE_(X, long double); \ \
template <> \
struct ComputeUnaryOperationResult<ScalarTag, UnaryOperatorTag, X, OpNeg> { \
}; \ \
template <> \
struct ComputeUnaryOperationResult<ScalarTag, UnaryOperatorTag, Complex<X>, \
OpNeg> { \
typedef tfel::typetraits::Promote<Complex<X>, Complex<short>>::type type; \
}
Returns the greater type able to contain the type A and B.
Definition Promote.ixx:340
typename tfel::typetraits::internals::ChooseType< A, B, std::numeric_limits< A >::is_signed, std::numeric_limits< B >::is_signed >::type type
result
Definition Promote.ixx:342

◆ TFEL_MATH_RESULT_TYPE_

#define TFEL_MATH_RESULT_TYPE_ ( X,
Y )
Value:
\
template <> \
struct ComputeBinaryOperationResult<ScalarTag, ScalarTag, X, Y, OpPlus> { \
}; \ \
template <> \
struct ComputeBinaryOperationResult<ScalarTag, ScalarTag, X, Y, OpMinus> { \
}; \
\ \
template <> \
struct ComputeBinaryOperationResult<ScalarTag, ScalarTag, X, Y, OpMult> { \
}; \
\ \
template <> \
struct ComputeBinaryOperationResult<ScalarTag, ScalarTag, X, Y, OpDiv> { \
}

◆ TFEL_MATH_RESULT_TYPE_COMPLEX

#define TFEL_MATH_RESULT_TYPE_COMPLEX ( X)
Value:
TFEL_MATH_RESULT_TYPE_(X, Complex<X>); \
TFEL_MATH_RESULT_TYPE_(Complex<X>, X); \
TFEL_MATH_RESULT_TYPE_(Complex<X>, Complex<X>)

◆ TFEL_MATH_RESULT_TYPE_COMPLEX_

#define TFEL_MATH_RESULT_TYPE_COMPLEX_ ( X,
Y )
Value:
template <> \
struct ComputeBinaryOperationResult<ScalarTag, ScalarTag, X, Y, OpPlus> { \
}; \
\
template <> \
struct ComputeBinaryOperationResult<ScalarTag, ScalarTag, X, Y, OpMinus> { \
}; \
\
template <> \
struct ComputeBinaryOperationResult<ScalarTag, ScalarTag, X, Y, OpMult> { \
}; \
\
template <> \
struct ComputeBinaryOperationResult<ScalarTag, ScalarTag, X, Y, OpDiv> { \
}