24#ifndef UTILITY_ARITHMETIC_H
25#define UTILITY_ARITHMETIC_H
48 constexpr T
operator() (
const T& lhs,
const T& rhs)
const
50 return std::minus<T>()(lhs, rhs);
67struct plus :
public std::plus<T> {
92 constexpr T
operator() (
const T& base,
const T& exponent)
const
100template<
class T =
void>
struct maxOp {
113 template<
class T,
class U>
constexpr auto operator()(T&& t, U&& u)
const
114 ->
decltype(
util::max(std::forward<T>(t), std::forward<U>(u))) {
115 return util::max(std::forward<T>(t), std::forward<U>(u));
123template<
class T =
void>
struct minOp {
136 template<
class T,
class U>
constexpr auto operator()(T&& t, U&& u)
const
137 ->
decltype(
util::min(std::forward<T>(t), std::forward<U>(u))) {
138 return util::min(std::forward<T>(t), std::forward<U>(u));
cpu::simd::Pack< T > min(cpu::simd::Pack< T > rhs, cpu::simd::Pack< T > lhs)
cpu::simd::Pack< T > max(cpu::simd::Pack< T > rhs, cpu::simd::Pack< T > lhs)
cpu::simd::Pack< T > pow(cpu::simd::Pack< T > base, cpu::simd::Pack< T > exp)
Top level namespace for all of OpenLB.
Wrapper of function object std::divides.
static const char symbol
symbol character for functor naming
constexpr auto operator()(T &&t, U &&u) const -> decltype(util::max(std::forward< T >(t), std::forward< U >(u)))
Wrapper function object for util::max.
static const char symbol
symbol character for functor naming
constexpr T operator()(const T &x, const T &y) const
constexpr auto operator()(T &&t, U &&u) const -> decltype(util::min(std::forward< T >(t), std::forward< U >(u)))
Wrapper function object for util::min.
constexpr T operator()(const T &x, const T &y) const
static const char symbol
symbol character for functor naming
Wrapper of function object std::minus with special handling for bool.
constexpr T operator()(const T &lhs, const T &rhs) const
static const char symbol
symbol character for functor naming
Wrapper of function object std::multiplies.
static const char symbol
symbol character for functor naming
Wrapper of function object std::plus.
static const char symbol
symbol character for functor naming
static const char symbol
symbol character for functor naming
constexpr T operator()(const T &base, const T &exponent) const