mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add sprout/numeric/dft.wave.hpp
fix constexpr -> inline constexpr
This commit is contained in:
parent
e4a4d17207
commit
f9d4b475b4
69 changed files with 420 additions and 378 deletions
|
@ -82,7 +82,7 @@ namespace sprout {
|
|||
# undef SPROUT_WEED_BDIGITS_TABLE_DEF
|
||||
|
||||
template<typename IntType>
|
||||
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> bvalue_at(std::size_t i) {
|
||||
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> bvalue_at(std::size_t i) {
|
||||
return i < 2
|
||||
? sprout::tuples::tuple<IntType, bool>(
|
||||
static_cast<IntType>(sprout::weed::detail::bvalues<void>::table[i]),
|
||||
|
@ -95,7 +95,7 @@ namespace sprout {
|
|||
;
|
||||
}
|
||||
template<typename IntType, typename Elem>
|
||||
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_bdigit(Elem c) {
|
||||
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_bdigit(Elem c) {
|
||||
return sprout::weed::detail::bvalue_at<IntType>(
|
||||
NS_SSCRISK_CEL_OR_SPROUT::distance(
|
||||
sprout::weed::detail::bdigits<Elem>::table.begin(),
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace sprout {
|
|||
# undef SPROUT_WEED_DIGITS_TABLE_DEF
|
||||
|
||||
template<typename IntType>
|
||||
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> value_at(std::size_t i) {
|
||||
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> value_at(std::size_t i) {
|
||||
return i < 10
|
||||
? sprout::tuples::tuple<IntType, bool>(
|
||||
static_cast<IntType>(sprout::weed::detail::values<void>::table[i]),
|
||||
|
@ -95,7 +95,7 @@ namespace sprout {
|
|||
;
|
||||
}
|
||||
template<typename IntType, typename Elem>
|
||||
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_digit(Elem c) {
|
||||
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_digit(Elem c) {
|
||||
return sprout::weed::detail::value_at<IntType>(
|
||||
NS_SSCRISK_CEL_OR_SPROUT::distance(
|
||||
sprout::weed::detail::digits<Elem>::table.begin(),
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace sprout {
|
|||
namespace weed {
|
||||
namespace detail {
|
||||
template<std::size_t Radix, typename IntType, typename Elem>
|
||||
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_ndigit(
|
||||
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_ndigit(
|
||||
Elem c,
|
||||
typename std::enable_if<Radix == 10>::type* = 0
|
||||
)
|
||||
|
@ -22,7 +22,7 @@ namespace sprout {
|
|||
return sprout::weed::detail::from_digit<IntType>(c);
|
||||
}
|
||||
template<std::size_t Radix, typename IntType, typename Elem>
|
||||
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_ndigit(
|
||||
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_ndigit(
|
||||
Elem c,
|
||||
typename std::enable_if<Radix == 2>::type* = 0
|
||||
)
|
||||
|
@ -30,7 +30,7 @@ namespace sprout {
|
|||
return sprout::weed::detail::from_bdigit<IntType>(c);
|
||||
}
|
||||
template<std::size_t Radix, typename IntType, typename Elem>
|
||||
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_ndigit(
|
||||
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_ndigit(
|
||||
Elem c,
|
||||
typename std::enable_if<Radix == 8>::type* = 0
|
||||
)
|
||||
|
@ -38,7 +38,7 @@ namespace sprout {
|
|||
return sprout::weed::detail::from_odigit<IntType>(c);
|
||||
}
|
||||
template<std::size_t Radix, typename IntType, typename Elem>
|
||||
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_ndigit(
|
||||
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_ndigit(
|
||||
Elem c,
|
||||
typename std::enable_if<Radix == 16>::type* = 0
|
||||
)
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace sprout {
|
|||
# undef SPROUT_WEED_ODIGITS_TABLE_DEF
|
||||
|
||||
template<typename IntType>
|
||||
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> ovalue_at(std::size_t i) {
|
||||
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> ovalue_at(std::size_t i) {
|
||||
return i < 8
|
||||
? sprout::tuples::tuple<IntType, bool>(
|
||||
static_cast<IntType>(sprout::weed::detail::ovalues<void>::table[i]),
|
||||
|
@ -95,7 +95,7 @@ namespace sprout {
|
|||
;
|
||||
}
|
||||
template<typename IntType, typename Elem>
|
||||
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_odigit(Elem c) {
|
||||
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_odigit(Elem c) {
|
||||
return sprout::weed::detail::ovalue_at<IntType>(
|
||||
NS_SSCRISK_CEL_OR_SPROUT::distance(
|
||||
sprout::weed::detail::odigits<Elem>::table.begin(),
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace sprout {
|
|||
# undef SPROUT_WEED_XDIGITS_TABLE_DEF
|
||||
|
||||
template<typename IntType>
|
||||
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> xvalue_at(std::size_t i) {
|
||||
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> xvalue_at(std::size_t i) {
|
||||
return i < 22
|
||||
? sprout::tuples::tuple<IntType, bool>(
|
||||
static_cast<IntType>(sprout::weed::detail::xvalues<void>::table[i]),
|
||||
|
@ -95,7 +95,7 @@ namespace sprout {
|
|||
;
|
||||
}
|
||||
template<typename IntType, typename Elem>
|
||||
SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_xdigit(Elem c) {
|
||||
inline SPROUT_CONSTEXPR sprout::tuples::tuple<IntType, bool> from_xdigit(Elem c) {
|
||||
return sprout::weed::detail::xvalue_at<IntType>(
|
||||
NS_SSCRISK_CEL_OR_SPROUT::distance(
|
||||
sprout::weed::detail::xdigits<Elem>::table.begin(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue