OmniSciDB  a5dc49c757
 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 51 of file misc.h.

References power().

Referenced by shared::inversePowersOf().

53  {
54  return {(1.0 / power(a, static_cast<double>(Indices)))...};
55 }
EXTENSION_NOINLINE double power(const double x, const double y)
constexpr double a
Definition: Utm.h:32

+ 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 39 of file misc.h.

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

39  {
40  return n ? a * power(a, n - 1) : static_cast<T>(1);
41 }
EXTENSION_NOINLINE double power(const double x, const double y)
constexpr double a
Definition: Utm.h:32
constexpr double n
Definition: Utm.h:38

+ 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 44 of file misc.h.

References power().

46  {
47  return {power(a, static_cast<T>(Indices))...};
48 }
EXTENSION_NOINLINE double power(const double x, const double y)
constexpr double a
Definition: Utm.h:32

+ Here is the call graph for this function: