From 9006f9877d3bc3938f83bd2fcfb671fb086acbb0 Mon Sep 17 00:00:00 2001 From: Michael Bentley Date: Thu, 22 Jun 2017 11:59:56 -0700 Subject: [PATCH] Rename macro: Q_UNUSED -> FLIT_UNUSED --- inputGen/helper.cpp | 6 +++--- litmus-tests/disabled/SimpleCHull.cpp | 2 +- litmus-tests/tests/Paranoia.cpp | 16 ++++++++-------- litmus-tests/tests/langois.cpp | 6 +++--- litmus-tests/tests/tinys.cpp | 4 ++-- src/TestBase.hpp | 10 +++++----- src/flitHelpers.hpp | 10 +++++----- 7 files changed, 27 insertions(+), 27 deletions(-) diff --git a/inputGen/helper.cpp b/inputGen/helper.cpp index 804c8444..9496223f 100644 --- a/inputGen/helper.cpp +++ b/inputGen/helper.cpp @@ -19,7 +19,7 @@ class FmtRestore { void printTestVal(const std::string &funcName, float val) { FmtRestore restorer(std::cout); - Q_UNUSED(restorer); + FLIT_UNUSED(restorer); auto intval = flit::as_int(val); std::cout << funcName << ": 0x" @@ -31,7 +31,7 @@ void printTestVal(const std::string &funcName, float val) { void printTestVal(const std::string &funcName, double val) { FmtRestore restorer(std::cout); - Q_UNUSED(restorer); + FLIT_UNUSED(restorer); auto intval = flit::as_int(val); std::cout << funcName << ": 0x" @@ -43,7 +43,7 @@ void printTestVal(const std::string &funcName, double val) { void printTestVal(const std::string &funcName, long double val) { FmtRestore restorer(std::cout); - Q_UNUSED(restorer); + FLIT_UNUSED(restorer); auto intval = flit::as_int(val); uint64_t lhalf = static_cast((intval >> 64)) & 0xFFFFL; diff --git a/litmus-tests/disabled/SimpleCHull.cpp b/litmus-tests/disabled/SimpleCHull.cpp index 4995d90b..a77af2ac 100644 --- a/litmus-tests/disabled/SimpleCHull.cpp +++ b/litmus-tests/disabled/SimpleCHull.cpp @@ -19,7 +19,7 @@ class SimpleCHull: public flit::TestBase { virtual flit::ResultType::mapped_type run_impl(const flit::TestInput& ti) { - Q_UNUSED(ti); + FLIT_UNUSED(ti); CHullEdges.clear(); PointList.clear(); ReadInputs(fopen("data/random_input", "r")); diff --git a/litmus-tests/tests/Paranoia.cpp b/litmus-tests/tests/Paranoia.cpp index 5c07ad95..946f6540 100644 --- a/litmus-tests/tests/Paranoia.cpp +++ b/litmus-tests/tests/Paranoia.cpp @@ -307,7 +307,7 @@ namespace { /* floating point exception receiver */ void sigfpe(int i) { - Q_UNUSED(i); + FLIT_UNUSED(i); fpecount++; info_stream << endl << "* * * FLOATING-POINT ERROR * * *\n"; (void)fflush(stdout); @@ -322,7 +322,7 @@ void sigfpe(int i) template flit::ResultType::mapped_type Paranoia::run_impl(const flit::TestInput& ti) { - Q_UNUSED(ti); + FLIT_UNUSED(ti); int timeoutMillis = 1000; enum class ExitStatus { SuccessStatus = 0, @@ -1837,32 +1837,32 @@ flit::ResultType::mapped_type Paranoia::run_impl(const flit::TestInput& ti info_stream << id << "END OF TEST.\n"; } catch (const TimeoutError &e) { - Q_UNUSED(e); + FLIT_UNUSED(e); info_stream << id << ": timeout error occurred" << endl; status = ExitStatus::TimeoutStatus; } catch (const FailureError &e) { - Q_UNUSED(e); + FLIT_UNUSED(e); info_stream << id << ": failure error occurred" << endl; status = ExitStatus::FailureStatus; } catch (const SeriousError &e) { - Q_UNUSED(e); + FLIT_UNUSED(e); info_stream << id << ": serious error occurred" << endl; status = ExitStatus::SeriousStatus; } catch (const DefectError &e) { - Q_UNUSED(e); + FLIT_UNUSED(e); info_stream << id << ": defect error occurred" << endl; status = ExitStatus::DefectStatus; } catch (const FlawError &e) { - Q_UNUSED(e); + FLIT_UNUSED(e); info_stream << id << ": flaw error occurred" << endl; status = ExitStatus::FlawStatus; } catch (const OverflowError &e) { - Q_UNUSED(e); + FLIT_UNUSED(e); info_stream << id << ": overflow error occurred" << endl; status = ExitStatus::OverflowStatus; } diff --git a/litmus-tests/tests/langois.cpp b/litmus-tests/tests/langois.cpp index 180efa77..eea104df 100644 --- a/litmus-tests/tests/langois.cpp +++ b/litmus-tests/tests/langois.cpp @@ -88,7 +88,7 @@ class langDotFMA: public flit::TestBase { virtual flit::ResultType::mapped_type run_impl(const flit::TestInput& ti) { - Q_UNUSED(ti); + FLIT_UNUSED(ti); using stype = typename std::vector::size_type; stype size = 16; auto rand = flit::getRandSeq(); @@ -124,7 +124,7 @@ class langCompDotFMA: public flit::TestBase { virtual flit::ResultType::mapped_type run_impl(const flit::TestInput& ti) { - Q_UNUSED(ti); + FLIT_UNUSED(ti); using stype = typename std::vector::size_type; stype size = 16; auto rand = flit::getRandSeq(); @@ -163,7 +163,7 @@ class langCompDot: public flit::TestBase { virtual flit::ResultType::mapped_type run_impl(const flit::TestInput& ti) { - Q_UNUSED(ti); + FLIT_UNUSED(ti); using stype = typename std::vector::size_type; stype size = 16; auto rand = flit::getRandSeq(); diff --git a/litmus-tests/tests/tinys.cpp b/litmus-tests/tests/tinys.cpp index f33e8921..fa482a3b 100644 --- a/litmus-tests/tests/tinys.cpp +++ b/litmus-tests/tests/tinys.cpp @@ -118,7 +118,7 @@ class dotProd: public flit::TestBase { virtual flit::ResultType::mapped_type run_impl(const flit::TestInput& ti) { - Q_UNUSED(ti); + FLIT_UNUSED(ti); auto size = 16; auto rand = flit::getRandSeq(); @@ -159,7 +159,7 @@ class simpleReduction: public flit::TestBase { virtual flit::ResultType::mapped_type run_impl(const flit::TestInput& ti) { - Q_UNUSED(ti); + FLIT_UNUSED(ti); auto vals = flit::getRandSeq(); auto sublen = vals.size() / 4 - 1; T sum = 0; diff --git a/src/TestBase.hpp b/src/TestBase.hpp index aa921421..609bbfff 100644 --- a/src/TestBase.hpp +++ b/src/TestBase.hpp @@ -116,8 +116,8 @@ std::unique_ptr*> makeCudaArr(const T* vals, size_t length) { return ptr; #else - Q_UNUSED(vals); - Q_UNUSED(length); + FLIT_UNUSED(vals); + FLIT_UNUSED(length); throw std::runtime_error("Should not use makeCudaArr without CUDA enabled"); #endif } @@ -184,9 +184,9 @@ runKernel(KernelFunction* kernel, const TestInput& ti, size_t stride) { return results; #else // not __CUDA__ // Do nothing - Q_UNUSED(kernel); - Q_UNUSED(ti); - Q_UNUSED(stride); + FLIT_UNUSED(kernel); + FLIT_UNUSED(ti); + FLIT_UNUSED(stride); return {}; #endif // __CUDA__ } diff --git a/src/flitHelpers.hpp b/src/flitHelpers.hpp index c806d1f2..387dbaad 100644 --- a/src/flitHelpers.hpp +++ b/src/flitHelpers.hpp @@ -19,8 +19,8 @@ #include -#ifndef Q_UNUSED -#define Q_UNUSED(x) (void)x +#ifndef FLIT_UNUSED +#define FLIT_UNUSED(x) (void)x #endif // #ifdef __CUDA__ @@ -38,21 +38,21 @@ const int RAND_VECT_SIZE = 256; inline float get_next_type(long double x){ - Q_UNUSED(x); + FLIT_UNUSED(x); return 0.0f; } inline double get_next_type(float x){ - Q_UNUSED(x); + FLIT_UNUSED(x); return 0.0; } inline long double get_next_type(double x){ - Q_UNUSED(x); + FLIT_UNUSED(x); return 0.0l; }