OmniSciDB  ba1bac9284
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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...>)
 

Function Documentation

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

Definition at line 31 of file misc.h.

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

31  {
32  return n ? a * power(a, n - 1) : static_cast<T>(1);
33 }
EXTENSION_NOINLINE double power(const double x, const double y)

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

References power().

38  {
39  return {power(a, static_cast<T>(Indices))...};
40 }
EXTENSION_NOINLINE double power(const double x, const double y)

+ Here is the call graph for this function: