alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
math.hpp File Reference
#include "alpaka/core/common.hpp"
#include "alpaka/math/internal/stlMath.hpp"
#include <cmath>
#include <complex>
#include <type_traits>
#include "alpaka/math/internal/stlMathImpl.hpp"

Go to the source code of this file.

Namespaces

namespace  alpaka
 main alpaka namespace.
namespace  alpaka::math

Macros

#define ALPAKA_MATH_UNARY_FUNCTOR(FUNC_NAME, OP_NAME)

Macro Definition Documentation

◆ ALPAKA_MATH_UNARY_FUNCTOR

#define ALPAKA_MATH_UNARY_FUNCTOR ( FUNC_NAME,
OP_NAME )
Value:
struct FUNC_NAME \
{ \
template<typename T_MathImpl, typename T_Arg> \
struct Op \
{ \
constexpr auto operator()(T_MathImpl, T_Arg const& argument) const \
{ \
if constexpr(std::same_as<T_MathImpl, StlMath>) \
{ \
/* use for ADL lookup namespace std only if StlMath is used */ \
using std::OP_NAME; \
return OP_NAME(argument); \
} \
else \
return OP_NAME(argument); \
} \
}; \
}

Definition at line 19 of file math.hpp.