From ee22431b623355df3f3a4817f812f4fc64756d03 Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 13 Sep 2019 07:48:06 -0400 Subject: Revert "final formatting pass" This reverts commit de5c2d63adeec53898b40934b21f6ee9627b877d. --- src/cuda-sim/half.h | 222 +++++++++++++++++++++++----------------------------- 1 file changed, 99 insertions(+), 123 deletions(-) (limited to 'src/cuda-sim/half.h') diff --git a/src/cuda-sim/half.h b/src/cuda-sim/half.h index 5cf4a21..d33b03c 100644 --- a/src/cuda-sim/half.h +++ b/src/cuda-sim/half.h @@ -108,7 +108,7 @@ #define HALF_POP_WARNINGS 1 #pragma warning(push) #pragma warning(disable : 4099 4127 4146) // struct vs class, constant in if, -// negative unsigned + // negative unsigned #endif // check C++11 library features @@ -568,9 +568,9 @@ bool builtin_signbit(T arg) { template uint16 float2half_impl(float value, true_type) { typedef bits::type uint32; - uint32 bits; // = *reinterpret_cast(&value); - // //violating - // strict aliasing! + uint32 + bits; // = *reinterpret_cast(&value); //violating + // strict aliasing! std::memcpy(&bits, &value, sizeof(float)); /* uint16 hbits = (bits>>16) & 0x8000; bits &= 0x7FFFFFFF; @@ -753,9 +753,9 @@ template uint16 float2half_impl(double value, true_type) { typedef bits::type uint32; typedef bits::type uint64; - uint64 bits; // = *reinterpret_cast(&value); - // //violating - // strict aliasing! + uint64 + bits; // = *reinterpret_cast(&value); //violating + // strict aliasing! std::memcpy(&bits, &value, sizeof(double)); uint32 hi = bits >> 32, lo = bits & 0xFFFFFFFF; uint16 hbits = (hi >> 16) & 0x8000; @@ -1359,9 +1359,8 @@ inline float half2float_impl(uint16 value, float, true_type) { 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024}; uint32 bits = mantissa_table[offset_table[value >> 10] + (value & 0x3FF)] + exponent_table[value >> 10]; - // return *reinterpret_cast(&bits); - ////violating - // strict aliasing! + // return *reinterpret_cast(&bits); //violating + //strict aliasing! float out; std::memcpy(&out, &bits, sizeof(float)); return out; @@ -1382,9 +1381,8 @@ inline double half2float_impl(uint16 value, double, true_type) { hi += static_cast(abs) << 10; } uint64 bits = static_cast(hi) << 32; - // return *reinterpret_cast(&bits); - ////violating - // strict aliasing! + // return *reinterpret_cast(&bits); //violating + //strict aliasing! double out; std::memcpy(&out, &bits, sizeof(double)); return out; @@ -2842,7 +2840,7 @@ std::basic_istream &operator>>( /// \param arg operand /// \return absolute value of \a arg // template typename enable::type abs(T arg) { -// return unary_specialized::fabs(arg); } +//return unary_specialized::fabs(arg); } inline half abs(half arg) { return unary_specialized::fabs(arg); } inline expr abs(expr arg) { return unary_specialized::fabs(arg); } @@ -2850,7 +2848,7 @@ inline expr abs(expr arg) { return unary_specialized::fabs(arg); } /// \param arg operand /// \return absolute value of \a arg // template typename enable::type fabs(T arg) { -// return unary_specialized::fabs(arg); } +//return unary_specialized::fabs(arg); } inline half fabs(half arg) { return unary_specialized::fabs(arg); } inline expr fabs(expr arg) { return unary_specialized::fabs(arg); } @@ -2859,7 +2857,7 @@ inline expr fabs(expr arg) { return unary_specialized::fabs(arg); } /// \param y second operand /// \return remainder of floating point division. // template typename enable::type -// fmod(T x, U y) { return functions::fmod(x, y); } +//fmod(T x, U y) { return functions::fmod(x, y); } inline expr fmod(half x, half y) { return functions::fmod(x, y); } inline expr fmod(half x, expr y) { return functions::fmod(x, y); } inline expr fmod(expr x, half y) { return functions::fmod(x, y); } @@ -2870,7 +2868,7 @@ inline expr fmod(expr x, expr y) { return functions::fmod(x, y); } /// \param y second operand /// \return remainder of floating point division. // template typename enable::type -// remainder(T x, U y) { return functions::remainder(x, y); } +//remainder(T x, U y) { return functions::remainder(x, y); } inline expr remainder(half x, half y) { return functions::remainder(x, y); } inline expr remainder(half x, expr y) { return functions::remainder(x, y); } inline expr remainder(expr x, half y) { return functions::remainder(x, y); } @@ -2882,7 +2880,7 @@ inline expr remainder(expr x, expr y) { return functions::remainder(x, y); } /// \param quo address to store some bits of quotient at /// \return remainder of floating point division. // template typename enable::type -// remquo(T x, U y, int *quo) { return functions::remquo(x, y, quo); } +//remquo(T x, U y, int *quo) { return functions::remquo(x, y, quo); } inline expr remquo(half x, half y, int *quo) { return functions::remquo(x, y, quo); } @@ -2902,7 +2900,7 @@ inline expr remquo(expr x, expr y, int *quo) { /// \param z third operand /// \return ( \a x * \a y ) + \a z rounded as one operation. // template typename -// enable::type fma(T x, U y, V z) { return functions::fma(x, y, z); +//enable::type fma(T x, U y, V z) { return functions::fma(x, y, z); //} inline expr fma(half x, half y, half z) { return functions::fma(x, y, z); } inline expr fma(half x, half y, expr z) { return functions::fma(x, y, z); } @@ -2917,9 +2915,8 @@ inline expr fma(expr x, expr y, expr z) { return functions::fma(x, y, z); } /// \param x first operand /// \param y second operand /// \return maximum of operands -// template typename result::type -// fmax(T -// x, U y) { return binary_specialized::fmax(x, y); } +// template typename result::type fmax(T +//x, U y) { return binary_specialized::fmax(x, y); } inline half fmax(half x, half y) { return binary_specialized::fmax(x, y); } @@ -2937,9 +2934,8 @@ inline expr fmax(expr x, expr y) { /// \param x first operand /// \param y second operand /// \return minimum of operands -// template typename result::type -// fmin(T -// x, U y) { return binary_specialized::fmin(x, y); } +// template typename result::type fmin(T +//x, U y) { return binary_specialized::fmin(x, y); } inline half fmin(half x, half y) { return binary_specialized::fmin(x, y); } @@ -2958,7 +2954,7 @@ inline expr fmin(expr x, expr y) { /// \param y second operand /// \return \a x - \a y or 0 if difference negative // template typename enable::type -// fdim(T x, U y) { return functions::fdim(x, y); } +//fdim(T x, U y) { return functions::fdim(x, y); } inline expr fdim(half x, half y) { return functions::fdim(x, y); } inline expr fdim(half x, expr y) { return functions::fdim(x, y); } inline expr fdim(expr x, half y) { return functions::fdim(x, y); } @@ -2976,16 +2972,15 @@ inline half nanh(const char *) { return functions::nanh(); } /// \param arg function argument /// \return e raised to \a arg // template typename enable::type exp(T arg) { -// return functions::exp(arg); } +//return functions::exp(arg); } inline expr exp(half arg) { return functions::exp(arg); } inline expr exp(expr arg) { return functions::exp(arg); } /// Exponential minus one. /// \param arg function argument /// \return e raised to \a arg subtracted by 1 -// template typename enable::type expm1(T arg) -//{ -// return functions::expm1(arg); } +// template typename enable::type expm1(T arg) { +//return functions::expm1(arg); } inline expr expm1(half arg) { return functions::expm1(arg); } inline expr expm1(expr arg) { return functions::expm1(arg); } @@ -2993,7 +2988,7 @@ inline expr expm1(expr arg) { return functions::expm1(arg); } /// \param arg function argument /// \return 2 raised to \a arg // template typename enable::type exp2(T arg) { -// return functions::exp2(arg); } +//return functions::exp2(arg); } inline expr exp2(half arg) { return functions::exp2(arg); } inline expr exp2(expr arg) { return functions::exp2(arg); } @@ -3001,25 +2996,23 @@ inline expr exp2(expr arg) { return functions::exp2(arg); } /// \param arg function argument /// \return logarithm of \a arg to base e // template typename enable::type log(T arg) { -// return functions::log(arg); } +//return functions::log(arg); } inline expr log(half arg) { return functions::log(arg); } inline expr log(expr arg) { return functions::log(arg); } /// Common logorithm. /// \param arg function argument /// \return logarithm of \a arg to base 10 -// template typename enable::type log10(T arg) -//{ -// return functions::log10(arg); } +// template typename enable::type log10(T arg) { +//return functions::log10(arg); } inline expr log10(half arg) { return functions::log10(arg); } inline expr log10(expr arg) { return functions::log10(arg); } /// Natural logorithm. /// \param arg function argument /// \return logarithm of \a arg plus 1 to base e -// template typename enable::type log1p(T arg) -//{ -// return functions::log1p(arg); } +// template typename enable::type log1p(T arg) { +//return functions::log1p(arg); } inline expr log1p(half arg) { return functions::log1p(arg); } inline expr log1p(expr arg) { return functions::log1p(arg); } @@ -3027,7 +3020,7 @@ inline expr log1p(expr arg) { return functions::log1p(arg); } /// \param arg function argument /// \return logarithm of \a arg to base 2 // template typename enable::type log2(T arg) { -// return functions::log2(arg); } +//return functions::log2(arg); } inline expr log2(half arg) { return functions::log2(arg); } inline expr log2(expr arg) { return functions::log2(arg); } @@ -3039,7 +3032,7 @@ inline expr log2(expr arg) { return functions::log2(arg); } /// \param arg function argument /// \return square root of \a arg // template typename enable::type sqrt(T arg) { -// return functions::sqrt(arg); } +//return functions::sqrt(arg); } inline expr sqrt(half arg) { return functions::sqrt(arg); } inline expr sqrt(expr arg) { return functions::sqrt(arg); } @@ -3047,7 +3040,7 @@ inline expr sqrt(expr arg) { return functions::sqrt(arg); } /// \param arg function argument /// \return cubic root of \a arg // template typename enable::type cbrt(T arg) { -// return functions::cbrt(arg); } +//return functions::cbrt(arg); } inline expr cbrt(half arg) { return functions::cbrt(arg); } inline expr cbrt(expr arg) { return functions::cbrt(arg); } @@ -3056,7 +3049,7 @@ inline expr cbrt(expr arg) { return functions::cbrt(arg); } /// \param y second argument /// \return square root of sum of squares without internal over- or underflows // template typename enable::type -// hypot(T x, U y) { return functions::hypot(x, y); } +//hypot(T x, U y) { return functions::hypot(x, y); } inline expr hypot(half x, half y) { return functions::hypot(x, y); } inline expr hypot(half x, expr y) { return functions::hypot(x, y); } inline expr hypot(expr x, half y) { return functions::hypot(x, y); } @@ -3067,7 +3060,7 @@ inline expr hypot(expr x, expr y) { return functions::hypot(x, y); } /// \param exp second argument /// \return \a base raised to \a exp // template typename enable::type -// pow(T base, U exp) { return functions::pow(base, exp); } +//pow(T base, U exp) { return functions::pow(base, exp); } inline expr pow(half base, half exp) { return functions::pow(base, exp); } inline expr pow(half base, expr exp) { return functions::pow(base, exp); } inline expr pow(expr base, half exp) { return functions::pow(base, exp); } @@ -3081,7 +3074,7 @@ inline expr pow(expr base, expr exp) { return functions::pow(base, exp); } /// \param arg function argument /// \return sine value of \a arg // template typename enable::type sin(T arg) { -// return functions::sin(arg); } +//return functions::sin(arg); } inline expr sin(half arg) { return functions::sin(arg); } inline expr sin(expr arg) { return functions::sin(arg); } @@ -3089,7 +3082,7 @@ inline expr sin(expr arg) { return functions::sin(arg); } /// \param arg function argument /// \return cosine value of \a arg // template typename enable::type cos(T arg) { -// return functions::cos(arg); } +//return functions::cos(arg); } inline expr cos(half arg) { return functions::cos(arg); } inline expr cos(expr arg) { return functions::cos(arg); } @@ -3097,7 +3090,7 @@ inline expr cos(expr arg) { return functions::cos(arg); } /// \param arg function argument /// \return tangent value of \a arg // template typename enable::type tan(T arg) { -// return functions::tan(arg); } +//return functions::tan(arg); } inline expr tan(half arg) { return functions::tan(arg); } inline expr tan(expr arg) { return functions::tan(arg); } @@ -3105,7 +3098,7 @@ inline expr tan(expr arg) { return functions::tan(arg); } /// \param arg function argument /// \return arc sine value of \a arg // template typename enable::type asin(T arg) { -// return functions::asin(arg); } +//return functions::asin(arg); } inline expr asin(half arg) { return functions::asin(arg); } inline expr asin(expr arg) { return functions::asin(arg); } @@ -3113,7 +3106,7 @@ inline expr asin(expr arg) { return functions::asin(arg); } /// \param arg function argument /// \return arc cosine value of \a arg // template typename enable::type acos(T arg) { -// return functions::acos(arg); } +//return functions::acos(arg); } inline expr acos(half arg) { return functions::acos(arg); } inline expr acos(expr arg) { return functions::acos(arg); } @@ -3121,7 +3114,7 @@ inline expr acos(expr arg) { return functions::acos(arg); } /// \param arg function argument /// \return arc tangent value of \a arg // template typename enable::type atan(T arg) { -// return functions::atan(arg); } +//return functions::atan(arg); } inline expr atan(half arg) { return functions::atan(arg); } inline expr atan(expr arg) { return functions::atan(arg); } @@ -3130,7 +3123,7 @@ inline expr atan(expr arg) { return functions::atan(arg); } /// \param y second argument /// \return arc tangent value // template typename enable::type -// atan2(T x, U y) { return functions::atan2(x, y); } +//atan2(T x, U y) { return functions::atan2(x, y); } inline expr atan2(half x, half y) { return functions::atan2(x, y); } inline expr atan2(half x, expr y) { return functions::atan2(x, y); } inline expr atan2(expr x, half y) { return functions::atan2(x, y); } @@ -3144,7 +3137,7 @@ inline expr atan2(expr x, expr y) { return functions::atan2(x, y); } /// \param arg function argument /// \return hyperbolic sine value of \a arg // template typename enable::type sinh(T arg) { -// return functions::sinh(arg); } +//return functions::sinh(arg); } inline expr sinh(half arg) { return functions::sinh(arg); } inline expr sinh(expr arg) { return functions::sinh(arg); } @@ -3152,7 +3145,7 @@ inline expr sinh(expr arg) { return functions::sinh(arg); } /// \param arg function argument /// \return hyperbolic cosine value of \a arg // template typename enable::type cosh(T arg) { -// return functions::cosh(arg); } +//return functions::cosh(arg); } inline expr cosh(half arg) { return functions::cosh(arg); } inline expr cosh(expr arg) { return functions::cosh(arg); } @@ -3160,34 +3153,31 @@ inline expr cosh(expr arg) { return functions::cosh(arg); } /// \param arg function argument /// \return hyperbolic tangent value of \a arg // template typename enable::type tanh(T arg) { -// return functions::tanh(arg); } +//return functions::tanh(arg); } inline expr tanh(half arg) { return functions::tanh(arg); } inline expr tanh(expr arg) { return functions::tanh(arg); } /// Hyperbolic area sine. /// \param arg function argument /// \return area sine value of \a arg -// template typename enable::type asinh(T arg) -//{ -// return functions::asinh(arg); } +// template typename enable::type asinh(T arg) { +//return functions::asinh(arg); } inline expr asinh(half arg) { return functions::asinh(arg); } inline expr asinh(expr arg) { return functions::asinh(arg); } /// Hyperbolic area cosine. /// \param arg function argument /// \return area cosine value of \a arg -// template typename enable::type acosh(T arg) -//{ -// return functions::acosh(arg); } +// template typename enable::type acosh(T arg) { +//return functions::acosh(arg); } inline expr acosh(half arg) { return functions::acosh(arg); } inline expr acosh(expr arg) { return functions::acosh(arg); } /// Hyperbolic area tangent. /// \param arg function argument /// \return area tangent value of \a arg -// template typename enable::type atanh(T arg) -//{ -// return functions::atanh(arg); } +// template typename enable::type atanh(T arg) { +//return functions::atanh(arg); } inline expr atanh(half arg) { return functions::atanh(arg); } inline expr atanh(expr arg) { return functions::atanh(arg); } @@ -3199,7 +3189,7 @@ inline expr atanh(expr arg) { return functions::atanh(arg); } /// \param arg function argument /// \return error function value of \a arg // template typename enable::type erf(T arg) { -// return functions::erf(arg); } +//return functions::erf(arg); } inline expr erf(half arg) { return functions::erf(arg); } inline expr erf(expr arg) { return functions::erf(arg); } @@ -3207,25 +3197,23 @@ inline expr erf(expr arg) { return functions::erf(arg); } /// \param arg function argument /// \return 1 minus error function value of \a arg // template typename enable::type erfc(T arg) { -// return functions::erfc(arg); } +//return functions::erfc(arg); } inline expr erfc(half arg) { return functions::erfc(arg); } inline expr erfc(expr arg) { return functions::erfc(arg); } /// Natural logarithm of gamma function. /// \param arg function argument /// \return natural logarith of gamma function for \a arg -// template typename enable::type lgamma(T arg) -//{ -// return functions::lgamma(arg); } +// template typename enable::type lgamma(T arg) { +//return functions::lgamma(arg); } inline expr lgamma(half arg) { return functions::lgamma(arg); } inline expr lgamma(expr arg) { return functions::lgamma(arg); } /// Gamma function. /// \param arg function argument /// \return gamma function value of \a arg -// template typename enable::type tgamma(T arg) -//{ -// return functions::tgamma(arg); } +// template typename enable::type tgamma(T arg) { +//return functions::tgamma(arg); } inline expr tgamma(half arg) { return functions::tgamma(arg); } inline expr tgamma(expr arg) { return functions::tgamma(arg); } @@ -3237,43 +3225,39 @@ inline expr tgamma(expr arg) { return functions::tgamma(arg); } /// \param arg half to round /// \return nearest integer not less than \a arg // template typename enable::type ceil(T arg) { -// return functions::ceil(arg); } +//return functions::ceil(arg); } inline half ceil(half arg) { return functions::ceil(arg); } inline half ceil(expr arg) { return functions::ceil(arg); } /// Nearest integer not greater than half value. /// \param arg half to round /// \return nearest integer not greater than \a arg -// template typename enable::type floor(T arg) -//{ -// return functions::floor(arg); } +// template typename enable::type floor(T arg) { +//return functions::floor(arg); } inline half floor(half arg) { return functions::floor(arg); } inline half floor(expr arg) { return functions::floor(arg); } /// Nearest integer not greater in magnitude than half value. /// \param arg half to round /// \return nearest integer not greater in magnitude than \a arg -// template typename enable::type trunc(T arg) -//{ -// return functions::trunc(arg); } +// template typename enable::type trunc(T arg) { +//return functions::trunc(arg); } inline half trunc(half arg) { return functions::trunc(arg); } inline half trunc(expr arg) { return functions::trunc(arg); } /// Nearest integer. /// \param arg half to round /// \return nearest integer, rounded away from zero in half-way cases -// template typename enable::type round(T arg) -//{ -// return functions::round(arg); } +// template typename enable::type round(T arg) { +//return functions::round(arg); } inline half round(half arg) { return functions::round(arg); } inline half round(expr arg) { return functions::round(arg); } /// Nearest integer. /// \param arg half to round /// \return nearest integer, rounded away from zero in half-way cases -// template typename enable::type lround(T arg) -//{ -// return functions::lround(arg); } +// template typename enable::type lround(T arg) { +//return functions::lround(arg); } inline long lround(half arg) { return functions::lround(arg); } inline long lround(expr arg) { return functions::lround(arg); } @@ -3281,7 +3265,7 @@ inline long lround(expr arg) { return functions::lround(arg); } /// \param arg half expression to round /// \return nearest integer using default rounding mode // template typename enable::type nearbyint(T -// arg) { return functions::nearbyint(arg); } +//arg) { return functions::nearbyint(arg); } inline half nearbyint(half arg) { return functions::rint(arg); } inline half nearbyint(expr arg) { return functions::rint(arg); } @@ -3289,25 +3273,23 @@ inline half nearbyint(expr arg) { return functions::rint(arg); } /// \param arg half expression to round /// \return nearest integer using default rounding mode // template typename enable::type rint(T arg) { -// return functions::rint(arg); } +//return functions::rint(arg); } inline half rint(half arg) { return functions::rint(arg); } inline half rint(expr arg) { return functions::rint(arg); } /// Nearest integer using half's internal rounding mode. /// \param arg half expression to round /// \return nearest integer using default rounding mode -// template typename enable::type lrint(T arg) -//{ -// return functions::lrint(arg); } +// template typename enable::type lrint(T arg) { +//return functions::lrint(arg); } inline long lrint(half arg) { return functions::lrint(arg); } inline long lrint(expr arg) { return functions::lrint(arg); } #if HALF_ENABLE_CPP11_LONG_LONG /// Nearest integer. /// \param arg half to round /// \return nearest integer, rounded away from zero in half-way cases -// template typename enable::type -// llround(T -// arg) { return functions::llround(arg); } +// template typename enable::type llround(T +//arg) { return functions::llround(arg); } inline long long llround(half arg) { return functions::llround(arg); } inline long long llround(expr arg) { return functions::llround(arg); } @@ -3315,7 +3297,7 @@ inline long long llround(expr arg) { return functions::llround(arg); } /// \param arg half expression to round /// \return nearest integer using default rounding mode // template typename enable::type llrint(T -// arg) { return functions::llrint(arg); } +//arg) { return functions::llrint(arg); } inline long long llrint(half arg) { return functions::llrint(arg); } inline long long llrint(expr arg) { return functions::llrint(arg); } #endif @@ -3329,7 +3311,7 @@ inline long long llrint(expr arg) { return functions::llrint(arg); } /// \param exp address to store exponent at /// \return significant in range [0.5, 1) // template typename enable::type frexp(T arg, -// int *exp) { return functions::frexp(arg, exp); } +//int *exp) { return functions::frexp(arg, exp); } inline half frexp(half arg, int *exp) { return functions::frexp(arg, exp); } inline half frexp(expr arg, int *exp) { return functions::frexp(arg, exp); } @@ -3338,7 +3320,7 @@ inline half frexp(expr arg, int *exp) { return functions::frexp(arg, exp); } /// \param exp power of two to multiply with /// \return \a arg multplied by 2 raised to \a exp // template typename enable::type ldexp(T arg, -// int exp) { return functions::scalbln(arg, exp); } +//int exp) { return functions::scalbln(arg, exp); } inline half ldexp(half arg, int exp) { return functions::scalbln(arg, exp); } inline half ldexp(expr arg, int exp) { return functions::scalbln(arg, exp); } @@ -3347,7 +3329,7 @@ inline half ldexp(expr arg, int exp) { return functions::scalbln(arg, exp); } /// \param iptr address to store integer part at /// \return fractional part // template typename enable::type modf(T arg, -// half *iptr) { return functions::modf(arg, iptr); } +//half *iptr) { return functions::modf(arg, iptr); } inline half modf(half arg, half *iptr) { return functions::modf(arg, iptr); } inline half modf(expr arg, half *iptr) { return functions::modf(arg, iptr); } @@ -3356,7 +3338,7 @@ inline half modf(expr arg, half *iptr) { return functions::modf(arg, iptr); } /// \param exp power of two to multiply with /// \return \a arg multplied by 2 raised to \a exp // template typename enable::type scalbn(T arg, -// int exp) { return functions::scalbln(arg, exp); } +//int exp) { return functions::scalbln(arg, exp); } inline half scalbn(half arg, int exp) { return functions::scalbln(arg, exp); } inline half scalbn(expr arg, int exp) { return functions::scalbln(arg, exp); } @@ -3364,9 +3346,8 @@ inline half scalbn(expr arg, int exp) { return functions::scalbln(arg, exp); } /// \param arg number to modify /// \param exp power of two to multiply with /// \return \a arg multplied by 2 raised to \a exp -// template typename enable::type scalbln(T -// arg, -// long exp) { return functions::scalbln(arg, exp); } +// template typename enable::type scalbln(T arg, +//long exp) { return functions::scalbln(arg, exp); } inline half scalbln(half arg, long exp) { return functions::scalbln(arg, exp); } inline half scalbln(expr arg, long exp) { return functions::scalbln(arg, exp); } @@ -3377,7 +3358,7 @@ inline half scalbln(expr arg, long exp) { return functions::scalbln(arg, exp); } /// \retval FP_ILOGBNAN for NaN /// \retval MAX_INT for infinity // template typename enable::type ilogb(T arg) { -// return functions::ilogb(arg); } +//return functions::ilogb(arg); } inline int ilogb(half arg) { return functions::ilogb(arg); } inline int ilogb(expr arg) { return functions::ilogb(arg); } @@ -3385,7 +3366,7 @@ inline int ilogb(expr arg) { return functions::ilogb(arg); } /// \param arg number to query /// \return floating point exponent // template typename enable::type logb(T arg) { -// return functions::logb(arg); } +//return functions::logb(arg); } inline half logb(half arg) { return functions::logb(arg); } inline half logb(expr arg) { return functions::logb(arg); } @@ -3394,7 +3375,7 @@ inline half logb(expr arg) { return functions::logb(arg); } /// \param to direction towards which to compute next value /// \return next representable value after \a from in direction towards \a to // template typename enable::type -// nextafter(T from, U to) { return functions::nextafter(from, to); } +//nextafter(T from, U to) { return functions::nextafter(from, to); } inline half nextafter(half from, half to) { return functions::nextafter(from, to); } @@ -3413,7 +3394,7 @@ inline half nextafter(expr from, expr to) { /// \param to direction towards which to compute next value /// \return next representable value after \a from in direction towards \a to // template typename enable::type nexttoward(T -// from, long double to) { return functions::nexttoward(from, to); } +//from, long double to) { return functions::nexttoward(from, to); } inline half nexttoward(half from, long double to) { return functions::nexttoward(from, to); } @@ -3426,7 +3407,7 @@ inline half nexttoward(expr from, long double to) { /// \param y value to take sign from /// \return value equal to \a x in magnitude and to \a y in sign // template typename enable::type -// copysign(T x, U y) { return functions::copysign(x, y); } +//copysign(T x, U y) { return functions::copysign(x, y); } inline half copysign(half x, half y) { return functions::copysign(x, y); } inline half copysign(half x, expr y) { return functions::copysign(x, y); } inline half copysign(expr x, half y) { return functions::copysign(x, y); } @@ -3444,7 +3425,7 @@ inline half copysign(expr x, expr y) { return functions::copysign(x, y); } /// \retval FP_NAN for NaNs /// \retval FP_NORMAL for all other (normal) values // template typename enable::type fpclassify(T -// arg) { return functions::fpclassify(arg); } +//arg) { return functions::fpclassify(arg); } inline int fpclassify(half arg) { return functions::fpclassify(arg); } inline int fpclassify(expr arg) { return functions::fpclassify(arg); } @@ -3452,8 +3433,7 @@ inline int fpclassify(expr arg) { return functions::fpclassify(arg); } /// \param arg number to check /// \retval true if neither infinity nor NaN /// \retval false else -// template typename enable::type isfinite(T -// arg) +// template typename enable::type isfinite(T arg) //{ return functions::isfinite(arg); } inline bool isfinite(half arg) { return functions::isfinite(arg); } inline bool isfinite(expr arg) { return functions::isfinite(arg); } @@ -3462,9 +3442,8 @@ inline bool isfinite(expr arg) { return functions::isfinite(arg); } /// \param arg number to check /// \retval true for positive or negative infinity /// \retval false else -// template typename enable::type isinf(T arg) -//{ -// return functions::isinf(arg); } +// template typename enable::type isinf(T arg) { +//return functions::isinf(arg); } inline bool isinf(half arg) { return functions::isinf(arg); } inline bool isinf(expr arg) { return functions::isinf(arg); } @@ -3472,9 +3451,8 @@ inline bool isinf(expr arg) { return functions::isinf(arg); } /// \param arg number to check /// \retval true for NaNs /// \retval false else -// template typename enable::type isnan(T arg) -//{ -// return functions::isnan(arg); } +// template typename enable::type isnan(T arg) { +//return functions::isnan(arg); } inline bool isnan(half arg) { return functions::isnan(arg); } inline bool isnan(expr arg) { return functions::isnan(arg); } @@ -3482,8 +3460,7 @@ inline bool isnan(expr arg) { return functions::isnan(arg); } /// \param arg number to check /// \retval true if normal number /// \retval false if either subnormal, zero, infinity or NaN -// template typename enable::type isnormal(T -// arg) +// template typename enable::type isnormal(T arg) //{ return functions::isnormal(arg); } inline bool isnormal(half arg) { return functions::isnormal(arg); } inline bool isnormal(expr arg) { return functions::isnormal(arg); } @@ -3492,8 +3469,7 @@ inline bool isnormal(expr arg) { return functions::isnormal(arg); } /// \param arg number to check /// \retval true for negative number /// \retval false for positive number -// template typename enable::type signbit(T -// arg) +// template typename enable::type signbit(T arg) //{ return functions::signbit(arg); } inline bool signbit(half arg) { return functions::signbit(arg); } inline bool signbit(expr arg) { return functions::signbit(arg); } @@ -3508,7 +3484,7 @@ inline bool signbit(expr arg) { return functions::signbit(arg); } /// \retval true if \a x greater than \a y /// \retval false else // template typename enable::type -// isgreater(T x, U y) { return functions::isgreater(x, y); } +//isgreater(T x, U y) { return functions::isgreater(x, y); } inline bool isgreater(half x, half y) { return functions::isgreater(x, y); } inline bool isgreater(half x, expr y) { return functions::isgreater(x, y); } inline bool isgreater(expr x, half y) { return functions::isgreater(x, y); } @@ -3520,7 +3496,7 @@ inline bool isgreater(expr x, expr y) { return functions::isgreater(x, y); } /// \retval true if \a x greater equal \a y /// \retval false else // template typename enable::type -// isgreaterequal(T x, U y) { return functions::isgreaterequal(x, y); } +//isgreaterequal(T x, U y) { return functions::isgreaterequal(x, y); } inline bool isgreaterequal(half x, half y) { return functions::isgreaterequal(x, y); } @@ -3540,7 +3516,7 @@ inline bool isgreaterequal(expr x, expr y) { /// \retval true if \a x less than \a y /// \retval false else // template typename enable::type -// isless(T x, U y) { return functions::isless(x, y); } +//isless(T x, U y) { return functions::isless(x, y); } inline bool isless(half x, half y) { return functions::isless(x, y); } inline bool isless(half x, expr y) { return functions::isless(x, y); } inline bool isless(expr x, half y) { return functions::isless(x, y); } @@ -3552,7 +3528,7 @@ inline bool isless(expr x, expr y) { return functions::isless(x, y); } /// \retval true if \a x less equal \a y /// \retval false else // template typename enable::type -// islessequal(T x, U y) { return functions::islessequal(x, y); } +//islessequal(T x, U y) { return functions::islessequal(x, y); } inline bool islessequal(half x, half y) { return functions::islessequal(x, y); } inline bool islessequal(half x, expr y) { return functions::islessequal(x, y); } inline bool islessequal(expr x, half y) { return functions::islessequal(x, y); } @@ -3564,7 +3540,7 @@ inline bool islessequal(expr x, expr y) { return functions::islessequal(x, y); } /// \retval true if either less or greater /// \retval false else // template typename enable::type -// islessgreater(T x, U y) { return functions::islessgreater(x, y); } +//islessgreater(T x, U y) { return functions::islessgreater(x, y); } inline bool islessgreater(half x, half y) { return functions::islessgreater(x, y); } @@ -3584,7 +3560,7 @@ inline bool islessgreater(expr x, expr y) { /// \retval true if unordered (one or two NaN operands) /// \retval false else // template typename enable::type -// isunordered(T x, U y) { return functions::isunordered(x, y); } +//isunordered(T x, U y) { return functions::isunordered(x, y); } inline bool isunordered(half x, half y) { return functions::isunordered(x, y); } inline bool isunordered(half x, expr y) { return functions::isunordered(x, y); } inline bool isunordered(expr x, half y) { return functions::isunordered(x, y); } -- cgit v1.3