summaryrefslogtreecommitdiffstats
path: root/vec_sse_float1.h
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-09-02 15:23:56 -0400
committerErik Schnetter <schnetter@gmail.com>2013-09-02 15:23:56 -0400
commitcddd65bfcb491b446744e5ab8fe7e999528e7316 (patch)
tree169870ff1fdaf5f66f429d3b2213b32ad764cd3e /vec_sse_float1.h
parent9cfbe4801862dd1ae78745dae1e10fca9c6e1b28 (diff)
downloadvecmathlib-cddd65bfcb491b446744e5ab8fe7e999528e7316.zip
vecmathlib-cddd65bfcb491b446744e5ab8fe7e999528e7316.tar.gz
Provide clean set of libm elemental functions in namespace vml_std
Different C++ standard versions and different compilers provide different sets of elemental functions in std. Thus, we create a clean set in a new namespace vml_std.
Diffstat (limited to 'vec_sse_float1.h')
-rw-r--r--vec_sse_float1.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/vec_sse_float1.h b/vec_sse_float1.h
index a5df06b..bfc90d9 100644
--- a/vec_sse_float1.h
+++ b/vec_sse_float1.h
@@ -400,24 +400,24 @@ namespace vecmathlib {
#ifdef __SSE4_1__
return to_float(_mm_ceil_ss(from_float(v), from_float(v)));
#else
- return std::ceil(v);
+ return vml_std::ceil(v);
#endif
}
- realvec copysign(realvec y) const { return std::copysign(v, y.v); }
+ realvec copysign(realvec y) const { return vml_std::copysign(v, y.v); }
realvec cos() const { return MF::vml_cos(*this); }
realvec cosh() const { return MF::vml_cosh(*this); }
realvec exp() const { return MF::vml_exp(*this); }
realvec exp10() const { return MF::vml_exp10(*this); }
realvec exp2() const { return MF::vml_exp2(*this); }
realvec expm1() const { return MF::vml_expm1(*this); }
- realvec fabs() const { return std::fabs(v); }
+ realvec fabs() const { return vml_std::fabs(v); }
realvec fdim(realvec y) const { return MF::vml_fdim(*this, y); }
realvec floor() const
{
#ifdef __SSE4_1__
return to_float(_mm_floor_ss(from_float(v), from_float(v)));
#else
- return std::floor(v);
+ return vml_std::floor(v);
#endif
}
realvec fma(realvec y, realvec z) const { return MF::vml_fma(*this, y, z); }
@@ -429,11 +429,11 @@ namespace vecmathlib {
{
return to_float(_mm_min_ss(from_float(v), from_float(y.v)));
}
- realvec fmod(realvec y) const { return std::fmod(v, y.v); }
+ realvec fmod(realvec y) const { return vml_std::fmod(v, y.v); }
realvec frexp(intvec_t* irp) const
{
int iri;
- realvec r = std::frexp(v, &iri);
+ realvec r = vml_std::frexp(v, &iri);
int_t ir = iri;
if (isinf()) ir = std::numeric_limits<int_t>::max();
if (isnan()) ir = std::numeric_limits<int_t>::min();
@@ -443,12 +443,12 @@ namespace vecmathlib {
realvec hypot(realvec y) const { return MF::vml_hypot(*this, y); }
intvec_t ilogb() const
{
- int_t r = std::ilogb(v);
+ int_t r = vml_std::ilogb(v);
typedef std::numeric_limits<int_t> NL;
if (FP_ILOGB0 != NL::min() and *this == RV(R(0.0))) {
r = NL::min();
#if defined VML_HAVE_INF
- } else if (INT_MAX != NL::max() and std::isinf(v)) {
+ } else if (INT_MAX != NL::max() and vml_std::isinf(v)) {
r = NL::max();
#endif
#if defined VML_HAVE_NAN
@@ -458,8 +458,8 @@ namespace vecmathlib {
}
return r;
}
- boolvec_t isfinite() const { return std::isfinite(v); }
- boolvec_t isinf() const { return std::isinf(v); }
+ boolvec_t isfinite() const { return vml_std::isfinite(v); }
+ boolvec_t isinf() const { return vml_std::isinf(v); }
boolvec_t isnan() const
{
#if defined VML_HAVE_NAN
@@ -470,14 +470,14 @@ namespace vecmathlib {
// __asm__("ucomiss %[v],%[v]; setp %[r]": [r]"=q"(r): [v]"x"(v));
// return boolvec_t::scalar_t(r);
// This works as well:
- return std::isnan(v);
+ return vml_std::isnan(v);
#else
return BV(false);
#endif
}
- boolvec_t isnormal() const { return std::isnormal(v); }
- realvec ldexp(int_t n) const { return std::ldexp(v, n); }
- realvec ldexp(intvec_t n) const { return std::ldexp(v, n); }
+ boolvec_t isnormal() const { return vml_std::isnormal(v); }
+ realvec ldexp(int_t n) const { return vml_std::ldexp(v, n); }
+ realvec ldexp(intvec_t n) const { return vml_std::ldexp(v, n); }
realvec log() const { return MF::vml_log(*this); }
realvec log10() const { return MF::vml_log10(*this); }
realvec log1p() const { return MF::vml_log1p(*this); }
@@ -485,7 +485,7 @@ namespace vecmathlib {
realvec nextafter(realvec y) const { return MF::vml_nextafter(*this, y); }
realvec pow(realvec y) const { return MF::vml_pow(*this, y); }
realvec rcp() const { return R(1.0)/v; }
- realvec remainder(realvec y) const { return std::remainder(v, y.v); }
+ realvec remainder(realvec y) const { return vml_std::remainder(v, y.v); }
realvec rint() const
{
#ifdef __SSE4_1__
@@ -497,7 +497,7 @@ namespace vecmathlib {
}
realvec round() const { return MF::vml_round(*this); }
realvec rsqrt() const { return MF::vml_rsqrt(*this); }
- boolvec_t signbit() const { return std::signbit(v); }
+ boolvec_t signbit() const { return vml_std::signbit(v); }
realvec sin() const { return MF::vml_sin(*this); }
realvec sinh() const { return MF::vml_sinh(*this); }
realvec sqrt() const { return to_float(_mm_sqrt_ss(from_float(v))); }
OpenPOWER on IntegriCloud