diff options
author | Erik Schnetter <schnetter@gmail.com> | 2013-06-05 14:04:12 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2013-06-05 14:04:12 +0000 |
commit | 075a6577bc62862e932b52a2781f8b220237cdea (patch) | |
tree | 0b68fa86144eb2e4144e0c3ad6dcda594fed0374 /mathfuncs_fabs.h | |
parent | e6fd0261b4c1b55d2a9b80497cb46e0d0b7ddd52 (diff) | |
download | vecmathlib-075a6577bc62862e932b52a2781f8b220237cdea.zip vecmathlib-075a6577bc62862e932b52a2781f8b220237cdea.tar.gz |
Continue implementing QPX support
Diffstat (limited to 'mathfuncs_fabs.h')
-rw-r--r-- | mathfuncs_fabs.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/mathfuncs_fabs.h b/mathfuncs_fabs.h index 4f7aa60..f04004a 100644 --- a/mathfuncs_fabs.h +++ b/mathfuncs_fabs.h @@ -51,7 +51,8 @@ namespace vecmathlib { } template<typename realvec_t> - auto mathfuncs<realvec_t>::vml_ilogb(realvec_t x) -> intvec_t + // auto mathfuncs<realvec_t>::vml_ilogb(realvec_t x) -> intvec_t + typename realvec_t::intvec_t mathfuncs<realvec_t>::vml_ilogb(realvec_t x) { intvec_t e = lsr(as_int(x) & IV(FP::exponent_mask), FP::mantissa_bits); intvec_t r = e - IV(FP::exponent_offset); @@ -66,19 +67,22 @@ namespace vecmathlib { } template<typename realvec_t> - auto mathfuncs<realvec_t>::vml_ieee_isfinite(realvec_t x) -> boolvec_t + // auto mathfuncs<realvec_t>::vml_ieee_isfinite(realvec_t x) -> boolvec_t + typename realvec_t::boolvec_t mathfuncs<realvec_t>::vml_ieee_isfinite(realvec_t x) { return (as_int(x) & IV(FP::exponent_mask)) != IV(FP::exponent_mask); } template<typename realvec_t> - auto mathfuncs<realvec_t>::vml_ieee_isinf(realvec_t x) -> boolvec_t + // auto mathfuncs<realvec_t>::vml_ieee_isinf(realvec_t x) -> boolvec_t + typename realvec_t::boolvec_t mathfuncs<realvec_t>::vml_ieee_isinf(realvec_t x) { return (as_int(x) & IV(~FP::signbit_mask)) == IV(FP::exponent_mask); } template<typename realvec_t> - auto mathfuncs<realvec_t>::vml_ieee_isnan(realvec_t x) -> boolvec_t + // auto mathfuncs<realvec_t>::vml_ieee_isnan(realvec_t x) -> boolvec_t + typename realvec_t::boolvec_t mathfuncs<realvec_t>::vml_ieee_isnan(realvec_t x) { return (as_int(x) & IV(FP::exponent_mask)) == IV(FP::exponent_mask) && @@ -86,7 +90,8 @@ namespace vecmathlib { } template<typename realvec_t> - auto mathfuncs<realvec_t>::vml_ieee_isnormal(realvec_t x) -> boolvec_t + // auto mathfuncs<realvec_t>::vml_ieee_isnormal(realvec_t x) -> boolvec_t + typename realvec_t::boolvec_t mathfuncs<realvec_t>::vml_ieee_isnormal(realvec_t x) { return (as_int(x) & IV(FP::exponent_mask)) != IV(FP::exponent_mask) && @@ -94,7 +99,8 @@ namespace vecmathlib { } template<typename realvec_t> - auto mathfuncs<realvec_t>::vml_isfinite(realvec_t x) -> boolvec_t + // auto mathfuncs<realvec_t>::vml_isfinite(realvec_t x) -> boolvec_t + typename realvec_t::boolvec_t mathfuncs<realvec_t>::vml_isfinite(realvec_t x) { #if defined VML_HAVE_INF || defined VML_HAVE_NAN return vml_ieee_isfinite(x); @@ -104,7 +110,8 @@ namespace vecmathlib { } template<typename realvec_t> - auto mathfuncs<realvec_t>::vml_isinf(realvec_t x) -> boolvec_t + // auto mathfuncs<realvec_t>::vml_isinf(realvec_t x) -> boolvec_t + typename realvec_t::boolvec_t mathfuncs<realvec_t>::vml_isinf(realvec_t x) { #if defined VML_HAVE_INF return vml_ieee_isinf(x); @@ -124,7 +131,7 @@ namespace vecmathlib { } template<typename realvec_t> - auto mathfuncs<realvec_t>::vml_isnormal(realvec_t x) -> boolvec_t + typename realvec_t::boolvec_t mathfuncs<realvec_t>::vml_isnormal(realvec_t x) { #if defined VML_HAVE_DENORMALS || defined VML_HAVE_INF || defined VML_HAVE_NAN return vml_ieee_isnormal(x); @@ -142,7 +149,8 @@ namespace vecmathlib { } template<typename realvec_t> - auto mathfuncs<realvec_t>::vml_signbit(realvec_t x) -> boolvec_t + // auto mathfuncs<realvec_t>::vml_signbit(realvec_t x) -> boolvec_t + typename realvec_t::boolvec_t mathfuncs<realvec_t>::vml_signbit(realvec_t x) { return convert_bool(as_int(x) & IV(FP::signbit_mask)); } |