OmniSciDB  b28c0d5765
 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 50 of file misc.h.

References power().

Referenced by shared::inversePowersOf().

52  {
53  return {(1.0 / power(a, static_cast<double>(Indices)))...};
54 }
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 38 of file misc.h.

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

38  {
39  return n ? a * power(a, n - 1) : static_cast<T>(1);
40 }
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 43 of file misc.h.

References power().

45  {
46  return {power(a, static_cast<T>(Indices))...};
47 }
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: