From 5467c0cac55b02bda69057fe0a130379934b8edb Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Sun, 19 Nov 2017 21:09:24 +0100 Subject: Fixed a variety of warnings and an error for MSVC2013 compilation --- src/tuning/routines/xgemm.cpp | 9 +++++---- src/tuning/tuning.hpp | 11 ++++------- 2 files changed, 9 insertions(+), 11 deletions(-) (limited to 'src/tuning') diff --git a/src/tuning/routines/xgemm.cpp b/src/tuning/routines/xgemm.cpp index cd22137a..a12ab706 100644 --- a/src/tuning/routines/xgemm.cpp +++ b/src/tuning/routines/xgemm.cpp @@ -75,10 +75,11 @@ void TuneXgemm(int argc, char* argv[]) { const auto queue = Queue(context, device); // Buffers - auto a_mat = Buffer(context, to * to); - auto b_mat = Buffer(context, to * to); - auto c_mat = Buffer(context, to * to); - auto buffers = std::vector>{a_mat, b_mat, c_mat}; + auto buffers = std::vector>{ + Buffer(context, to * to), + Buffer(context, to * to), + Buffer(context, to * to) + }; // In-direct version printf("\n* Testing the in-direct GEMM routine for m=n=k\n"); diff --git a/src/tuning/tuning.hpp b/src/tuning/tuning.hpp index 2c7f6a0b..12826d0c 100644 --- a/src/tuning/tuning.hpp +++ b/src/tuning/tuning.hpp @@ -180,12 +180,9 @@ void Tuner(int argc, char* argv[]) { auto host_buffer = std::vector(size); PopulateVector(host_buffer, mt, dist); source_buffers.push_back(host_buffer); - auto reference_buffer = std::vector(size); - reference_buffers.push_back(reference_buffer); - auto result_buffer = std::vector(size); - result_buffers.push_back(result_buffer); - auto device_buffer = Buffer(context, size); - device_buffers.push_back(device_buffer); + reference_buffers.push_back(std::vector(size)); + result_buffers.push_back(std::vector(size)); + device_buffers.push_back(Buffer(context, size)); } // Sets the tunable parameters and their possible values @@ -329,7 +326,7 @@ void Tuner(int argc, char* argv[]) { printf(" %6.1lf |", settings.metric_amount / (time_ms * 1.0e6)); printf(" %sresults match%s |\n", kPrintSuccess.c_str(), kPrintEnd.c_str()); } - catch (const CLCudaAPIBuildError &e) { + catch (CLCudaAPIBuildError) { const auto status_code = DispatchExceptionCatchAll(true); printf(" %scompilation error: %5d%s |", kPrintError.c_str(), static_cast(status_code), kPrintEnd.c_str()); -- cgit v1.2.3