OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{misc.h} Namespace Reference

Functions

template<typename T >
constexpr T power (T const a, T const n)
 
template<typename T , size_t... Indices>
constexpr std::array< T,
sizeof...(Indices)> 
powersOfImpl (T const a, std::index_sequence< Indices...>)
 
template<size_t... Indices>
constexpr std::array< double,
sizeof...(Indices)> 
inversePowersOfImpl (double const a, std::index_sequence< Indices...>)
 

Function Documentation

template<size_t... Indices>
constexpr std::array<double, sizeof...(Indices)> anonymous_namespace{misc.h}::inversePowersOfImpl ( double const  a,
std::index_sequence< Indices...>   
)

Definition at line 47 of file misc.h.

References power().

Referenced by shared::inversePowersOf().

49  {
50  return {(1.0 / power(a, static_cast<double>(Indices)))...};
51 }
EXTENSION_NOINLINE double power(const double x, const double y)
constexpr double a
Definition: Utm.h:38

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename T >
constexpr T anonymous_namespace{misc.h}::power ( T const  a,
T const  n 
)

Definition at line 35 of file misc.h.

References power(), and omnisci.dtypes::T.

35  {
36  return n ? a * power(a, n - 1) : static_cast<T>(1);
37 }
EXTENSION_NOINLINE double power(const double x, const double y)
constexpr double a
Definition: Utm.h:38
constexpr double n
Definition: Utm.h:46

+ Here is the call graph for this function:

template<typename T , size_t... Indices>
constexpr std::array<T, sizeof...(Indices)> anonymous_namespace{misc.h}::powersOfImpl ( T const  a,
std::index_sequence< Indices...>   
)

Definition at line 40 of file misc.h.

References power().

42  {
43  return {power(a, static_cast<T>(Indices))...};
44 }
EXTENSION_NOINLINE double power(const double x, const double y)
constexpr double a
Definition: Utm.h:38

+ Here is the call graph for this function: