commit 3a4ad10a33f0ff9be3fdcf3ed27eb4461960bbe5
parent e720dc9ca869de8f49ed9be75e5e93ce78416b5b
Author: d.levin256@gmail.com <d.levin256@gmail.com>
Date: Wed, 20 Jul 2016 20:11:00 +0300
Code cleanup and formatting
Diffstat:
16 files changed, 38 insertions(+), 151 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -71,3 +71,6 @@ docs/
# CLion
.idea/
+
+
+*.TMP
+\ No newline at end of file
diff --git a/include/kfr/all.hpp b/include/kfr/all.hpp
@@ -32,6 +32,7 @@
#include "base/dispatch.hpp"
#include "base/function.hpp"
#include "base/gamma.hpp"
+#include "base/hyperbolic.hpp"
#include "base/log_exp.hpp"
#include "base/logical.hpp"
#include "base/memory.hpp"
@@ -43,7 +44,6 @@
#include "base/select.hpp"
#include "base/shuffle.hpp"
#include "base/sin_cos.hpp"
-#include "kfr/base/hyperbolic.hpp"
#include "base/sqrt.hpp"
#include "base/tan.hpp"
#include "base/types.hpp"
diff --git a/include/kfr/base/asin_acos.hpp b/include/kfr/base/asin_acos.hpp
@@ -71,14 +71,12 @@ namespace native
{
using fn_asin = internal::in_asin_acos<>::fn_asin;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> asin(const T1& x)
{
return internal::in_asin_acos<>::asin(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_asin, E1> asin(E1&& x)
{
return { fn_asin(), std::forward<E1>(x) };
@@ -86,14 +84,12 @@ KFR_INTRIN expr_func<fn_asin, E1> asin(E1&& x)
using fn_acos = internal::in_asin_acos<>::fn_acos;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> acos(const T1& x)
{
return internal::in_asin_acos<>::acos(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_acos, E1> acos(E1&& x)
{
return { fn_acos(), std::forward<E1>(x) };
diff --git a/include/kfr/base/complex.hpp b/include/kfr/base/complex.hpp
@@ -25,12 +25,12 @@
#include "atan.hpp"
#include "constants.hpp"
#include "function.hpp"
+#include "hyperbolic.hpp"
#include "log_exp.hpp"
#include "min_max.hpp"
#include "operators.hpp"
#include "select.hpp"
#include "sin_cos.hpp"
-#include "hyperbolic.hpp"
#include "sqrt.hpp"
#pragma clang diagnostic push
diff --git a/include/kfr/base/gamma.hpp b/include/kfr/base/gamma.hpp
@@ -75,14 +75,12 @@ namespace native
{
using fn_gamma = internal::in_gamma<>::fn_gamma;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> gamma(const T1& x)
{
return internal::in_gamma<>::gamma(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_gamma, E1> gamma(E1&& x)
{
return { fn_gamma(), std::forward<E1>(x) };
@@ -90,14 +88,12 @@ KFR_INTRIN expr_func<fn_gamma, E1> gamma(E1&& x)
using fn_factorial_approx = internal::in_gamma<>::fn_factorial_approx;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> factorial_approx(const T1& x)
{
return internal::in_gamma<>::factorial_approx(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_factorial_approx, E1> factorial_approx(E1&& x)
{
return { fn_factorial_approx(), std::forward<E1>(x) };
diff --git a/include/kfr/base/log_exp.hpp b/include/kfr/base/log_exp.hpp
@@ -360,14 +360,12 @@ namespace native
{
using fn_exp = internal::in_log_exp<>::fn_exp;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> exp(const T1& x)
{
return internal::in_log_exp<>::exp(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_exp, E1> exp(E1&& x)
{
return { fn_exp(), std::forward<E1>(x) };
@@ -375,14 +373,12 @@ KFR_INTRIN expr_func<fn_exp, E1> exp(E1&& x)
using fn_exp2 = internal::in_log_exp<>::fn_exp2;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> exp2(const T1& x)
{
return internal::in_log_exp<>::exp2(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_exp2, E1> exp2(E1&& x)
{
return { fn_exp2(), std::forward<E1>(x) };
@@ -390,14 +386,12 @@ KFR_INTRIN expr_func<fn_exp2, E1> exp2(E1&& x)
using fn_exp10 = internal::in_log_exp<>::fn_exp10;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> exp10(const T1& x)
{
return internal::in_log_exp<>::exp10(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_exp10, E1> exp10(E1&& x)
{
return { fn_exp10(), std::forward<E1>(x) };
@@ -405,14 +399,12 @@ KFR_INTRIN expr_func<fn_exp10, E1> exp10(E1&& x)
using fn_log = internal::in_log_exp<>::fn_log;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> log(const T1& x)
{
return internal::in_log_exp<>::log(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_log, E1> log(E1&& x)
{
return { fn_log(), std::forward<E1>(x) };
@@ -420,14 +412,12 @@ KFR_INTRIN expr_func<fn_log, E1> log(E1&& x)
using fn_log2 = internal::in_log_exp<>::fn_log2;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> log2(const T1& x)
{
return internal::in_log_exp<>::log2(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_log2, E1> log2(E1&& x)
{
return { fn_log2(), std::forward<E1>(x) };
@@ -435,14 +425,12 @@ KFR_INTRIN expr_func<fn_log2, E1> log2(E1&& x)
using fn_log10 = internal::in_log_exp<>::fn_log10;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> log10(const T1& x)
{
return internal::in_log_exp<>::log10(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_log10, E1> log10(E1&& x)
{
return { fn_log10(), std::forward<E1>(x) };
@@ -450,14 +438,12 @@ KFR_INTRIN expr_func<fn_log10, E1> log10(E1&& x)
using fn_logb = internal::in_log_exp<>::fn_logb;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> logb(const T1& x)
{
return internal::in_log_exp<>::logb(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_logb, E1> logb(E1&& x)
{
return { fn_logb(), std::forward<E1>(x) };
@@ -465,14 +451,12 @@ KFR_INTRIN expr_func<fn_logb, E1> logb(E1&& x)
using fn_logn = internal::in_log_exp<>::fn_logn;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> logn(const T1& x)
{
return internal::in_log_exp<>::logn(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_logn, E1> logn(E1&& x)
{
return { fn_logn(), std::forward<E1>(x) };
@@ -480,14 +464,12 @@ KFR_INTRIN expr_func<fn_logn, E1> logn(E1&& x)
using fn_logm = internal::in_log_exp<>::fn_logm;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> logm(const T1& x)
{
return internal::in_log_exp<>::logm(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_logm, E1> logm(E1&& x)
{
return { fn_logm(), std::forward<E1>(x) };
@@ -495,9 +477,7 @@ KFR_INTRIN expr_func<fn_logm, E1> logm(E1&& x)
using fn_exp_fmadd = internal::in_log_exp<>::fn_exp_fmadd;
template <typename T1, typename T2, typename T3, KFR_ENABLE_IF(is_numeric_args<T1, T2, T3>::value)>
-KFR_INLINE ftype<common_type<T1, T2, T3>>
-
-exp_fmadd(const T1& x, const T2& m, const T3& a)
+KFR_INLINE ftype<common_type<T1, T2, T3>> exp_fmadd(const T1& x, const T2& m, const T3& a)
{
return internal::in_log_exp<>::exp_fmadd(x, m, a);
}
@@ -509,9 +489,7 @@ KFR_INLINE expr_func<fn_exp_fmadd, E1, E2, E3> exp_fmadd(E1&& x, E2&& m, E3&& a)
}
using fn_log_fmadd = internal::in_log_exp<>::fn_log_fmadd;
template <typename T1, typename T2, typename T3, KFR_ENABLE_IF(is_numeric_args<T1, T2, T3>::value)>
-KFR_INLINE ftype<common_type<T1, T2, T3>>
-
-log_fmadd(const T1& x, const T2& m, const T3& a)
+KFR_INLINE ftype<common_type<T1, T2, T3>> log_fmadd(const T1& x, const T2& m, const T3& a)
{
return internal::in_log_exp<>::log_fmadd(x, m, a);
}
@@ -519,16 +497,12 @@ log_fmadd(const T1& x, const T2& m, const T3& a)
template <typename E1, typename E2, typename E3, KFR_ENABLE_IF(is_input_expressions<E1, E2, E3>::value)>
KFR_INLINE expr_func<fn_log_fmadd, E1, E2, E3> log_fmadd(E1&& x, E2&& m, E3&& a)
{
- return { fn_log_fmadd(), std::forward<E1>(x), std::forward<E2>(m), std::forward<E3>(a)
-
- };
+ return { fn_log_fmadd(), std::forward<E1>(x), std::forward<E2>(m), std::forward<E3>(a) };
}
using fn_pow = internal::in_log_exp<>::fn_pow;
template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
-KFR_INLINE ftype<common_type<T1, T2>>
-
-pow(const T1& x, const T2& b)
+KFR_INLINE ftype<common_type<T1, T2>> pow(const T1& x, const T2& b)
{
return internal::in_log_exp<>::pow(x, b);
}
@@ -540,9 +514,7 @@ KFR_INLINE expr_func<fn_pow, E1, E2> pow(E1&& x, E2&& b)
}
using fn_root = internal::in_log_exp<>::fn_root;
template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
-KFR_INLINE ftype<common_type<T1, T2>>
-
-root(const T1& x, const T2& b)
+KFR_INLINE ftype<common_type<T1, T2>> root(const T1& x, const T2& b)
{
return internal::in_log_exp<>::root(x, b);
}
@@ -550,21 +522,17 @@ root(const T1& x, const T2& b)
template <typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>::value)>
KFR_INLINE expr_func<fn_root, E1, E2> root(E1&& x, E2&& b)
{
- return { fn_root(), std::forward<E1>(x), std::forward<E2>(b)
-
- };
+ return { fn_root(), std::forward<E1>(x), std::forward<E2>(b) };
}
using fn_cbrt = internal::in_log_exp<>::fn_cbrt;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> cbrt(const T1& x)
{
return internal::in_log_exp<>::cbrt(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_cbrt, E1> cbrt(E1&& x)
{
return { fn_cbrt(), std::forward<E1>(x) };
diff --git a/include/kfr/base/logical.hpp b/include/kfr/base/logical.hpp
@@ -277,14 +277,12 @@ namespace native
{
using fn_bittestnone = internal::in_bittest<>::fn_bittestnone;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> bittestnone(const T1& x)
{
return internal::in_bittest<>::bittestnone(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_bittestnone, E1> bittestnone(E1&& x)
{
return { fn_bittestnone(), std::forward<E1>(x) };
@@ -292,14 +290,12 @@ KFR_INTRIN expr_func<fn_bittestnone, E1> bittestnone(E1&& x)
using fn_bittestall = internal::in_bittest<>::fn_bittestall;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> bittestall(const T1& x)
{
return internal::in_bittest<>::bittestall(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_bittestall, E1> bittestall(E1&& x)
{
return { fn_bittestall(), std::forward<E1>(x) };
@@ -307,9 +303,7 @@ KFR_INTRIN expr_func<fn_bittestall, E1> bittestall(E1&& x)
using fn_bittestnone = internal::in_bittest<>::fn_bittestnone;
template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
-KFR_INLINE ftype<common_type<T1, T2>>
-
-bittestnone(const T1& x, const T2& y)
+KFR_INLINE ftype<common_type<T1, T2>> bittestnone(const T1& x, const T2& y)
{
return internal::in_bittest<>::bittestnone(x, y);
}
@@ -321,9 +315,7 @@ KFR_INLINE expr_func<fn_bittestnone, E1, E2> bittestnone(E1&& x, E2&& y)
}
using fn_bittestall = internal::in_bittest<>::fn_bittestall;
template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
-KFR_INLINE ftype<common_type<T1, T2>>
-
-bittestall(const T1& x, const T2& y)
+KFR_INLINE ftype<common_type<T1, T2>> bittestall(const T1& x, const T2& y)
{
return internal::in_bittest<>::bittestall(x, y);
}
@@ -331,9 +323,7 @@ bittestall(const T1& x, const T2& y)
template <typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>::value)>
KFR_INLINE expr_func<fn_bittestall, E1, E2> bittestall(E1&& x, E2&& y)
{
- return { fn_bittestall(), std::forward<E1>(x), std::forward<E2>(y)
-
- };
+ return { fn_bittestall(), std::forward<E1>(x), std::forward<E2>(y) };
}
}
}
diff --git a/include/kfr/base/min_max.hpp b/include/kfr/base/min_max.hpp
@@ -256,9 +256,7 @@ namespace native
{
using fn_min = internal::in_min_max<>::fn_min;
template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
-KFR_INLINE ftype<common_type<T1, T2>>
-
-min(const T1& x, const T2& y)
+KFR_INLINE ftype<common_type<T1, T2>> min(const T1& x, const T2& y)
{
return internal::in_min_max<>::min(x, y);
}
@@ -270,9 +268,7 @@ KFR_INLINE expr_func<fn_min, E1, E2> min(E1&& x, E2&& y)
}
using fn_max = internal::in_min_max<>::fn_max;
template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
-KFR_INLINE ftype<common_type<T1, T2>>
-
-max(const T1& x, const T2& y)
+KFR_INLINE ftype<common_type<T1, T2>> max(const T1& x, const T2& y)
{
return internal::in_min_max<>::max(x, y);
}
@@ -280,15 +276,11 @@ max(const T1& x, const T2& y)
template <typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>::value)>
KFR_INLINE expr_func<fn_max, E1, E2> max(E1&& x, E2&& y)
{
- return { fn_max(), std::forward<E1>(x), std::forward<E2>(y)
-
- };
+ return { fn_max(), std::forward<E1>(x), std::forward<E2>(y) };
}
using fn_minabs = internal::in_minabs_maxabs<>::fn_minabs;
template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
-KFR_INLINE ftype<common_type<T1, T2>>
-
-minabs(const T1& x, const T2& y)
+KFR_INLINE ftype<common_type<T1, T2>> minabs(const T1& x, const T2& y)
{
return internal::in_minabs_maxabs<>::minabs(x, y);
}
@@ -296,15 +288,11 @@ minabs(const T1& x, const T2& y)
template <typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>::value)>
KFR_INLINE expr_func<fn_minabs, E1, E2> minabs(E1&& x, E2&& y)
{
- return { fn_minabs(), std::forward<E1>(x), std::forward<E2>(y)
-
- };
+ return { fn_minabs(), std::forward<E1>(x), std::forward<E2>(y) };
}
using fn_maxabs = internal::in_minabs_maxabs<>::fn_maxabs;
template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
-KFR_INLINE ftype<common_type<T1, T2>>
-
-maxabs(const T1& x, const T2& y)
+KFR_INLINE ftype<common_type<T1, T2>> maxabs(const T1& x, const T2& y)
{
return internal::in_minabs_maxabs<>::maxabs(x, y);
}
@@ -312,15 +300,11 @@ maxabs(const T1& x, const T2& y)
template <typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>::value)>
KFR_INLINE expr_func<fn_maxabs, E1, E2> maxabs(E1&& x, E2&& y)
{
- return { fn_maxabs(), std::forward<E1>(x), std::forward<E2>(y)
-
- };
+ return { fn_maxabs(), std::forward<E1>(x), std::forward<E2>(y) };
}
using fn_clamp = internal::in_clamp<>::fn_clamp;
template <typename T1, typename T2, typename T3, KFR_ENABLE_IF(is_numeric_args<T1, T2, T3>::value)>
-KFR_INLINE ftype<common_type<T1, T2, T3>>
-
-clamp(const T1& x, const T2& l, const T3& h)
+KFR_INLINE ftype<common_type<T1, T2, T3>> clamp(const T1& x, const T2& l, const T3& h)
{
return internal::in_clamp<>::clamp(x, l, h);
}
@@ -328,15 +312,11 @@ clamp(const T1& x, const T2& l, const T3& h)
template <typename E1, typename E2, typename E3, KFR_ENABLE_IF(is_input_expressions<E1, E2, E3>::value)>
KFR_INLINE expr_func<fn_clamp, E1, E2, E3> clamp(E1&& x, E2&& l, E3&& h)
{
- return { fn_clamp(), std::forward<E1>(x), std::forward<E2>(l), std::forward<E3>(h)
-
- };
+ return { fn_clamp(), std::forward<E1>(x), std::forward<E2>(l), std::forward<E3>(h) };
}
using fn_clampm1 = internal::in_clamp<>::fn_clampm1;
template <typename T1, typename T2, typename T3, KFR_ENABLE_IF(is_numeric_args<T1, T2, T3>::value)>
-KFR_INLINE ftype<common_type<T1, T2, T3>>
-
-clampm1(const T1& x, const T2& l, const T3& h)
+KFR_INLINE ftype<common_type<T1, T2, T3>> clampm1(const T1& x, const T2& l, const T3& h)
{
return internal::in_clamp<>::clampm1(x, l, h);
}
@@ -344,16 +324,12 @@ clampm1(const T1& x, const T2& l, const T3& h)
template <typename E1, typename E2, typename E3, KFR_ENABLE_IF(is_input_expressions<E1, E2, E3>::value)>
KFR_INLINE expr_func<fn_clampm1, E1, E2, E3> clampm1(E1&& x, E2&& l, E3&& h)
{
- return { fn_clampm1(), std::forward<E1>(x), std::forward<E2>(l), std::forward<E3>(h)
-
- };
+ return { fn_clampm1(), std::forward<E1>(x), std::forward<E2>(l), std::forward<E3>(h) };
}
using fn_clamp = internal::in_clamp<>::fn_clamp;
template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
-KFR_INLINE ftype<common_type<T1, T2>>
-
-clamp(const T1& x, const T2& h)
+KFR_INLINE ftype<common_type<T1, T2>> clamp(const T1& x, const T2& h)
{
return internal::in_clamp<>::clamp(x, h);
}
@@ -361,15 +337,11 @@ clamp(const T1& x, const T2& h)
template <typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>::value)>
KFR_INLINE expr_func<fn_clamp, E1, E2> clamp(E1&& x, E2&& h)
{
- return { fn_clamp(), std::forward<E1>(x), std::forward<E2>(h)
-
- };
+ return { fn_clamp(), std::forward<E1>(x), std::forward<E2>(h) };
}
using fn_clampm1 = internal::in_clamp<>::fn_clampm1;
template <typename T1, typename T2, KFR_ENABLE_IF(is_numeric_args<T1, T2>::value)>
-KFR_INLINE ftype<common_type<T1, T2>>
-
-clampm1(const T1& x, const T2& h)
+KFR_INLINE ftype<common_type<T1, T2>> clampm1(const T1& x, const T2& h)
{
return internal::in_clamp<>::clampm1(x, h);
}
@@ -377,9 +349,7 @@ clampm1(const T1& x, const T2& h)
template <typename E1, typename E2, KFR_ENABLE_IF(is_input_expressions<E1, E2>::value)>
KFR_INLINE expr_func<fn_clampm1, E1, E2> clampm1(E1&& x, E2&& h)
{
- return { fn_clampm1(), std::forward<E1>(x), std::forward<E2>(h)
-
- };
+ return { fn_clampm1(), std::forward<E1>(x), std::forward<E2>(h) };
}
}
}
diff --git a/include/kfr/base/round.hpp b/include/kfr/base/round.hpp
@@ -239,14 +239,12 @@ namespace native
{
using fn_floor = internal::in_round<>::fn_floor;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> floor(const T1& x)
{
return internal::in_round<>::floor(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_floor, E1> floor(E1&& x)
{
return { fn_floor(), std::forward<E1>(x) };
@@ -254,14 +252,12 @@ KFR_INTRIN expr_func<fn_floor, E1> floor(E1&& x)
using fn_ceil = internal::in_round<>::fn_ceil;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> ceil(const T1& x)
{
return internal::in_round<>::ceil(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_ceil, E1> ceil(E1&& x)
{
return { fn_ceil(), std::forward<E1>(x) };
@@ -269,14 +265,12 @@ KFR_INTRIN expr_func<fn_ceil, E1> ceil(E1&& x)
using fn_round = internal::in_round<>::fn_round;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> round(const T1& x)
{
return internal::in_round<>::round(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_round, E1> round(E1&& x)
{
return { fn_round(), std::forward<E1>(x) };
@@ -284,14 +278,12 @@ KFR_INTRIN expr_func<fn_round, E1> round(E1&& x)
using fn_trunc = internal::in_round<>::fn_trunc;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> trunc(const T1& x)
{
return internal::in_round<>::trunc(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_trunc, E1> trunc(E1&& x)
{
return { fn_trunc(), std::forward<E1>(x) };
diff --git a/include/kfr/base/sin_cos.hpp b/include/kfr/base/sin_cos.hpp
@@ -356,14 +356,12 @@ namespace native
{
using fn_sin = internal::in_sin_cos<>::fn_sin;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> sin(const T1& x)
{
return internal::in_sin_cos<>::sin(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_sin, E1> sin(E1&& x)
{
return { fn_sin(), std::forward<E1>(x) };
@@ -371,14 +369,12 @@ KFR_INTRIN expr_func<fn_sin, E1> sin(E1&& x)
using fn_cos = internal::in_sin_cos<>::fn_cos;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> cos(const T1& x)
{
return internal::in_sin_cos<>::cos(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_cos, E1> cos(E1&& x)
{
return { fn_cos(), std::forward<E1>(x) };
@@ -391,7 +387,6 @@ KFR_INTRIN ftype<T1> fastsin(const T1& x)
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_fastsin, E1> fastsin(E1&& x)
{
return { fn_fastsin(), std::forward<E1>(x) };
@@ -399,14 +394,12 @@ KFR_INTRIN expr_func<fn_fastsin, E1> fastsin(E1&& x)
using fn_fastcos = internal::in_sin_cos<>::fn_fastcos;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> fastcos(const T1& x)
{
return internal::in_sin_cos<>::fastcos(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_fastcos, E1> fastcos(E1&& x)
{
return { fn_fastcos(), std::forward<E1>(x) };
@@ -414,14 +407,12 @@ KFR_INTRIN expr_func<fn_fastcos, E1> fastcos(E1&& x)
using fn_sincos_mask = internal::in_sin_cos<>::fn_sincos_mask;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> sincos_mask(const T1& x)
{
return internal::in_sin_cos<>::sincos_mask(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_sincos_mask, E1> sincos_mask(E1&& x)
{
return { fn_sincos_mask(), std::forward<E1>(x) };
@@ -429,14 +420,12 @@ KFR_INTRIN expr_func<fn_sincos_mask, E1> sincos_mask(E1&& x)
using fn_sincos = internal::in_sin_cos<>::fn_sincos;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> sincos(const T1& x)
{
return internal::in_sin_cos<>::sincos(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_sincos, E1> sincos(E1&& x)
{
return { fn_sincos(), std::forward<E1>(x) };
@@ -444,14 +433,12 @@ KFR_INTRIN expr_func<fn_sincos, E1> sincos(E1&& x)
using fn_cossin = internal::in_sin_cos<>::fn_cossin;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> cossin(const T1& x)
{
return internal::in_sin_cos<>::cossin(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_cossin, E1> cossin(E1&& x)
{
return { fn_cossin(), std::forward<E1>(x) };
@@ -459,14 +446,12 @@ KFR_INTRIN expr_func<fn_cossin, E1> cossin(E1&& x)
using fn_sindeg = internal::in_sin_cos<>::fn_sindeg;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> sindeg(const T1& x)
{
return internal::in_sin_cos<>::sindeg(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_sindeg, E1> sindeg(E1&& x)
{
return { fn_sindeg(), std::forward<E1>(x) };
@@ -474,14 +459,12 @@ KFR_INTRIN expr_func<fn_sindeg, E1> sindeg(E1&& x)
using fn_cosdeg = internal::in_sin_cos<>::fn_cosdeg;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> cosdeg(const T1& x)
{
return internal::in_sin_cos<>::cosdeg(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_cosdeg, E1> cosdeg(E1&& x)
{
return { fn_cosdeg(), std::forward<E1>(x) };
@@ -489,14 +472,12 @@ KFR_INTRIN expr_func<fn_cosdeg, E1> cosdeg(E1&& x)
using fn_fastsindeg = internal::in_sin_cos<>::fn_fastsindeg;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> fastsindeg(const T1& x)
{
return internal::in_sin_cos<>::fastsindeg(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_fastsindeg, E1> fastsindeg(E1&& x)
{
return { fn_fastsindeg(), std::forward<E1>(x) };
@@ -504,14 +485,12 @@ KFR_INTRIN expr_func<fn_fastsindeg, E1> fastsindeg(E1&& x)
using fn_fastcosdeg = internal::in_sin_cos<>::fn_fastcosdeg;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> fastcosdeg(const T1& x)
{
return internal::in_sin_cos<>::fastcosdeg(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_fastcosdeg, E1> fastcosdeg(E1&& x)
{
return { fn_fastcosdeg(), std::forward<E1>(x) };
@@ -519,14 +498,12 @@ KFR_INTRIN expr_func<fn_fastcosdeg, E1> fastcosdeg(E1&& x)
using fn_sincosdeg = internal::in_sin_cos<>::fn_sincosdeg;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> sincosdeg(const T1& x)
{
return internal::in_sin_cos<>::sincosdeg(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_sincosdeg, E1> sincosdeg(E1&& x)
{
return { fn_sincosdeg(), std::forward<E1>(x) };
@@ -534,14 +511,12 @@ KFR_INTRIN expr_func<fn_sincosdeg, E1> sincosdeg(E1&& x)
using fn_cossindeg = internal::in_sin_cos<>::fn_cossindeg;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> cossindeg(const T1& x)
{
return internal::in_sin_cos<>::cossindeg(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_cossindeg, E1> cossindeg(E1&& x)
{
return { fn_cossindeg(), std::forward<E1>(x) };
diff --git a/include/kfr/base/sqrt.hpp b/include/kfr/base/sqrt.hpp
@@ -69,14 +69,12 @@ namespace native
{
using fn_sqrt = internal::in_sqrt<>::fn_sqrt;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> sqrt(const T1& x)
{
return internal::in_sqrt<>::sqrt(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_sqrt, E1> sqrt(E1&& x)
{
return { fn_sqrt(), std::forward<E1>(x) };
diff --git a/include/kfr/base/tan.hpp b/include/kfr/base/tan.hpp
@@ -154,14 +154,12 @@ namespace native
{
using fn_tan = internal::in_tan<>::fn_tan;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> tan(const T1& x)
{
return internal::in_tan<>::tan(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_tan, E1> tan(E1&& x)
{
return { fn_tan(), std::forward<E1>(x) };
@@ -169,14 +167,12 @@ KFR_INTRIN expr_func<fn_tan, E1> tan(E1&& x)
using fn_tandeg = internal::in_tan<>::fn_tandeg;
template <typename T1, KFR_ENABLE_IF(is_numeric<T1>::value)>
-
KFR_INTRIN ftype<T1> tandeg(const T1& x)
{
return internal::in_tan<>::tandeg(x);
}
template <typename E1, KFR_ENABLE_IF(is_input_expression<E1>::value)>
-
KFR_INTRIN expr_func<fn_tandeg, E1> tandeg(E1&& x)
{
return { fn_tandeg(), std::forward<E1>(x) };
diff --git a/include/kfr/dsp/biquad_design.hpp b/include/kfr/dsp/biquad_design.hpp
@@ -22,8 +22,8 @@
*/
#pragma once
-#include <cmath>
#include "biquad.hpp"
+#include <cmath>
namespace kfr
{
diff --git a/include/kfr/dsp/fir.hpp b/include/kfr/dsp/fir.hpp
@@ -45,7 +45,6 @@ private:
using in_reduce<cpu>::dotproduct;
public:
-
template <size_t tapcount, typename T, typename E1>
struct expression_short_fir : expression<E1>
{
@@ -126,5 +125,3 @@ KFR_INLINE internal::in_fir<>::expression_short_fir<TapCount, T, E1> short_fir(
}
}
}
-
-
diff --git a/include/kfr/dsp/fir_design.hpp b/include/kfr/dsp/fir_design.hpp
@@ -35,7 +35,12 @@ namespace kfr
namespace internal
{
template <cpu_t cpu = cpu_t::native>
-struct in_fir_design : in_sqrt<cpu>, in_abs<cpu>, in_log_exp<cpu>, in_sin_cos<cpu>, in_window<cpu>, in_reduce<cpu>
+struct in_fir_design : in_sqrt<cpu>,
+ in_abs<cpu>,
+ in_log_exp<cpu>,
+ in_sin_cos<cpu>,
+ in_window<cpu>,
+ in_reduce<cpu>
{
private:
using in_sqrt<cpu>::sqrt;
diff --git a/include/kfr/math.hpp b/include/kfr/math.hpp
@@ -41,9 +41,9 @@
#include "base/select.hpp"
#include "base/shuffle.hpp"
#include "base/sin_cos.hpp"
-#include "kfr/base/hyperbolic.hpp"
#include "base/sqrt.hpp"
#include "base/tan.hpp"
+#include "kfr/base/hyperbolic.hpp"
namespace kfr
{