From f2aa87a330dc68207088bf60828376f9fa454d72 Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 13 Sep 2019 08:02:14 -0400 Subject: Seems like multiple passes for reformatting comments --- src/cuda-sim/half.h | 198 +++++++++++++++++++++---------------------- src/cuda-sim/instructions.cc | 2 +- 2 files changed, 100 insertions(+), 100 deletions(-) (limited to 'src/cuda-sim') diff --git a/src/cuda-sim/half.h b/src/cuda-sim/half.h index 54bedc2..fab1a22 100644 --- a/src/cuda-sim/half.h +++ b/src/cuda-sim/half.h @@ -551,8 +551,8 @@ 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; @@ -728,8 +728,8 @@ 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; @@ -1257,8 +1257,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; @@ -1279,8 +1279,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; @@ -2719,7 +2719,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); } @@ -2727,7 +2727,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); } @@ -2736,7 +2736,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); } @@ -2747,7 +2747,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); } @@ -2759,7 +2759,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); } @@ -2779,7 +2779,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); } @@ -2794,8 +2794,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); } @@ -2813,8 +2813,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); } @@ -2833,7 +2833,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); } @@ -2851,15 +2851,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); } @@ -2867,7 +2867,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); } @@ -2875,23 +2875,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); } @@ -2899,7 +2899,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); } @@ -2911,7 +2911,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); } @@ -2919,7 +2919,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); } @@ -2928,7 +2928,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); } @@ -2939,7 +2939,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); } @@ -2953,7 +2953,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); } @@ -2961,7 +2961,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); } @@ -2969,7 +2969,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); } @@ -2977,7 +2977,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); } @@ -2985,7 +2985,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); } @@ -2993,7 +2993,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); } @@ -3002,7 +3002,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); } @@ -3016,7 +3016,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); } @@ -3024,7 +3024,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); } @@ -3032,31 +3032,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); } @@ -3068,7 +3068,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); } @@ -3076,23 +3076,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); } @@ -3104,39 +3104,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); } @@ -3144,7 +3144,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); } @@ -3152,23 +3152,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); } @@ -3176,7 +3176,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 @@ -3190,7 +3190,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); } @@ -3199,7 +3199,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); } @@ -3208,7 +3208,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); } @@ -3217,7 +3217,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); } @@ -3225,8 +3225,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); } @@ -3237,7 +3237,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); } @@ -3245,7 +3245,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); } @@ -3254,7 +3254,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); } @@ -3273,7 +3273,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); } @@ -3286,7 +3286,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); } @@ -3304,7 +3304,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); } @@ -3312,8 +3312,8 @@ 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) -//{ return functions::isfinite(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); } @@ -3321,8 +3321,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); } @@ -3330,8 +3330,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); } @@ -3339,8 +3339,8 @@ 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) -//{ return functions::isnormal(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); } @@ -3348,8 +3348,8 @@ 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) -//{ return functions::signbit(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); } @@ -3363,7 +3363,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); } @@ -3375,7 +3375,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); } @@ -3395,7 +3395,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); } @@ -3407,7 +3407,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); } @@ -3419,7 +3419,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); } @@ -3439,7 +3439,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); } diff --git a/src/cuda-sim/instructions.cc b/src/cuda-sim/instructions.cc index 0d56558..bf9a040 100644 --- a/src/cuda-sim/instructions.cc +++ b/src/cuda-sim/instructions.cc @@ -3619,7 +3619,7 @@ void mma_ld_impl(const ptx_instruction *pI, core_t *core, warp_inst_t &inst) { if ((wmma_type == LOAD_C) && (type == F16_TYPE) && (wmma_layout == COL)) // memory address is scattered, check the // profiling xls for more detail. - inst.data_size = 2; // 2 byte transaction + inst.data_size = 2; // 2 byte transaction else inst.data_size = 4; // 4 byte transaction assert(inst.memory_op == insn_memory_op); -- cgit v1.3