From 19504ed60973bcdb920ec3e8c3004c2c7ca98e93 Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Sun, 25 Jun 2017 20:59:22 +0200 Subject: Moved static variable declarations from .cpp to .hpp to resolve some Clang warnings --- test/correctness/testblas.cpp | 27 +-------------------------- test/correctness/testblas.hpp | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 26 deletions(-) (limited to 'test') diff --git a/test/correctness/testblas.cpp b/test/correctness/testblas.cpp index 7bc9c869..1c8aab33 100644 --- a/test/correctness/testblas.cpp +++ b/test/correctness/testblas.cpp @@ -21,37 +21,12 @@ namespace clblast { // ================================================================================================= -template const int TestBlas::kSeed = 42; // fixed seed for reproducibility - -// Test settings for the regular test. Append to these lists in case more tests are required. -template const std::vector TestBlas::kVectorDims = { 7, 93, 144, 4096 }; -template const std::vector TestBlas::kIncrements = { 1, 2, 7 }; -template const std::vector TestBlas::kMatrixDims = { 7, 64 }; -template const std::vector TestBlas::kMatrixVectorDims = { 61, 256 }; -template const std::vector TestBlas::kBandSizes = { 4, 19 }; -template const std::vector TestBlas::kBatchCounts = { 1, 3 }; - -// Test settings for the invalid tests -template const std::vector TestBlas::kInvalidIncrements = { 0, 1 }; -template const size_t TestBlas::kBufferSize = 64; -template const std::vector TestBlas::kMatSizes = {0, kBufferSize*kBufferSize-1, kBufferSize*kBufferSize}; -template const std::vector TestBlas::kVecSizes = {0, kBufferSize - 1, kBufferSize}; - -// The layout/transpose/triangle options to test with -template const std::vector TestBlas::kLayouts = {Layout::kRowMajor, Layout::kColMajor}; -template const std::vector TestBlas::kTriangles = {Triangle::kUpper, Triangle::kLower}; -template const std::vector TestBlas::kSides = {Side::kLeft, Side::kRight}; -template const std::vector TestBlas::kDiagonals = {Diagonal::kUnit, Diagonal::kNonUnit}; -template <> const std::vector TestBlas::kTransposes = {Transpose::kNo, Transpose::kYes}; -template <> const std::vector TestBlas::kTransposes = {Transpose::kNo, Transpose::kYes}; -template <> const std::vector TestBlas::kTransposes = {Transpose::kNo, Transpose::kYes}; +// The transpose configurations to test with: cases other than No/Yes template <> const std::vector TestBlas::kTransposes = {Transpose::kNo, Transpose::kYes, Transpose::kConjugate}; template <> const std::vector TestBlas::kTransposes = {Transpose::kNo, Transpose::kYes, Transpose::kConjugate}; template <> const std::vector TestBlas::kTransposes = {Transpose::kNo, Transpose::kConjugate}; template <> const std::vector TestBlas::kTransposes = {Transpose::kNo, Transpose::kConjugate}; -// ================================================================================================= - // Constructor, initializes the base class tester and input data template TestBlas::TestBlas(const std::vector &arguments, const bool silent, diff --git a/test/correctness/testblas.hpp b/test/correctness/testblas.hpp index 560ff4d3..efa60ab2 100644 --- a/test/correctness/testblas.hpp +++ b/test/correctness/testblas.hpp @@ -121,6 +121,35 @@ class TestBlas: public Tester { // ================================================================================================= +template const int TestBlas::kSeed = 42; // fixed seed for reproducibility + +// Test settings for the regular test. Append to these lists in case more tests are required. +template const std::vector TestBlas::kVectorDims = { 7, 93, 144, 4096 }; +template const std::vector TestBlas::kIncrements = { 1, 2, 7 }; +template const std::vector TestBlas::kMatrixDims = { 7, 64 }; +template const std::vector TestBlas::kMatrixVectorDims = { 61, 256 }; +template const std::vector TestBlas::kBandSizes = { 4, 19 }; +template const std::vector TestBlas::kBatchCounts = { 1, 3 }; + +// Test settings for the invalid tests +template const std::vector TestBlas::kInvalidIncrements = { 0, 1 }; +template const size_t TestBlas::kBufferSize = 64; +template const std::vector TestBlas::kMatSizes = {0, kBufferSize*kBufferSize-1, kBufferSize*kBufferSize}; +template const std::vector TestBlas::kVecSizes = {0, kBufferSize - 1, kBufferSize}; + +// The layout/transpose/triangle options to test with +template const std::vector TestBlas::kLayouts = {Layout::kRowMajor, Layout::kColMajor}; +template const std::vector TestBlas::kTriangles = {Triangle::kUpper, Triangle::kLower}; +template const std::vector TestBlas::kSides = {Side::kLeft, Side::kRight}; +template const std::vector TestBlas::kDiagonals = {Diagonal::kUnit, Diagonal::kNonUnit}; +template const std::vector TestBlas::kTransposes = {Transpose::kNo, Transpose::kYes}; +template <> const std::vector TestBlas::kTransposes; // see testblas.cpp +template <> const std::vector TestBlas::kTransposes; // see testblas.cpp +template <> const std::vector TestBlas::kTransposes; // see testblas.cpp +template <> const std::vector TestBlas::kTransposes; // see testblas.cpp + +// ================================================================================================= + // Bogus reference function, in case a comparison library is not available template static StatusCode ReferenceNotAvailable(const Arguments &, BufferType &, Queue &) { -- cgit v1.2.3