From afe8852eaae20fbdd3f38e9cac63a9162251d90b Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Fri, 17 Jun 2016 11:29:07 +0200 Subject: [PATCH 1/9] Moved the test-for-valid-buffers function from the Routine class to separate functions in a separate file --- include/clblast.h | 4 +- include/clblast_c.h | 4 +- include/internal/buffer_test.h | 121 +++++++++++++++++++ include/internal/routine.h | 23 +--- include/internal/routines/level1/xamax.h | 2 - include/internal/routines/level1/xasum.h | 2 - include/internal/routines/level1/xaxpy.h | 2 - include/internal/routines/level1/xcopy.h | 2 - include/internal/routines/level1/xdot.h | 3 - include/internal/routines/level1/xnrm2.h | 2 - include/internal/routines/level1/xscal.h | 1 - include/internal/routines/level1/xswap.h | 2 - include/internal/routines/level2/xgemv.h | 4 - include/internal/routines/level2/xger.h | 3 - include/internal/routines/level2/xher.h | 3 - include/internal/routines/level2/xher2.h | 4 - include/internal/routines/level3/xgemm.h | 3 - include/internal/routines/level3/xhemm.h | 1 - include/internal/routines/level3/xher2k.h | 3 - include/internal/routines/level3/xherk.h | 2 - include/internal/routines/level3/xsymm.h | 1 - include/internal/routines/level3/xsyr2k.h | 3 - include/internal/routines/level3/xsyrk.h | 2 - include/internal/routines/level3/xtrmm.h | 1 - include/internal/routines/levelx/xomatcopy.h | 2 - src/routine.cc | 114 ----------------- src/routines/level1/xamax.cc | 4 +- src/routines/level1/xasum.cc | 4 +- src/routines/level1/xaxpy.cc | 4 +- src/routines/level1/xcopy.cc | 4 +- src/routines/level1/xdot.cc | 6 +- src/routines/level1/xnrm2.cc | 4 +- src/routines/level1/xscal.cc | 2 +- src/routines/level1/xswap.cc | 4 +- src/routines/level2/xgemv.cc | 8 +- src/routines/level2/xger.cc | 6 +- src/routines/level2/xher.cc | 6 +- src/routines/level2/xher2.cc | 8 +- src/routines/level3/xgemm.cc | 6 +- src/routines/level3/xhemm.cc | 2 +- src/routines/level3/xher2k.cc | 6 +- src/routines/level3/xherk.cc | 4 +- src/routines/level3/xsymm.cc | 2 +- src/routines/level3/xsyr2k.cc | 6 +- src/routines/level3/xsyrk.cc | 4 +- src/routines/level3/xtrmm.cc | 2 +- src/routines/levelx/xomatcopy.cc | 4 +- 47 files changed, 174 insertions(+), 236 deletions(-) create mode 100644 include/internal/buffer_test.h diff --git a/include/clblast.h b/include/clblast.h index 31a07423..c8596b39 100644 --- a/include/clblast.h +++ b/include/clblast.h @@ -68,8 +68,8 @@ enum class StatusCode { kInvalidLocalMemUsage = -2046, // Not enough local memory available on this device kNoHalfPrecision = -2045, // Half precision (16-bits) not supported by the device kNoDoublePrecision = -2044, // Double precision (64-bits) not supported by the device - kInvalidVectorDot = -2043, // Vector dot is not a valid OpenCL buffer - kInsufficientMemoryDot = -2042, // Vector dot's OpenCL buffer is too small + kInvalidVectorScalar = -2043, // The unit-sized vector is not a valid OpenCL buffer + kInsufficientMemoryScalar = -2042, // The unit-sized vector's OpenCL buffer is too small }; // Matrix layout and transpose types diff --git a/include/clblast_c.h b/include/clblast_c.h index 3ac6d99c..b92febac 100644 --- a/include/clblast_c.h +++ b/include/clblast_c.h @@ -77,8 +77,8 @@ typedef enum StatusCode_ { kInvalidLocalMemUsage = -2046, // Not enough local memory available on this device kNoHalfPrecision = -2045, // Half precision (16-bits) not supported by the device kNoDoublePrecision = -2044, // Double precision (64-bits) not supported by the device - kInvalidVectorDot = -2043, // Vector dot is not a valid OpenCL buffer - kInsufficientMemoryDot = -2042, // Vector dot's OpenCL buffer is too small + kInvalidVectorScalar = -2043, // The unit-sized vector is not a valid OpenCL buffer + kInsufficientMemoryScalar = -2042, // The unit-sized vector's OpenCL buffer is too small } StatusCode; // Matrix layout and transpose types diff --git a/include/internal/buffer_test.h b/include/internal/buffer_test.h new file mode 100644 index 00000000..80f5243f --- /dev/null +++ b/include/internal/buffer_test.h @@ -0,0 +1,121 @@ + +// ================================================================================================= +// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This +// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max- +// width of 100 characters per line. +// +// Author(s): +// Cedric Nugteren +// +// This file implements the tests for the OpenCL buffers (matrices and vectors). These tests are +// templated and thus header-only. +// +// ================================================================================================= + +#ifndef CLBLAST_BUFFER_TEST_H_ +#define CLBLAST_BUFFER_TEST_H_ + +#include "clblast.h" + +namespace clblast { +// ================================================================================================= + +// Tests matrix 'A' for validity +template +StatusCode TestMatrixA(const size_t one, const size_t two, const Buffer &buffer, + const size_t offset, const size_t ld) { + if (ld < one) { return StatusCode::kInvalidLeadDimA; } + try { + const auto required_size = (ld * (two - 1) + one + offset) * sizeof(T); + if (buffer.GetSize() < required_size) { return StatusCode::kInsufficientMemoryA; } + } catch (...) { return StatusCode::kInvalidMatrixA; } + return StatusCode::kSuccess; +} + +// Tests matrix 'B' for validity +template +StatusCode TestMatrixB(const size_t one, const size_t two, const Buffer &buffer, + const size_t offset, const size_t ld) { + if (ld < one) { return StatusCode::kInvalidLeadDimB; } + try { + const auto required_size = (ld * (two - 1) + one + offset) * sizeof(T); + if (buffer.GetSize() < required_size) { return StatusCode::kInsufficientMemoryB; } + } catch (...) { return StatusCode::kInvalidMatrixB; } + return StatusCode::kSuccess; +} + +// Tests matrix 'C' for validity +template +StatusCode TestMatrixC(const size_t one, const size_t two, const Buffer &buffer, + const size_t offset, const size_t ld) { + if (ld < one) { return StatusCode::kInvalidLeadDimC; } + try { + const auto required_size = (ld * (two - 1) + one + offset) * sizeof(T); + if (buffer.GetSize() < required_size) { return StatusCode::kInsufficientMemoryC; } + } catch (...) { return StatusCode::kInvalidMatrixC; } + return StatusCode::kSuccess; +} + +// Tests matrix 'AP' for validity +template +StatusCode TestMatrixAP(const size_t n, const Buffer &buffer, const size_t offset) { + try { + const auto required_size = (((n * (n + 1)) / 2) + offset) * sizeof(T); + if (buffer.GetSize() < required_size) { return StatusCode::kInsufficientMemoryA; } + } catch (...) { return StatusCode::kInvalidMatrixA; } + return StatusCode::kSuccess; +} + +// ================================================================================================= + +// Tests vector 'X' for validity +template +StatusCode TestVectorX(const size_t n, const Buffer &buffer, const size_t offset, + const size_t inc) { + if (inc == 0) { return StatusCode::kInvalidIncrementX; } + try { + const auto required_size = ((n - 1) * inc + 1 + offset) * sizeof(T); + if (buffer.GetSize() < required_size) { return StatusCode::kInsufficientMemoryX; } + } catch (...) { return StatusCode::kInvalidVectorX; } + return StatusCode::kSuccess; +} + +// Tests vector 'Y' for validity +template +StatusCode TestVectorY(const size_t n, const Buffer &buffer, const size_t offset, + const size_t inc) { + if (inc == 0) { return StatusCode::kInvalidIncrementY; } + try { + const auto required_size = ((n - 1) * inc + 1 + offset) * sizeof(T); + if (buffer.GetSize() < required_size) { return StatusCode::kInsufficientMemoryY; } + } catch (...) { return StatusCode::kInvalidVectorY; } + return StatusCode::kSuccess; +} + +// ================================================================================================= + +// Tests vector 'scalar' for validity +template +StatusCode TestVectorScalar(const size_t n, const Buffer &buffer, const size_t offset) { + try { + const auto required_size = (n + offset) * sizeof(T); + if (buffer.GetSize() < required_size) { return StatusCode::kInsufficientMemoryScalar; } + } catch (...) { return StatusCode::kInvalidVectorScalar; } + return StatusCode::kSuccess; +} + +// Tests vector 'index' for validity +template +StatusCode TestVectorIndex(const size_t n, const Buffer &buffer, const size_t offset) { + try { + const auto required_size = (n + offset) * sizeof(T); + if (buffer.GetSize() < required_size) { return StatusCode::kInsufficientMemoryScalar; } + } catch (...) { return StatusCode::kInvalidVectorScalar; } + return StatusCode::kSuccess; +} + +// ================================================================================================= +} // namespace clblast + +// CLBLAST_BUFFER_TEST_H_ +#endif diff --git a/include/internal/routine.h b/include/internal/routine.h index 35837575..0b53b82e 100644 --- a/include/internal/routine.h +++ b/include/internal/routine.h @@ -22,6 +22,7 @@ #include "internal/cache.h" #include "internal/utilities.h" #include "internal/database.h" +#include "internal/buffer_test.h" namespace clblast { // ================================================================================================= @@ -52,28 +53,6 @@ class Routine { StatusCode RunKernel(Kernel &kernel, std::vector global, const std::vector &local, EventPointer event); - // Tests for valid inputs of matrices A, B, and C - StatusCode TestMatrixA(const size_t one, const size_t two, const Buffer &buffer, - const size_t offset, const size_t ld, const size_t data_size); - StatusCode TestMatrixB(const size_t one, const size_t two, const Buffer &buffer, - const size_t offset, const size_t ld, const size_t data_size); - StatusCode TestMatrixC(const size_t one, const size_t two, const Buffer &buffer, - const size_t offset, const size_t ld, const size_t data_size); - StatusCode TestMatrixAP(const size_t n, const Buffer &buffer, - const size_t offset, const size_t data_size); - - // Tests for valid inputs of vector X and Y - StatusCode TestVectorX(const size_t n, const Buffer &buffer, const size_t offset, - const size_t inc, const size_t data_size); - StatusCode TestVectorY(const size_t n, const Buffer &buffer, const size_t offset, - const size_t inc, const size_t data_size); - - // Tests for valid inputs of other vectors - StatusCode TestVectorDot(const size_t n, const Buffer &buffer, const size_t offset, - const size_t data_size); - StatusCode TestVectorIndex(const size_t n, const Buffer &buffer, - const size_t offset, const size_t data_size); - // Copies/transposes a matrix and padds/unpads it with zeroes. This method is also able to write // to symmetric and triangular matrices through optional arguments. StatusCode PadCopyTransposeMatrix(EventPointer event, std::vector& waitForEvents, diff --git a/include/internal/routines/level1/xamax.h b/include/internal/routines/level1/xamax.h index c318115e..b44e0ceb 100644 --- a/include/internal/routines/level1/xamax.h +++ b/include/internal/routines/level1/xamax.h @@ -31,8 +31,6 @@ class Xamax: public Routine { using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::TestVectorX; - using Routine::TestVectorIndex; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level1/xasum.h b/include/internal/routines/level1/xasum.h index b6e5d2cd..8e22d76a 100644 --- a/include/internal/routines/level1/xasum.h +++ b/include/internal/routines/level1/xasum.h @@ -31,8 +31,6 @@ class Xasum: public Routine { using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::TestVectorX; - using Routine::TestVectorDot; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level1/xaxpy.h b/include/internal/routines/level1/xaxpy.h index 03771d53..da5b2b0f 100644 --- a/include/internal/routines/level1/xaxpy.h +++ b/include/internal/routines/level1/xaxpy.h @@ -31,8 +31,6 @@ class Xaxpy: public Routine { using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::TestVectorX; - using Routine::TestVectorY; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level1/xcopy.h b/include/internal/routines/level1/xcopy.h index 5786cb0f..08e63ce4 100644 --- a/include/internal/routines/level1/xcopy.h +++ b/include/internal/routines/level1/xcopy.h @@ -30,8 +30,6 @@ class Xcopy: public Routine { using Routine::queue_; using Routine::event_; using Routine::GetProgramFromCache; - using Routine::TestVectorX; - using Routine::TestVectorY; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level1/xdot.h b/include/internal/routines/level1/xdot.h index 95a7ad07..5c46e0dc 100644 --- a/include/internal/routines/level1/xdot.h +++ b/include/internal/routines/level1/xdot.h @@ -31,9 +31,6 @@ class Xdot: public Routine { using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::TestVectorX; - using Routine::TestVectorY; - using Routine::TestVectorDot; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level1/xnrm2.h b/include/internal/routines/level1/xnrm2.h index 6f6ca74f..5abfaa59 100644 --- a/include/internal/routines/level1/xnrm2.h +++ b/include/internal/routines/level1/xnrm2.h @@ -31,8 +31,6 @@ class Xnrm2: public Routine { using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::TestVectorX; - using Routine::TestVectorDot; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level1/xscal.h b/include/internal/routines/level1/xscal.h index e10a201d..5786869f 100644 --- a/include/internal/routines/level1/xscal.h +++ b/include/internal/routines/level1/xscal.h @@ -30,7 +30,6 @@ class Xscal: public Routine { using Routine::queue_; using Routine::event_; using Routine::GetProgramFromCache; - using Routine::TestVectorX; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level1/xswap.h b/include/internal/routines/level1/xswap.h index 0f240763..483f21d5 100644 --- a/include/internal/routines/level1/xswap.h +++ b/include/internal/routines/level1/xswap.h @@ -30,8 +30,6 @@ class Xswap: public Routine { using Routine::queue_; using Routine::event_; using Routine::GetProgramFromCache; - using Routine::TestVectorX; - using Routine::TestVectorY; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level2/xgemv.h b/include/internal/routines/level2/xgemv.h index 875f936e..6e8f0e47 100644 --- a/include/internal/routines/level2/xgemv.h +++ b/include/internal/routines/level2/xgemv.h @@ -31,10 +31,6 @@ class Xgemv: public Routine { using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::TestVectorX; - using Routine::TestVectorY; - using Routine::TestMatrixA; - using Routine::TestMatrixAP; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level2/xger.h b/include/internal/routines/level2/xger.h index 1d5c64bd..b0c67798 100644 --- a/include/internal/routines/level2/xger.h +++ b/include/internal/routines/level2/xger.h @@ -31,9 +31,6 @@ class Xger: public Routine { using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::TestVectorX; - using Routine::TestVectorY; - using Routine::TestMatrixA; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level2/xher.h b/include/internal/routines/level2/xher.h index ebd20ee8..7b735882 100644 --- a/include/internal/routines/level2/xher.h +++ b/include/internal/routines/level2/xher.h @@ -31,9 +31,6 @@ class Xher: public Routine { using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::TestVectorX; - using Routine::TestMatrixA; - using Routine::TestMatrixAP; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level2/xher2.h b/include/internal/routines/level2/xher2.h index a33a71c3..dd5ca4bf 100644 --- a/include/internal/routines/level2/xher2.h +++ b/include/internal/routines/level2/xher2.h @@ -31,10 +31,6 @@ class Xher2: public Routine { using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::TestVectorX; - using Routine::TestVectorY; - using Routine::TestMatrixA; - using Routine::TestMatrixAP; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level3/xgemm.h b/include/internal/routines/level3/xgemm.h index 85fb0616..22624e61 100644 --- a/include/internal/routines/level3/xgemm.h +++ b/include/internal/routines/level3/xgemm.h @@ -32,9 +32,6 @@ class Xgemm: public Routine { using Routine::context_; using Routine::GetProgramFromCache; using Routine::PadCopyTransposeMatrix; - using Routine::TestMatrixA; - using Routine::TestMatrixB; - using Routine::TestMatrixC; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level3/xhemm.h b/include/internal/routines/level3/xhemm.h index ec42b569..9f4557b4 100644 --- a/include/internal/routines/level3/xhemm.h +++ b/include/internal/routines/level3/xhemm.h @@ -29,7 +29,6 @@ class Xhemm: public Xgemm { using Routine::db_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::TestMatrixA; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level3/xher2k.h b/include/internal/routines/level3/xher2k.h index 623afd49..8a4191a6 100644 --- a/include/internal/routines/level3/xher2k.h +++ b/include/internal/routines/level3/xher2k.h @@ -34,9 +34,6 @@ class Xher2k: public Routine { using Routine::context_; using Routine::GetProgramFromCache; using Routine::PadCopyTransposeMatrix; - using Routine::TestMatrixA; - using Routine::TestMatrixB; - using Routine::TestMatrixC; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level3/xherk.h b/include/internal/routines/level3/xherk.h index 629695ff..b279d724 100644 --- a/include/internal/routines/level3/xherk.h +++ b/include/internal/routines/level3/xherk.h @@ -34,8 +34,6 @@ class Xherk: public Routine { using Routine::context_; using Routine::GetProgramFromCache; using Routine::PadCopyTransposeMatrix; - using Routine::TestMatrixA; - using Routine::TestMatrixC; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level3/xsymm.h b/include/internal/routines/level3/xsymm.h index 16ad6f53..a0cb7b90 100644 --- a/include/internal/routines/level3/xsymm.h +++ b/include/internal/routines/level3/xsymm.h @@ -31,7 +31,6 @@ class Xsymm: public Xgemm { using Routine::db_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::TestMatrixA; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level3/xsyr2k.h b/include/internal/routines/level3/xsyr2k.h index 88669626..e498b7e6 100644 --- a/include/internal/routines/level3/xsyr2k.h +++ b/include/internal/routines/level3/xsyr2k.h @@ -34,9 +34,6 @@ class Xsyr2k: public Routine { using Routine::context_; using Routine::GetProgramFromCache; using Routine::PadCopyTransposeMatrix; - using Routine::TestMatrixA; - using Routine::TestMatrixB; - using Routine::TestMatrixC; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level3/xsyrk.h b/include/internal/routines/level3/xsyrk.h index e95c7c1c..f7fa9b6a 100644 --- a/include/internal/routines/level3/xsyrk.h +++ b/include/internal/routines/level3/xsyrk.h @@ -36,8 +36,6 @@ class Xsyrk: public Routine { using Routine::context_; using Routine::GetProgramFromCache; using Routine::PadCopyTransposeMatrix; - using Routine::TestMatrixA; - using Routine::TestMatrixC; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/level3/xtrmm.h b/include/internal/routines/level3/xtrmm.h index 01f6594d..8527df58 100644 --- a/include/internal/routines/level3/xtrmm.h +++ b/include/internal/routines/level3/xtrmm.h @@ -30,7 +30,6 @@ class Xtrmm: public Xgemm { using Routine::db_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::TestMatrixA; using Routine::RunKernel; using Routine::ErrorIn; diff --git a/include/internal/routines/levelx/xomatcopy.h b/include/internal/routines/levelx/xomatcopy.h index 38df846e..ec42d64a 100644 --- a/include/internal/routines/levelx/xomatcopy.h +++ b/include/internal/routines/levelx/xomatcopy.h @@ -29,8 +29,6 @@ class Xomatcopy: public Routine { using Routine::event_; using Routine::GetProgramFromCache; using Routine::PadCopyTransposeMatrix; - using Routine::TestMatrixA; - using Routine::TestMatrixB; using Routine::ErrorIn; // Constructor diff --git a/src/routine.cc b/src/routine.cc index 1cf8bff8..ee3ba341 100644 --- a/src/routine.cc +++ b/src/routine.cc @@ -179,120 +179,6 @@ StatusCode Routine::RunKernel(Kernel &kernel, std::vector global, // ================================================================================================= -// Tests matrix A for validity: checks for a valid OpenCL buffer, a valid lead-dimension, and for a -// sufficient buffer size. -template -StatusCode Routine::TestMatrixA(const size_t one, const size_t two, const Buffer &buffer, - const size_t offset, const size_t ld, const size_t data_size) { - if (ld < one) { return StatusCode::kInvalidLeadDimA; } - try { - const auto required_size = (ld*(two-1) + one + offset)*data_size; - const auto buffer_size = buffer.GetSize(); - if (buffer_size < required_size) { return StatusCode::kInsufficientMemoryA; } - } catch (...) { return StatusCode::kInvalidMatrixA; } - return StatusCode::kSuccess; -} - -// Tests matrix B for validity: checks for a valid OpenCL buffer, a valid lead-dimension, and for a -// sufficient buffer size. -template -StatusCode Routine::TestMatrixB(const size_t one, const size_t two, const Buffer &buffer, - const size_t offset, const size_t ld, const size_t data_size) { - if (ld < one) { return StatusCode::kInvalidLeadDimB; } - try { - const auto required_size = (ld*(two-1) + one + offset)*data_size; - const auto buffer_size = buffer.GetSize(); - if (buffer_size < required_size) { return StatusCode::kInsufficientMemoryB; } - } catch (...) { return StatusCode::kInvalidMatrixB; } - return StatusCode::kSuccess; -} - -// Tests matrix C for validity: checks for a valid OpenCL buffer, a valid lead-dimension, and for a -// sufficient buffer size. -template -StatusCode Routine::TestMatrixC(const size_t one, const size_t two, const Buffer &buffer, - const size_t offset, const size_t ld, const size_t data_size) { - if (ld < one) { return StatusCode::kInvalidLeadDimC; } - try { - const auto required_size = (ld*(two-1) + one + offset)*data_size; - const auto buffer_size = buffer.GetSize(); - if (buffer_size < required_size) { return StatusCode::kInsufficientMemoryC; } - } catch (...) { return StatusCode::kInvalidMatrixC; } - return StatusCode::kSuccess; -} - -// Tests matrix AP for validity: checks for a valid OpenCL buffer and for a sufficient buffer size -template -StatusCode Routine::TestMatrixAP(const size_t n, const Buffer &buffer, - const size_t offset, const size_t data_size) { - try { - const auto required_size = (((n*(n+1))/2) + offset)*data_size; - const auto buffer_size = buffer.GetSize(); - if (buffer_size < required_size) { return StatusCode::kInsufficientMemoryA; } - } catch (...) { return StatusCode::kInvalidMatrixA; } - return StatusCode::kSuccess; -} - -// ================================================================================================= - -// Tests vector X for validity: checks for a valid increment, a valid OpenCL buffer, and for a -// sufficient buffer size. -template -StatusCode Routine::TestVectorX(const size_t n, const Buffer &buffer, const size_t offset, - const size_t inc, const size_t data_size) { - if (inc == 0) { return StatusCode::kInvalidIncrementX; } - try { - const auto required_size = ((n-1)*inc + 1 + offset)*data_size; - const auto buffer_size = buffer.GetSize(); - if (buffer_size < required_size) { return StatusCode::kInsufficientMemoryX; } - } catch (...) { return StatusCode::kInvalidVectorX; } - return StatusCode::kSuccess; -} - -// Tests vector Y for validity: checks for a valid increment, a valid OpenCL buffer, and for a -// sufficient buffer size. -template -StatusCode Routine::TestVectorY(const size_t n, const Buffer &buffer, const size_t offset, - const size_t inc, const size_t data_size) { - if (inc == 0) { return StatusCode::kInvalidIncrementY; } - try { - const auto required_size = ((n-1)*inc + 1 + offset)*data_size; - const auto buffer_size = buffer.GetSize(); - if (buffer_size < required_size) { return StatusCode::kInsufficientMemoryY; } - } catch (...) { return StatusCode::kInvalidVectorY; } - return StatusCode::kSuccess; -} - -// ================================================================================================= - -// Tests vector dot for validity: checks for a valid increment, a valid OpenCL buffer, and for a -// sufficient buffer size. -template -StatusCode Routine::TestVectorDot(const size_t n, const Buffer &buffer, const size_t offset, - const size_t data_size) { - try { - const auto required_size = (n + offset)*data_size; - const auto buffer_size = buffer.GetSize(); - if (buffer_size < required_size) { return StatusCode::kInsufficientMemoryDot; } - } catch (...) { return StatusCode::kInvalidVectorDot; } - return StatusCode::kSuccess; -} - -// Tests vector index for validity: checks for a valid increment, a valid OpenCL buffer, and for a -// sufficient buffer size. -template -StatusCode Routine::TestVectorIndex(const size_t n, const Buffer &buffer, - const size_t offset, const size_t data_size) { - try { - const auto required_size = (n + offset)*data_size; - const auto buffer_size = buffer.GetSize(); - if (buffer_size < required_size) { return StatusCode::kInsufficientMemoryDot; } - } catch (...) { return StatusCode::kInvalidVectorDot; } - return StatusCode::kSuccess; -} - -// ================================================================================================= - // Copies or transposes a matrix and optionally pads/unpads it with zeros template StatusCode Routine::PadCopyTransposeMatrix(EventPointer event, std::vector& waitForEvents, diff --git a/src/routines/level1/xamax.cc b/src/routines/level1/xamax.cc index 335e59bc..9a7d2173 100644 --- a/src/routines/level1/xamax.cc +++ b/src/routines/level1/xamax.cc @@ -49,9 +49,9 @@ StatusCode Xamax::DoAmax(const size_t n, if (n == 0) { return StatusCode::kInvalidDimension; } // Tests the vectors for validity - auto status = TestVectorX(n, x_buffer, x_offset, x_inc, sizeof(T)); + auto status = TestVectorX(n, x_buffer, x_offset, x_inc); if (ErrorIn(status)) { return status; } - status = TestVectorIndex(1, imax_buffer, imax_offset, sizeof(unsigned int)); + status = TestVectorIndex(1, imax_buffer, imax_offset); if (ErrorIn(status)) { return status; } // Retrieves the Xamax kernels from the compiled binary diff --git a/src/routines/level1/xasum.cc b/src/routines/level1/xasum.cc index e04f7064..3dcaa80a 100644 --- a/src/routines/level1/xasum.cc +++ b/src/routines/level1/xasum.cc @@ -49,9 +49,9 @@ StatusCode Xasum::DoAsum(const size_t n, if (n == 0) { return StatusCode::kInvalidDimension; } // Tests the vectors for validity - auto status = TestVectorX(n, x_buffer, x_offset, x_inc, sizeof(T)); + auto status = TestVectorX(n, x_buffer, x_offset, x_inc); if (ErrorIn(status)) { return status; } - status = TestVectorDot(1, asum_buffer, asum_offset, sizeof(T)); + status = TestVectorScalar(1, asum_buffer, asum_offset); if (ErrorIn(status)) { return status; } // Retrieves the Xasum kernels from the compiled binary diff --git a/src/routines/level1/xaxpy.cc b/src/routines/level1/xaxpy.cc index 66aa2336..b57001f9 100644 --- a/src/routines/level1/xaxpy.cc +++ b/src/routines/level1/xaxpy.cc @@ -50,9 +50,9 @@ StatusCode Xaxpy::DoAxpy(const size_t n, const T alpha, if (n == 0) { return StatusCode::kInvalidDimension; } // Tests the vectors for validity - auto status = TestVectorX(n, x_buffer, x_offset, x_inc, sizeof(T)); + auto status = TestVectorX(n, x_buffer, x_offset, x_inc); if (ErrorIn(status)) { return status; } - status = TestVectorY(n, y_buffer, y_offset, y_inc, sizeof(T)); + status = TestVectorY(n, y_buffer, y_offset, y_inc); if (ErrorIn(status)) { return status; } // Determines whether or not the fast-version can be used diff --git a/src/routines/level1/xcopy.cc b/src/routines/level1/xcopy.cc index ff8f5999..273e87a6 100644 --- a/src/routines/level1/xcopy.cc +++ b/src/routines/level1/xcopy.cc @@ -50,9 +50,9 @@ StatusCode Xcopy::DoCopy(const size_t n, if (n == 0) { return StatusCode::kInvalidDimension; } // Tests the vectors for validity - auto status = TestVectorX(n, x_buffer, x_offset, x_inc, sizeof(T)); + auto status = TestVectorX(n, x_buffer, x_offset, x_inc); if (ErrorIn(status)) { return status; } - status = TestVectorY(n, y_buffer, y_offset, y_inc, sizeof(T)); + status = TestVectorY(n, y_buffer, y_offset, y_inc); if (ErrorIn(status)) { return status; } // Determines whether or not the fast-version can be used diff --git a/src/routines/level1/xdot.cc b/src/routines/level1/xdot.cc index db6a369e..25eccadf 100644 --- a/src/routines/level1/xdot.cc +++ b/src/routines/level1/xdot.cc @@ -51,11 +51,11 @@ StatusCode Xdot::DoDot(const size_t n, if (n == 0) { return StatusCode::kInvalidDimension; } // Tests the vectors for validity - auto status = TestVectorX(n, x_buffer, x_offset, x_inc, sizeof(T)); + auto status = TestVectorX(n, x_buffer, x_offset, x_inc); if (ErrorIn(status)) { return status; } - status = TestVectorY(n, y_buffer, y_offset, y_inc, sizeof(T)); + status = TestVectorY(n, y_buffer, y_offset, y_inc); if (ErrorIn(status)) { return status; } - status = TestVectorDot(1, dot_buffer, dot_offset, sizeof(T)); + status = TestVectorScalar(1, dot_buffer, dot_offset); if (ErrorIn(status)) { return status; } // Retrieves the Xdot kernels from the compiled binary diff --git a/src/routines/level1/xnrm2.cc b/src/routines/level1/xnrm2.cc index 14f7f6aa..eca283f8 100644 --- a/src/routines/level1/xnrm2.cc +++ b/src/routines/level1/xnrm2.cc @@ -49,9 +49,9 @@ StatusCode Xnrm2::DoNrm2(const size_t n, if (n == 0) { return StatusCode::kInvalidDimension; } // Tests the vectors for validity - auto status = TestVectorX(n, x_buffer, x_offset, x_inc, sizeof(T)); + auto status = TestVectorX(n, x_buffer, x_offset, x_inc); if (ErrorIn(status)) { return status; } - status = TestVectorDot(1, nrm2_buffer, nrm2_offset, sizeof(T)); + status = TestVectorScalar(1, nrm2_buffer, nrm2_offset); if (ErrorIn(status)) { return status; } // Retrieves the Xnrm2 kernels from the compiled binary diff --git a/src/routines/level1/xscal.cc b/src/routines/level1/xscal.cc index 1207acfa..0ce211b6 100644 --- a/src/routines/level1/xscal.cc +++ b/src/routines/level1/xscal.cc @@ -49,7 +49,7 @@ StatusCode Xscal::DoScal(const size_t n, const T alpha, if (n == 0) { return StatusCode::kInvalidDimension; } // Tests the vector for validity - auto status = TestVectorX(n, x_buffer, x_offset, x_inc, sizeof(T)); + auto status = TestVectorX(n, x_buffer, x_offset, x_inc); if (ErrorIn(status)) { return status; } // Determines whether or not the fast-version can be used diff --git a/src/routines/level1/xswap.cc b/src/routines/level1/xswap.cc index 8844abff..773d78b5 100644 --- a/src/routines/level1/xswap.cc +++ b/src/routines/level1/xswap.cc @@ -50,9 +50,9 @@ StatusCode Xswap::DoSwap(const size_t n, if (n == 0) { return StatusCode::kInvalidDimension; } // Tests the vectors for validity - auto status = TestVectorX(n, x_buffer, x_offset, x_inc, sizeof(T)); + auto status = TestVectorX(n, x_buffer, x_offset, x_inc); if (ErrorIn(status)) { return status; } - status = TestVectorY(n, y_buffer, y_offset, y_inc, sizeof(T)); + status = TestVectorY(n, y_buffer, y_offset, y_inc); if (ErrorIn(status)) { return status; } // Determines whether or not the fast-version can be used diff --git a/src/routines/level2/xgemv.cc b/src/routines/level2/xgemv.cc index 71839e96..18e61f28 100644 --- a/src/routines/level2/xgemv.cc +++ b/src/routines/level2/xgemv.cc @@ -101,12 +101,12 @@ StatusCode Xgemv::MatVec(const Layout layout, const Transpose a_transpose, // Tests the matrix and the vectors for validity auto status = StatusCode::kSuccess; - if (packed) { status = TestMatrixAP(n, a_buffer, a_offset, sizeof(T)); } - else { status = TestMatrixA(a_one, a_two, a_buffer, a_offset, a_ld, sizeof(T)); } + if (packed) { status = TestMatrixAP(n, a_buffer, a_offset); } + else { status = TestMatrixA(a_one, a_two, a_buffer, a_offset, a_ld); } if (ErrorIn(status)) { return status; } - status = TestVectorX(n_real, x_buffer, x_offset, x_inc, sizeof(T)); + status = TestVectorX(n_real, x_buffer, x_offset, x_inc); if (ErrorIn(status)) { return status; } - status = TestVectorY(m_real, y_buffer, y_offset, y_inc, sizeof(T)); + status = TestVectorY(m_real, y_buffer, y_offset, y_inc); if (ErrorIn(status)) { return status; } // Determines whether or not the fast-version can be used diff --git a/src/routines/level2/xger.cc b/src/routines/level2/xger.cc index d1f98990..7d6fb091 100644 --- a/src/routines/level2/xger.cc +++ b/src/routines/level2/xger.cc @@ -58,11 +58,11 @@ StatusCode Xger::DoGer(const Layout layout, const auto a_two = (a_is_rowmajor) ? m : n; // Tests the matrix and the vectors for validity - auto status = TestMatrixA(a_one, a_two, a_buffer, a_offset, a_ld, sizeof(T)); + auto status = TestMatrixA(a_one, a_two, a_buffer, a_offset, a_ld); if (ErrorIn(status)) { return status; } - status = TestVectorX(m, x_buffer, x_offset, x_inc, sizeof(T)); + status = TestVectorX(m, x_buffer, x_offset, x_inc); if (ErrorIn(status)) { return status; } - status = TestVectorY(n, y_buffer, y_offset, y_inc, sizeof(T)); + status = TestVectorY(n, y_buffer, y_offset, y_inc); if (ErrorIn(status)) { return status; } // Upload the scalar argument as a constant buffer to the device (needed for half-precision) diff --git a/src/routines/level2/xher.cc b/src/routines/level2/xher.cc index 73e7a47d..3d5c0baf 100644 --- a/src/routines/level2/xher.cc +++ b/src/routines/level2/xher.cc @@ -67,10 +67,10 @@ StatusCode Xher::DoHer(const Layout layout, const Triangle triangle, // Tests the matrix and the vectors for validity auto status = StatusCode::kSuccess; - if (packed) { status = TestMatrixAP(n, a_buffer, a_offset, sizeof(T)); } - else { status = TestMatrixA(n, n, a_buffer, a_offset, a_ld, sizeof(T)); } + if (packed) { status = TestMatrixAP(n, a_buffer, a_offset); } + else { status = TestMatrixA(n, n, a_buffer, a_offset, a_ld); } if (ErrorIn(status)) { return status; } - status = TestVectorX(n, x_buffer, x_offset, x_inc, sizeof(T)); + status = TestVectorX(n, x_buffer, x_offset, x_inc); if (ErrorIn(status)) { return status; } // If alpha is zero an update is not required diff --git a/src/routines/level2/xher2.cc b/src/routines/level2/xher2.cc index a73dde52..a7362410 100644 --- a/src/routines/level2/xher2.cc +++ b/src/routines/level2/xher2.cc @@ -59,12 +59,12 @@ StatusCode Xher2::DoHer2(const Layout layout, const Triangle triangle, // Tests the matrix and the vectors for validity auto status = StatusCode::kSuccess; - if (packed) { status = TestMatrixAP(n, a_buffer, a_offset, sizeof(T)); } - else { status = TestMatrixA(n, n, a_buffer, a_offset, a_ld, sizeof(T)); } + if (packed) { status = TestMatrixAP(n, a_buffer, a_offset); } + else { status = TestMatrixA(n, n, a_buffer, a_offset, a_ld); } if (ErrorIn(status)) { return status; } - status = TestVectorX(n, x_buffer, x_offset, x_inc, sizeof(T)); + status = TestVectorX(n, x_buffer, x_offset, x_inc); if (ErrorIn(status)) { return status; } - status = TestVectorY(n, y_buffer, y_offset, y_inc, sizeof(T)); + status = TestVectorY(n, y_buffer, y_offset, y_inc); if (ErrorIn(status)) { return status; } // Upload the scalar argument as a constant buffer to the device (needed for half-precision) diff --git a/src/routines/level3/xgemm.cc b/src/routines/level3/xgemm.cc index 42d5f19e..713bed8f 100644 --- a/src/routines/level3/xgemm.cc +++ b/src/routines/level3/xgemm.cc @@ -96,11 +96,11 @@ StatusCode Xgemm::DoGemm(const Layout layout, // matrix A cannot be less than K when rotated, or less than M when not-rotated // matrix B cannot be less than N when rotated, or less than K when not-rotated // matrix C cannot be less than N when rotated, or less than M when not-rotated - auto status = TestMatrixA(a_one, a_two, a_buffer, a_offset, a_ld, sizeof(T)); + auto status = TestMatrixA(a_one, a_two, a_buffer, a_offset, a_ld); if (ErrorIn(status)) { return status; } - status = TestMatrixB(b_one, b_two, b_buffer, b_offset, b_ld, sizeof(T)); + status = TestMatrixB(b_one, b_two, b_buffer, b_offset, b_ld); if (ErrorIn(status)) { return status; } - status = TestMatrixC(c_one, c_two, c_buffer, c_offset, c_ld, sizeof(T)); + status = TestMatrixC(c_one, c_two, c_buffer, c_offset, c_ld); if (ErrorIn(status)) { return status; } // Calculates the ceiled versions of m, n, and k diff --git a/src/routines/level3/xhemm.cc b/src/routines/level3/xhemm.cc index d2fbf36e..a6e853e9 100644 --- a/src/routines/level3/xhemm.cc +++ b/src/routines/level3/xhemm.cc @@ -45,7 +45,7 @@ StatusCode Xhemm::DoHemm(const Layout layout, const Side side, const Triangle auto k = (side == Side::kLeft) ? m : n; // Checks for validity of the squared A matrix - auto status = TestMatrixA(k, k, a_buffer, a_offset, a_ld, sizeof(T)); + auto status = TestMatrixA(k, k, a_buffer, a_offset, a_ld); if (ErrorIn(status)) { return status; } // Determines which kernel to run based on the layout (the Xgemm kernel assumes column-major as diff --git a/src/routines/level3/xher2k.cc b/src/routines/level3/xher2k.cc index 5ec1f8cd..c891c202 100644 --- a/src/routines/level3/xher2k.cc +++ b/src/routines/level3/xher2k.cc @@ -76,11 +76,11 @@ StatusCode Xher2k::DoHer2k(const Layout layout, const Triangle triangle, co // matrix A cannot be less than N when rotated, or less than K when not-rotated // matrix B cannot be less than N when rotated, or less than K when not-rotated // matrix C cannot be less than N - auto status = TestMatrixA(ab_one, ab_two, a_buffer, a_offset, a_ld, sizeof(T)); + auto status = TestMatrixA(ab_one, ab_two, a_buffer, a_offset, a_ld); if (ErrorIn(status)) { return status; } - status = TestMatrixB(ab_one, ab_two, b_buffer, b_offset, b_ld, sizeof(T)); + status = TestMatrixB(ab_one, ab_two, b_buffer, b_offset, b_ld); if (ErrorIn(status)) { return status; } - status = TestMatrixC(n, n, c_buffer, c_offset, c_ld, sizeof(T)); + status = TestMatrixC(n, n, c_buffer, c_offset, c_ld); if (ErrorIn(status)) { return status; } // Calculates the ceiled versions of n and k diff --git a/src/routines/level3/xherk.cc b/src/routines/level3/xherk.cc index df97a94f..9d64af95 100644 --- a/src/routines/level3/xherk.cc +++ b/src/routines/level3/xherk.cc @@ -75,9 +75,9 @@ StatusCode Xherk::DoHerk(const Layout layout, const Triangle triangle, cons // space. Also tests that the leading dimensions of: // matrix A cannot be less than N when rotated, or less than K when not-rotated // matrix C cannot be less than N - auto status = TestMatrixA(a_one, a_two, a_buffer, a_offset, a_ld, sizeof(T)); + auto status = TestMatrixA(a_one, a_two, a_buffer, a_offset, a_ld); if (ErrorIn(status)) { return status; } - status = TestMatrixC(n, n, c_buffer, c_offset, c_ld, sizeof(T)); + status = TestMatrixC(n, n, c_buffer, c_offset, c_ld); if (ErrorIn(status)) { return status; } // Calculates the ceiled versions of n and k diff --git a/src/routines/level3/xsymm.cc b/src/routines/level3/xsymm.cc index d88d4653..379e2908 100644 --- a/src/routines/level3/xsymm.cc +++ b/src/routines/level3/xsymm.cc @@ -45,7 +45,7 @@ StatusCode Xsymm::DoSymm(const Layout layout, const Side side, const Triangle auto k = (side == Side::kLeft) ? m : n; // Checks for validity of the squared A matrix - auto status = TestMatrixA(k, k, a_buffer, a_offset, a_ld, sizeof(T)); + auto status = TestMatrixA(k, k, a_buffer, a_offset, a_ld); if (ErrorIn(status)) { return status; } // Determines which kernel to run based on the layout (the Xgemm kernel assumes column-major as diff --git a/src/routines/level3/xsyr2k.cc b/src/routines/level3/xsyr2k.cc index dd7d19fe..886d1e16 100644 --- a/src/routines/level3/xsyr2k.cc +++ b/src/routines/level3/xsyr2k.cc @@ -75,11 +75,11 @@ StatusCode Xsyr2k::DoSyr2k(const Layout layout, const Triangle triangle, cons // matrix A cannot be less than N when rotated, or less than K when not-rotated // matrix B cannot be less than N when rotated, or less than K when not-rotated // matrix C cannot be less than N - auto status = TestMatrixA(ab_one, ab_two, a_buffer, a_offset, a_ld, sizeof(T)); + auto status = TestMatrixA(ab_one, ab_two, a_buffer, a_offset, a_ld); if (ErrorIn(status)) { return status; } - status = TestMatrixB(ab_one, ab_two, b_buffer, b_offset, b_ld, sizeof(T)); + status = TestMatrixB(ab_one, ab_two, b_buffer, b_offset, b_ld); if (ErrorIn(status)) { return status; } - status = TestMatrixC(n, n, c_buffer, c_offset, c_ld, sizeof(T)); + status = TestMatrixC(n, n, c_buffer, c_offset, c_ld); if (ErrorIn(status)) { return status; } // Calculates the ceiled versions of n and k diff --git a/src/routines/level3/xsyrk.cc b/src/routines/level3/xsyrk.cc index b5817b82..000347f3 100644 --- a/src/routines/level3/xsyrk.cc +++ b/src/routines/level3/xsyrk.cc @@ -73,9 +73,9 @@ StatusCode Xsyrk::DoSyrk(const Layout layout, const Triangle triangle, const // space. Also tests that the leading dimensions of: // matrix A cannot be less than N when rotated, or less than K when not-rotated // matrix C cannot be less than N - auto status = TestMatrixA(a_one, a_two, a_buffer, a_offset, a_ld, sizeof(T)); + auto status = TestMatrixA(a_one, a_two, a_buffer, a_offset, a_ld); if (ErrorIn(status)) { return status; } - status = TestMatrixC(n, n, c_buffer, c_offset, c_ld, sizeof(T)); + status = TestMatrixC(n, n, c_buffer, c_offset, c_ld); if (ErrorIn(status)) { return status; } // Calculates the ceiled versions of n and k diff --git a/src/routines/level3/xtrmm.cc b/src/routines/level3/xtrmm.cc index 27ecb4ed..c62305aa 100644 --- a/src/routines/level3/xtrmm.cc +++ b/src/routines/level3/xtrmm.cc @@ -44,7 +44,7 @@ StatusCode Xtrmm::DoTrmm(const Layout layout, const Side side, const Triangle auto k = (side == Side::kLeft) ? m : n; // Checks for validity of the triangular A matrix - auto status = TestMatrixA(k, k, a_buffer, a_offset, a_ld, sizeof(T)); + auto status = TestMatrixA(k, k, a_buffer, a_offset, a_ld); if (ErrorIn(status)) { return status; } // Determines which kernel to run based on the layout (the Xgemm kernel assumes column-major as diff --git a/src/routines/levelx/xomatcopy.cc b/src/routines/levelx/xomatcopy.cc index 77fc445f..dcc4e52a 100644 --- a/src/routines/levelx/xomatcopy.cc +++ b/src/routines/levelx/xomatcopy.cc @@ -72,9 +72,9 @@ StatusCode Xomatcopy::DoOmatcopy(const Layout layout, const Transpose a_trans // Also tests that the leading dimensions of: // matrix A cannot be less than N when rotated, or less than M when not-rotated // matrix B cannot be less than M when rotated, or less than N when not-rotated - auto status = TestMatrixA(a_one, a_two, a_buffer, a_offset, a_ld, sizeof(T)); + auto status = TestMatrixA(a_one, a_two, a_buffer, a_offset, a_ld); if (ErrorIn(status)) { return status; } - status = TestMatrixB(b_one, b_two, b_buffer, b_offset, b_ld, sizeof(T)); + status = TestMatrixB(b_one, b_two, b_buffer, b_offset, b_ld); if (ErrorIn(status)) { return status; } // Loads the program from the database From 520e28e7a72f288f04d04d86d4e7560d78159820 Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Fri, 17 Jun 2016 11:41:10 +0200 Subject: [PATCH 2/9] Moved the ErrorIn function from the Routine class to the utilities header --- include/internal/routine.h | 3 --- include/internal/routines/level1/xamax.h | 1 - include/internal/routines/level1/xasum.h | 1 - include/internal/routines/level1/xaxpy.h | 1 - include/internal/routines/level1/xcopy.h | 1 - include/internal/routines/level1/xdot.h | 1 - include/internal/routines/level1/xnrm2.h | 1 - include/internal/routines/level1/xscal.h | 1 - include/internal/routines/level1/xswap.h | 1 - include/internal/routines/level2/xgemv.h | 1 - include/internal/routines/level2/xger.h | 1 - include/internal/routines/level2/xher.h | 1 - include/internal/routines/level2/xher2.h | 1 - include/internal/routines/level3/xgemm.h | 1 - include/internal/routines/level3/xhemm.h | 1 - include/internal/routines/level3/xher2k.h | 1 - include/internal/routines/level3/xherk.h | 1 - include/internal/routines/level3/xsymm.h | 1 - include/internal/routines/level3/xsyr2k.h | 1 - include/internal/routines/level3/xsyrk.h | 1 - include/internal/routines/level3/xtrmm.h | 1 - include/internal/routines/levelx/xomatcopy.h | 1 - include/internal/utilities.h | 5 +++++ 23 files changed, 5 insertions(+), 24 deletions(-) diff --git a/include/internal/routine.h b/include/internal/routine.h index 0b53b82e..0f64c479 100644 --- a/include/internal/routine.h +++ b/include/internal/routine.h @@ -32,9 +32,6 @@ template class Routine { public: - // Helper functions which check for errors in the status code - static constexpr bool ErrorIn(const StatusCode s) { return (s != StatusCode::kSuccess); } - // Base class constructor explicit Routine(Queue &queue, EventPointer event, const std::string &name, const std::vector &routines, const Precision precision); diff --git a/include/internal/routines/level1/xamax.h b/include/internal/routines/level1/xamax.h index b44e0ceb..70d8a6b0 100644 --- a/include/internal/routines/level1/xamax.h +++ b/include/internal/routines/level1/xamax.h @@ -32,7 +32,6 @@ class Xamax: public Routine { using Routine::context_; using Routine::GetProgramFromCache; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xamax(Queue &queue, EventPointer event, const std::string &name = "AMAX"); diff --git a/include/internal/routines/level1/xasum.h b/include/internal/routines/level1/xasum.h index 8e22d76a..8b5c9c76 100644 --- a/include/internal/routines/level1/xasum.h +++ b/include/internal/routines/level1/xasum.h @@ -32,7 +32,6 @@ class Xasum: public Routine { using Routine::context_; using Routine::GetProgramFromCache; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xasum(Queue &queue, EventPointer event, const std::string &name = "ASUM"); diff --git a/include/internal/routines/level1/xaxpy.h b/include/internal/routines/level1/xaxpy.h index da5b2b0f..bd8f5892 100644 --- a/include/internal/routines/level1/xaxpy.h +++ b/include/internal/routines/level1/xaxpy.h @@ -32,7 +32,6 @@ class Xaxpy: public Routine { using Routine::context_; using Routine::GetProgramFromCache; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xaxpy(Queue &queue, EventPointer event, const std::string &name = "AXPY"); diff --git a/include/internal/routines/level1/xcopy.h b/include/internal/routines/level1/xcopy.h index 08e63ce4..f01d5b08 100644 --- a/include/internal/routines/level1/xcopy.h +++ b/include/internal/routines/level1/xcopy.h @@ -31,7 +31,6 @@ class Xcopy: public Routine { using Routine::event_; using Routine::GetProgramFromCache; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xcopy(Queue &queue, EventPointer event, const std::string &name = "COPY"); diff --git a/include/internal/routines/level1/xdot.h b/include/internal/routines/level1/xdot.h index 5c46e0dc..46cf9959 100644 --- a/include/internal/routines/level1/xdot.h +++ b/include/internal/routines/level1/xdot.h @@ -32,7 +32,6 @@ class Xdot: public Routine { using Routine::context_; using Routine::GetProgramFromCache; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xdot(Queue &queue, EventPointer event, const std::string &name = "DOT"); diff --git a/include/internal/routines/level1/xnrm2.h b/include/internal/routines/level1/xnrm2.h index 5abfaa59..3a0cf45c 100644 --- a/include/internal/routines/level1/xnrm2.h +++ b/include/internal/routines/level1/xnrm2.h @@ -32,7 +32,6 @@ class Xnrm2: public Routine { using Routine::context_; using Routine::GetProgramFromCache; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xnrm2(Queue &queue, EventPointer event, const std::string &name = "NRM2"); diff --git a/include/internal/routines/level1/xscal.h b/include/internal/routines/level1/xscal.h index 5786869f..9a0f83ab 100644 --- a/include/internal/routines/level1/xscal.h +++ b/include/internal/routines/level1/xscal.h @@ -31,7 +31,6 @@ class Xscal: public Routine { using Routine::event_; using Routine::GetProgramFromCache; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xscal(Queue &queue, EventPointer event, const std::string &name = "SCAL"); diff --git a/include/internal/routines/level1/xswap.h b/include/internal/routines/level1/xswap.h index 483f21d5..02360c38 100644 --- a/include/internal/routines/level1/xswap.h +++ b/include/internal/routines/level1/xswap.h @@ -31,7 +31,6 @@ class Xswap: public Routine { using Routine::event_; using Routine::GetProgramFromCache; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xswap(Queue &queue, EventPointer event, const std::string &name = "SWAP"); diff --git a/include/internal/routines/level2/xgemv.h b/include/internal/routines/level2/xgemv.h index 6e8f0e47..dcfcbd1f 100644 --- a/include/internal/routines/level2/xgemv.h +++ b/include/internal/routines/level2/xgemv.h @@ -32,7 +32,6 @@ class Xgemv: public Routine { using Routine::context_; using Routine::GetProgramFromCache; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xgemv(Queue &queue, EventPointer event, const std::string &name = "GEMV"); diff --git a/include/internal/routines/level2/xger.h b/include/internal/routines/level2/xger.h index b0c67798..a26ca24a 100644 --- a/include/internal/routines/level2/xger.h +++ b/include/internal/routines/level2/xger.h @@ -32,7 +32,6 @@ class Xger: public Routine { using Routine::context_; using Routine::GetProgramFromCache; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xger(Queue &queue, EventPointer event, const std::string &name = "GER"); diff --git a/include/internal/routines/level2/xher.h b/include/internal/routines/level2/xher.h index 7b735882..d32d337e 100644 --- a/include/internal/routines/level2/xher.h +++ b/include/internal/routines/level2/xher.h @@ -32,7 +32,6 @@ class Xher: public Routine { using Routine::context_; using Routine::GetProgramFromCache; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xher(Queue &queue, EventPointer event, const std::string &name = "HER"); diff --git a/include/internal/routines/level2/xher2.h b/include/internal/routines/level2/xher2.h index dd5ca4bf..956ffe6a 100644 --- a/include/internal/routines/level2/xher2.h +++ b/include/internal/routines/level2/xher2.h @@ -32,7 +32,6 @@ class Xher2: public Routine { using Routine::context_; using Routine::GetProgramFromCache; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xher2(Queue &queue, EventPointer event, const std::string &name = "HER2"); diff --git a/include/internal/routines/level3/xgemm.h b/include/internal/routines/level3/xgemm.h index 22624e61..8facaa76 100644 --- a/include/internal/routines/level3/xgemm.h +++ b/include/internal/routines/level3/xgemm.h @@ -33,7 +33,6 @@ class Xgemm: public Routine { using Routine::GetProgramFromCache; using Routine::PadCopyTransposeMatrix; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xgemm(Queue &queue, EventPointer event, const std::string &name = "GEMM"); diff --git a/include/internal/routines/level3/xhemm.h b/include/internal/routines/level3/xhemm.h index 9f4557b4..cf833f57 100644 --- a/include/internal/routines/level3/xhemm.h +++ b/include/internal/routines/level3/xhemm.h @@ -30,7 +30,6 @@ class Xhemm: public Xgemm { using Routine::context_; using Routine::GetProgramFromCache; using Routine::RunKernel; - using Routine::ErrorIn; // Uses the regular Xgemm routine using Xgemm::DoGemm; diff --git a/include/internal/routines/level3/xher2k.h b/include/internal/routines/level3/xher2k.h index 8a4191a6..cdba33ab 100644 --- a/include/internal/routines/level3/xher2k.h +++ b/include/internal/routines/level3/xher2k.h @@ -35,7 +35,6 @@ class Xher2k: public Routine { using Routine::GetProgramFromCache; using Routine::PadCopyTransposeMatrix; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xher2k(Queue &queue, EventPointer event, const std::string &name = "HER2K"); diff --git a/include/internal/routines/level3/xherk.h b/include/internal/routines/level3/xherk.h index b279d724..a9d1615a 100644 --- a/include/internal/routines/level3/xherk.h +++ b/include/internal/routines/level3/xherk.h @@ -35,7 +35,6 @@ class Xherk: public Routine { using Routine::GetProgramFromCache; using Routine::PadCopyTransposeMatrix; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xherk(Queue &queue, EventPointer event, const std::string &name = "HERK"); diff --git a/include/internal/routines/level3/xsymm.h b/include/internal/routines/level3/xsymm.h index a0cb7b90..ec145a89 100644 --- a/include/internal/routines/level3/xsymm.h +++ b/include/internal/routines/level3/xsymm.h @@ -32,7 +32,6 @@ class Xsymm: public Xgemm { using Routine::context_; using Routine::GetProgramFromCache; using Routine::RunKernel; - using Routine::ErrorIn; // Uses the regular Xgemm routine using Xgemm::DoGemm; diff --git a/include/internal/routines/level3/xsyr2k.h b/include/internal/routines/level3/xsyr2k.h index e498b7e6..1093d635 100644 --- a/include/internal/routines/level3/xsyr2k.h +++ b/include/internal/routines/level3/xsyr2k.h @@ -35,7 +35,6 @@ class Xsyr2k: public Routine { using Routine::GetProgramFromCache; using Routine::PadCopyTransposeMatrix; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xsyr2k(Queue &queue, EventPointer event, const std::string &name = "SYR2K"); diff --git a/include/internal/routines/level3/xsyrk.h b/include/internal/routines/level3/xsyrk.h index f7fa9b6a..c2edbf2b 100644 --- a/include/internal/routines/level3/xsyrk.h +++ b/include/internal/routines/level3/xsyrk.h @@ -37,7 +37,6 @@ class Xsyrk: public Routine { using Routine::GetProgramFromCache; using Routine::PadCopyTransposeMatrix; using Routine::RunKernel; - using Routine::ErrorIn; // Constructor Xsyrk(Queue &queue, EventPointer event, const std::string &name = "SYRK"); diff --git a/include/internal/routines/level3/xtrmm.h b/include/internal/routines/level3/xtrmm.h index 8527df58..6cb46b01 100644 --- a/include/internal/routines/level3/xtrmm.h +++ b/include/internal/routines/level3/xtrmm.h @@ -31,7 +31,6 @@ class Xtrmm: public Xgemm { using Routine::context_; using Routine::GetProgramFromCache; using Routine::RunKernel; - using Routine::ErrorIn; // Uses the regular Xgemm routine using Xgemm::DoGemm; diff --git a/include/internal/routines/levelx/xomatcopy.h b/include/internal/routines/levelx/xomatcopy.h index ec42d64a..ee38fa15 100644 --- a/include/internal/routines/levelx/xomatcopy.h +++ b/include/internal/routines/levelx/xomatcopy.h @@ -29,7 +29,6 @@ class Xomatcopy: public Routine { using Routine::event_; using Routine::GetProgramFromCache; using Routine::PadCopyTransposeMatrix; - using Routine::ErrorIn; // Constructor Xomatcopy(Queue &queue, EventPointer event, const std::string &name = "OMATCOPY"); diff --git a/include/internal/utilities.h b/include/internal/utilities.h index d3c8ebdb..26145528 100644 --- a/include/internal/utilities.h +++ b/include/internal/utilities.h @@ -200,6 +200,11 @@ bool CheckArgument(const int argc, char *argv[], std::string &help, const std::s // ================================================================================================= +// Helper function to check for errors in the status code +constexpr bool ErrorIn(const StatusCode s) { return (s != StatusCode::kSuccess); } + +// ================================================================================================= + // Returns a random number to be used as a seed unsigned int GetRandomSeed(); From 98a95c89fc0633efdc8439c942762bef9a1e5e1d Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Fri, 17 Jun 2016 12:32:06 +0200 Subject: [PATCH 3/9] Moved the RunKernel and PadCopyTransposeMatrix functions out of the Routine class --- include/internal/routine.h | 42 ++--- include/internal/routines/common.h | 159 +++++++++++++++++++ include/internal/routines/level1/xamax.h | 2 +- include/internal/routines/level1/xasum.h | 2 +- include/internal/routines/level1/xaxpy.h | 2 +- include/internal/routines/level1/xcopy.h | 2 +- include/internal/routines/level1/xdot.h | 2 +- include/internal/routines/level1/xnrm2.h | 2 +- include/internal/routines/level1/xscal.h | 2 +- include/internal/routines/level1/xswap.h | 2 +- include/internal/routines/level2/xgemv.h | 2 +- include/internal/routines/level2/xger.h | 2 +- include/internal/routines/level2/xher.h | 2 +- include/internal/routines/level2/xher2.h | 2 +- include/internal/routines/level2/xtbmv.h | 1 + include/internal/routines/level2/xtpmv.h | 1 + include/internal/routines/level2/xtrmv.h | 1 + include/internal/routines/level3/xgemm.h | 3 +- include/internal/routines/level3/xhemm.h | 3 +- include/internal/routines/level3/xher2k.h | 3 +- include/internal/routines/level3/xherk.h | 3 +- include/internal/routines/level3/xsymm.h | 3 +- include/internal/routines/level3/xsyr2k.h | 3 +- include/internal/routines/level3/xsyrk.h | 3 +- include/internal/routines/level3/xtrmm.h | 3 +- include/internal/routines/levelx/xomatcopy.h | 5 +- src/routine.cc | 158 ++---------------- src/routines/level1/xamax.cc | 4 +- src/routines/level1/xasum.cc | 4 +- src/routines/level1/xaxpy.cc | 4 +- src/routines/level1/xcopy.cc | 4 +- src/routines/level1/xdot.cc | 4 +- src/routines/level1/xnrm2.cc | 4 +- src/routines/level1/xscal.cc | 4 +- src/routines/level1/xswap.cc | 4 +- src/routines/level2/xgemv.cc | 2 +- src/routines/level2/xger.cc | 2 +- src/routines/level2/xher.cc | 2 +- src/routines/level2/xher2.cc | 2 +- src/routines/level3/xgemm.cc | 10 +- src/routines/level3/xhemm.cc | 2 +- src/routines/level3/xher2k.cc | 16 +- src/routines/level3/xherk.cc | 10 +- src/routines/level3/xsymm.cc | 2 +- src/routines/level3/xsyr2k.cc | 12 +- src/routines/level3/xsyrk.cc | 8 +- src/routines/level3/xtrmm.cc | 2 +- src/routines/levelx/xomatcopy.cc | 2 +- 48 files changed, 270 insertions(+), 249 deletions(-) create mode 100644 include/internal/routines/common.h diff --git a/include/internal/routine.h b/include/internal/routine.h index 0f64c479..e1888f1f 100644 --- a/include/internal/routine.h +++ b/include/internal/routine.h @@ -40,30 +40,6 @@ class Routine { StatusCode SetUp(); protected: - - // Runs a kernel given the global and local thread sizes - StatusCode RunKernel(Kernel &kernel, std::vector global, - const std::vector &local, EventPointer event, - std::vector& waitForEvents); - - // As above, but without an event waiting list - StatusCode RunKernel(Kernel &kernel, std::vector global, - const std::vector &local, EventPointer event); - - // Copies/transposes a matrix and padds/unpads it with zeroes. This method is also able to write - // to symmetric and triangular matrices through optional arguments. - StatusCode PadCopyTransposeMatrix(EventPointer event, std::vector& waitForEvents, - const size_t src_one, const size_t src_two, - const size_t src_ld, const size_t src_offset, - const Buffer &src, - const size_t dest_one, const size_t dest_two, - const size_t dest_ld, const size_t dest_offset, - const Buffer &dest, - const T alpha, - const Program &program, const bool do_pad, - const bool do_transpose, const bool do_conjugate, - const bool upper = false, const bool lower = false, - const bool diagonal_imag_zero = false); // Stores a newly compiled binary/program into the cache void StoreBinaryToCache(const std::string& binary) const { @@ -105,16 +81,28 @@ class Routine { // OpenCL device properties const std::string device_name_; - const size_t max_work_item_dimensions_; - const std::vector max_work_item_sizes_; - const size_t max_work_group_size_; // Connection to the database for all the device-specific parameters const Database db_; }; +// ================================================================================================= + +// Enqueues a kernel, waits for completion, and checks for errors +StatusCode RunKernel(Kernel &kernel, Queue queue, const Device device, + std::vector global, const std::vector &local, + EventPointer event, std::vector& waitForEvents); + +// As above, but without an event waiting list +StatusCode RunKernel(Kernel &kernel, Queue queue, const Device device, + std::vector global, const std::vector &local, + EventPointer event); + // ================================================================================================= } // namespace clblast +// Temporary fix: TODO place include in a more logical place +#include "internal/routines/common.h" + // CLBLAST_ROUTINE_H_ #endif diff --git a/include/internal/routines/common.h b/include/internal/routines/common.h new file mode 100644 index 00000000..95fbde46 --- /dev/null +++ b/include/internal/routines/common.h @@ -0,0 +1,159 @@ + +// ================================================================================================= +// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This +// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max- +// width of 100 characters per line. +// +// Author(s): +// Cedric Nugteren +// +// This file contains all the interfaces to common kernels, such as copying, padding, and +// transposing a matrix. These functions are templated and thus header-only. +// +// ================================================================================================= + +#ifndef CLBLAST_ROUTINES_COMMON_H_ +#define CLBLAST_ROUTINES_COMMON_H_ + +#include +#include + +#include "internal/utilities.h" +#include "internal/routine.h" + +namespace clblast { +// ================================================================================================= + +// Copies or transposes a matrix and optionally pads/unpads it with zeros. This method is also able +// to write to symmetric and triangular matrices through optional arguments. +template +StatusCode PadCopyTransposeMatrix(Queue queue, const Device device, const Context context, + const Database db, + EventPointer event, std::vector& waitForEvents, + const size_t src_one, const size_t src_two, + const size_t src_ld, const size_t src_offset, + const Buffer &src, + const size_t dest_one, const size_t dest_two, + const size_t dest_ld, const size_t dest_offset, + const Buffer &dest, + const T alpha, + const Program &program, const bool do_pad, + const bool do_transpose, const bool do_conjugate, + const bool upper = false, const bool lower = false, + const bool diagonal_imag_zero = false) { + + // Determines whether or not the fast-version could potentially be used + auto use_fast_kernel = (src_offset == 0) && (dest_offset == 0) && (do_conjugate == false) && + (src_one == dest_one) && (src_two == dest_two) && (src_ld == dest_ld) && + (upper == false) && (lower == false) && (diagonal_imag_zero == false); + + // Determines the right kernel + auto kernel_name = std::string{}; + if (do_transpose) { + if (use_fast_kernel && + IsMultiple(src_ld, db["TRA_WPT"]) && + IsMultiple(src_one, db["TRA_WPT"]*db["TRA_WPT"]) && + IsMultiple(src_two, db["TRA_WPT"]*db["TRA_WPT"])) { + kernel_name = "TransposeMatrixFast"; + } + else { + use_fast_kernel = false; + kernel_name = (do_pad) ? "TransposePadMatrix" : "TransposeMatrix"; + } + } + else { + if (use_fast_kernel && + IsMultiple(src_ld, db["COPY_VW"]) && + IsMultiple(src_one, db["COPY_VW"]*db["COPY_DIMX"]) && + IsMultiple(src_two, db["COPY_WPT"]*db["COPY_DIMY"])) { + kernel_name = "CopyMatrixFast"; + } + else { + use_fast_kernel = false; + kernel_name = (do_pad) ? "CopyPadMatrix" : "CopyMatrix"; + } + } + + // Upload the scalar argument as a constant buffer to the device (needed for half-precision) + auto alpha_buffer = Buffer(context, 1); + alpha_buffer.Write(queue, 1, &alpha); + + // Retrieves the kernel from the compiled binary + try { + auto kernel = Kernel(program, kernel_name); + + // Sets the kernel arguments + if (use_fast_kernel) { + kernel.SetArgument(0, static_cast(src_ld)); + kernel.SetArgument(1, src()); + kernel.SetArgument(2, dest()); + kernel.SetArgument(3, alpha_buffer()); + } + else { + kernel.SetArgument(0, static_cast(src_one)); + kernel.SetArgument(1, static_cast(src_two)); + kernel.SetArgument(2, static_cast(src_ld)); + kernel.SetArgument(3, static_cast(src_offset)); + kernel.SetArgument(4, src()); + kernel.SetArgument(5, static_cast(dest_one)); + kernel.SetArgument(6, static_cast(dest_two)); + kernel.SetArgument(7, static_cast(dest_ld)); + kernel.SetArgument(8, static_cast(dest_offset)); + kernel.SetArgument(9, dest()); + kernel.SetArgument(10, alpha_buffer()); + if (do_pad) { + kernel.SetArgument(11, static_cast(do_conjugate)); + } + else { + kernel.SetArgument(11, static_cast(upper)); + kernel.SetArgument(12, static_cast(lower)); + kernel.SetArgument(13, static_cast(diagonal_imag_zero)); + } + } + + // Launches the kernel and returns the error code. Uses global and local thread sizes based on + // parameters in the database. + if (do_transpose) { + if (use_fast_kernel) { + const auto global = std::vector{ + dest_one / db["TRA_WPT"], + dest_two / db["TRA_WPT"] + }; + const auto local = std::vector{db["TRA_DIM"], db["TRA_DIM"]}; + return RunKernel(kernel, queue, device, global, local, event, waitForEvents); + } + else { + const auto global = std::vector{ + Ceil(CeilDiv(dest_one, db["PADTRA_WPT"]), db["PADTRA_TILE"]), + Ceil(CeilDiv(dest_two, db["PADTRA_WPT"]), db["PADTRA_TILE"]) + }; + const auto local = std::vector{db["PADTRA_TILE"], db["PADTRA_TILE"]}; + return RunKernel(kernel, queue, device, global, local, event, waitForEvents); + } + } + else { + if (use_fast_kernel) { + const auto global = std::vector{ + dest_one / db["COPY_VW"], + dest_two / db["COPY_WPT"] + }; + const auto local = std::vector{db["COPY_DIMX"], db["COPY_DIMY"]}; + return RunKernel(kernel, queue, device, global, local, event, waitForEvents); + } + else { + const auto global = std::vector{ + Ceil(CeilDiv(dest_one, db["PAD_WPTX"]), db["PAD_DIMX"]), + Ceil(CeilDiv(dest_two, db["PAD_WPTY"]), db["PAD_DIMY"]) + }; + const auto local = std::vector{db["PAD_DIMX"], db["PAD_DIMY"]}; + return RunKernel(kernel, queue, device, global, local, event, waitForEvents); + } + } + } catch (...) { return StatusCode::kInvalidKernel; } +} + +// ================================================================================================= +} // namespace clblast + +// CLBLAST_ROUTINES_COMMON_H_ +#endif diff --git a/include/internal/routines/level1/xamax.h b/include/internal/routines/level1/xamax.h index 70d8a6b0..54434362 100644 --- a/include/internal/routines/level1/xamax.h +++ b/include/internal/routines/level1/xamax.h @@ -28,10 +28,10 @@ class Xamax: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::RunKernel; // Constructor Xamax(Queue &queue, EventPointer event, const std::string &name = "AMAX"); diff --git a/include/internal/routines/level1/xasum.h b/include/internal/routines/level1/xasum.h index 8b5c9c76..ee593e30 100644 --- a/include/internal/routines/level1/xasum.h +++ b/include/internal/routines/level1/xasum.h @@ -28,10 +28,10 @@ class Xasum: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::RunKernel; // Constructor Xasum(Queue &queue, EventPointer event, const std::string &name = "ASUM"); diff --git a/include/internal/routines/level1/xaxpy.h b/include/internal/routines/level1/xaxpy.h index bd8f5892..6ea3264b 100644 --- a/include/internal/routines/level1/xaxpy.h +++ b/include/internal/routines/level1/xaxpy.h @@ -28,10 +28,10 @@ class Xaxpy: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::RunKernel; // Constructor Xaxpy(Queue &queue, EventPointer event, const std::string &name = "AXPY"); diff --git a/include/internal/routines/level1/xcopy.h b/include/internal/routines/level1/xcopy.h index f01d5b08..b371ca9b 100644 --- a/include/internal/routines/level1/xcopy.h +++ b/include/internal/routines/level1/xcopy.h @@ -28,9 +28,9 @@ class Xcopy: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::GetProgramFromCache; - using Routine::RunKernel; // Constructor Xcopy(Queue &queue, EventPointer event, const std::string &name = "COPY"); diff --git a/include/internal/routines/level1/xdot.h b/include/internal/routines/level1/xdot.h index 46cf9959..7c69a902 100644 --- a/include/internal/routines/level1/xdot.h +++ b/include/internal/routines/level1/xdot.h @@ -28,10 +28,10 @@ class Xdot: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::RunKernel; // Constructor Xdot(Queue &queue, EventPointer event, const std::string &name = "DOT"); diff --git a/include/internal/routines/level1/xnrm2.h b/include/internal/routines/level1/xnrm2.h index 3a0cf45c..f83cc2ce 100644 --- a/include/internal/routines/level1/xnrm2.h +++ b/include/internal/routines/level1/xnrm2.h @@ -28,10 +28,10 @@ class Xnrm2: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::RunKernel; // Constructor Xnrm2(Queue &queue, EventPointer event, const std::string &name = "NRM2"); diff --git a/include/internal/routines/level1/xscal.h b/include/internal/routines/level1/xscal.h index 9a0f83ab..40f017f2 100644 --- a/include/internal/routines/level1/xscal.h +++ b/include/internal/routines/level1/xscal.h @@ -28,9 +28,9 @@ class Xscal: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::GetProgramFromCache; - using Routine::RunKernel; // Constructor Xscal(Queue &queue, EventPointer event, const std::string &name = "SCAL"); diff --git a/include/internal/routines/level1/xswap.h b/include/internal/routines/level1/xswap.h index 02360c38..f794a1b4 100644 --- a/include/internal/routines/level1/xswap.h +++ b/include/internal/routines/level1/xswap.h @@ -28,9 +28,9 @@ class Xswap: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::GetProgramFromCache; - using Routine::RunKernel; // Constructor Xswap(Queue &queue, EventPointer event, const std::string &name = "SWAP"); diff --git a/include/internal/routines/level2/xgemv.h b/include/internal/routines/level2/xgemv.h index dcfcbd1f..aec8b35b 100644 --- a/include/internal/routines/level2/xgemv.h +++ b/include/internal/routines/level2/xgemv.h @@ -28,10 +28,10 @@ class Xgemv: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::RunKernel; // Constructor Xgemv(Queue &queue, EventPointer event, const std::string &name = "GEMV"); diff --git a/include/internal/routines/level2/xger.h b/include/internal/routines/level2/xger.h index a26ca24a..260325cb 100644 --- a/include/internal/routines/level2/xger.h +++ b/include/internal/routines/level2/xger.h @@ -28,10 +28,10 @@ class Xger: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::RunKernel; // Constructor Xger(Queue &queue, EventPointer event, const std::string &name = "GER"); diff --git a/include/internal/routines/level2/xher.h b/include/internal/routines/level2/xher.h index d32d337e..d66b2603 100644 --- a/include/internal/routines/level2/xher.h +++ b/include/internal/routines/level2/xher.h @@ -28,10 +28,10 @@ class Xher: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::RunKernel; // Constructor Xher(Queue &queue, EventPointer event, const std::string &name = "HER"); diff --git a/include/internal/routines/level2/xher2.h b/include/internal/routines/level2/xher2.h index 956ffe6a..35bf8190 100644 --- a/include/internal/routines/level2/xher2.h +++ b/include/internal/routines/level2/xher2.h @@ -28,10 +28,10 @@ class Xher2: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::RunKernel; // Constructor Xher2(Queue &queue, EventPointer event, const std::string &name = "HER2"); diff --git a/include/internal/routines/level2/xtbmv.h b/include/internal/routines/level2/xtbmv.h index 3b358080..c9107c25 100644 --- a/include/internal/routines/level2/xtbmv.h +++ b/include/internal/routines/level2/xtbmv.h @@ -28,6 +28,7 @@ class Xtbmv: public Xgemv { // Members from the base class using Routine::queue_; + using Routine::device_; using Routine::context_; // Uses the generic matrix-vector routine diff --git a/include/internal/routines/level2/xtpmv.h b/include/internal/routines/level2/xtpmv.h index f306cf4a..e85c225f 100644 --- a/include/internal/routines/level2/xtpmv.h +++ b/include/internal/routines/level2/xtpmv.h @@ -28,6 +28,7 @@ class Xtpmv: public Xgemv { // Members from the base class using Routine::queue_; + using Routine::device_; using Routine::context_; // Uses the generic matrix-vector routine diff --git a/include/internal/routines/level2/xtrmv.h b/include/internal/routines/level2/xtrmv.h index cf0824a4..97a180ff 100644 --- a/include/internal/routines/level2/xtrmv.h +++ b/include/internal/routines/level2/xtrmv.h @@ -28,6 +28,7 @@ class Xtrmv: public Xgemv { // Members from the base class using Routine::queue_; + using Routine::device_; using Routine::context_; // Uses the generic matrix-vector routine diff --git a/include/internal/routines/level3/xgemm.h b/include/internal/routines/level3/xgemm.h index 8facaa76..2fd853a9 100644 --- a/include/internal/routines/level3/xgemm.h +++ b/include/internal/routines/level3/xgemm.h @@ -28,11 +28,10 @@ class Xgemm: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::PadCopyTransposeMatrix; - using Routine::RunKernel; // Constructor Xgemm(Queue &queue, EventPointer event, const std::string &name = "GEMM"); diff --git a/include/internal/routines/level3/xhemm.h b/include/internal/routines/level3/xhemm.h index cf833f57..8bd38393 100644 --- a/include/internal/routines/level3/xhemm.h +++ b/include/internal/routines/level3/xhemm.h @@ -27,9 +27,10 @@ class Xhemm: public Xgemm { // Members and methods from the base class using Routine::db_; + using Routine::queue_; + using Routine::device_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::RunKernel; // Uses the regular Xgemm routine using Xgemm::DoGemm; diff --git a/include/internal/routines/level3/xher2k.h b/include/internal/routines/level3/xher2k.h index cdba33ab..1afe87a6 100644 --- a/include/internal/routines/level3/xher2k.h +++ b/include/internal/routines/level3/xher2k.h @@ -30,11 +30,10 @@ class Xher2k: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::PadCopyTransposeMatrix; - using Routine::RunKernel; // Constructor Xher2k(Queue &queue, EventPointer event, const std::string &name = "HER2K"); diff --git a/include/internal/routines/level3/xherk.h b/include/internal/routines/level3/xherk.h index a9d1615a..64abae3b 100644 --- a/include/internal/routines/level3/xherk.h +++ b/include/internal/routines/level3/xherk.h @@ -30,11 +30,10 @@ class Xherk: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::PadCopyTransposeMatrix; - using Routine::RunKernel; // Constructor Xherk(Queue &queue, EventPointer event, const std::string &name = "HERK"); diff --git a/include/internal/routines/level3/xsymm.h b/include/internal/routines/level3/xsymm.h index ec145a89..c35dfb5e 100644 --- a/include/internal/routines/level3/xsymm.h +++ b/include/internal/routines/level3/xsymm.h @@ -29,9 +29,10 @@ class Xsymm: public Xgemm { // Members and methods from the base class using Routine::db_; + using Routine::queue_; + using Routine::device_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::RunKernel; // Uses the regular Xgemm routine using Xgemm::DoGemm; diff --git a/include/internal/routines/level3/xsyr2k.h b/include/internal/routines/level3/xsyr2k.h index 1093d635..73d11b0b 100644 --- a/include/internal/routines/level3/xsyr2k.h +++ b/include/internal/routines/level3/xsyr2k.h @@ -30,11 +30,10 @@ class Xsyr2k: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::PadCopyTransposeMatrix; - using Routine::RunKernel; // Constructor Xsyr2k(Queue &queue, EventPointer event, const std::string &name = "SYR2K"); diff --git a/include/internal/routines/level3/xsyrk.h b/include/internal/routines/level3/xsyrk.h index c2edbf2b..344c02e2 100644 --- a/include/internal/routines/level3/xsyrk.h +++ b/include/internal/routines/level3/xsyrk.h @@ -32,11 +32,10 @@ class Xsyrk: public Routine { using Routine::db_; using Routine::source_string_; using Routine::queue_; + using Routine::device_; using Routine::event_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::PadCopyTransposeMatrix; - using Routine::RunKernel; // Constructor Xsyrk(Queue &queue, EventPointer event, const std::string &name = "SYRK"); diff --git a/include/internal/routines/level3/xtrmm.h b/include/internal/routines/level3/xtrmm.h index 6cb46b01..5c12815d 100644 --- a/include/internal/routines/level3/xtrmm.h +++ b/include/internal/routines/level3/xtrmm.h @@ -28,9 +28,10 @@ class Xtrmm: public Xgemm { // Members and methods from the base class using Routine::db_; + using Routine::queue_; + using Routine::device_; using Routine::context_; using Routine::GetProgramFromCache; - using Routine::RunKernel; // Uses the regular Xgemm routine using Xgemm::DoGemm; diff --git a/include/internal/routines/levelx/xomatcopy.h b/include/internal/routines/levelx/xomatcopy.h index ee38fa15..7c284635 100644 --- a/include/internal/routines/levelx/xomatcopy.h +++ b/include/internal/routines/levelx/xomatcopy.h @@ -25,10 +25,13 @@ class Xomatcopy: public Routine { public: // Members and methods from the base class + using Routine::db_; using Routine::source_string_; + using Routine::queue_; + using Routine::device_; using Routine::event_; + using Routine::context_; using Routine::GetProgramFromCache; - using Routine::PadCopyTransposeMatrix; // Constructor Xomatcopy(Queue &queue, EventPointer event, const std::string &name = "OMATCOPY"); diff --git a/src/routine.cc b/src/routine.cc index ee3ba341..c59cbc11 100644 --- a/src/routine.cc +++ b/src/routine.cc @@ -30,9 +30,6 @@ Routine::Routine(Queue &queue, EventPointer event, const std::string &name, context_(queue_.GetContext()), device_(queue_.GetDevice()), device_name_(device_.Name()), - max_work_item_dimensions_(device_.MaxWorkItemDimensions()), - max_work_item_sizes_(device_.MaxWorkItemSizes()), - max_work_group_size_(device_.MaxWorkGroupSize()), db_(queue_, routines, precision_) { } @@ -135,21 +132,21 @@ StatusCode Routine::SetUp() { // ================================================================================================= // Enqueues a kernel, waits for completion, and checks for errors -template -StatusCode Routine::RunKernel(Kernel &kernel, std::vector global, - const std::vector &local, EventPointer event, - std::vector& waitForEvents) { +StatusCode RunKernel(Kernel &kernel, Queue queue, const Device device, + std::vector global, const std::vector &local, + EventPointer event, std::vector& waitForEvents) { // Tests for validity of the local thread sizes - if (local.size() > max_work_item_dimensions_) { + if (local.size() > device.MaxWorkItemDimensions()) { return StatusCode::kInvalidLocalNumDimensions; } + const auto max_work_item_sizes = device.MaxWorkItemSizes(); for (auto i=size_t{0}; i max_work_item_sizes_[i]) { return StatusCode::kInvalidLocalThreadsDim; } + if (local[i] > max_work_item_sizes[i]) { return StatusCode::kInvalidLocalThreadsDim; } } auto local_size = size_t{1}; for (auto &item: local) { local_size *= item; } - if (local_size > max_work_group_size_) { return StatusCode::kInvalidLocalThreadsTotal; } + if (local_size > device.MaxWorkGroupSize()) { return StatusCode::kInvalidLocalThreadsTotal; } // Make sure the global thread sizes are at least equal to the local sizes for (auto i=size_t{0}; i::RunKernel(Kernel &kernel, std::vector global, } // Tests for local memory usage - const auto local_mem_usage = kernel.LocalMemUsage(device_); - if (!device_.IsLocalMemoryValid(local_mem_usage)) { return StatusCode::kInvalidLocalMemUsage; } + const auto local_mem_usage = kernel.LocalMemUsage(device); + if (!device.IsLocalMemoryValid(local_mem_usage)) { return StatusCode::kInvalidLocalMemUsage; } // Launches the kernel (and checks for launch errors) try { - kernel.Launch(queue_, global, local, event, waitForEvents); + kernel.Launch(queue, global, local, event, waitForEvents); } catch (...) { return StatusCode::kKernelLaunchError; } // No errors, normal termination of this function @@ -170,138 +167,11 @@ StatusCode Routine::RunKernel(Kernel &kernel, std::vector global, } // As above, but without an event waiting list -template -StatusCode Routine::RunKernel(Kernel &kernel, std::vector global, - const std::vector &local, EventPointer event) { +StatusCode RunKernel(Kernel &kernel, Queue queue, const Device device, + std::vector global, const std::vector &local, + EventPointer event) { auto emptyWaitingList = std::vector(); - return RunKernel(kernel, global, local, event, emptyWaitingList); -} - -// ================================================================================================= - -// Copies or transposes a matrix and optionally pads/unpads it with zeros -template -StatusCode Routine::PadCopyTransposeMatrix(EventPointer event, std::vector& waitForEvents, - const size_t src_one, const size_t src_two, - const size_t src_ld, const size_t src_offset, - const Buffer &src, - const size_t dest_one, const size_t dest_two, - const size_t dest_ld, const size_t dest_offset, - const Buffer &dest, - const T alpha, - const Program &program, const bool do_pad, - const bool do_transpose, const bool do_conjugate, - const bool upper, const bool lower, - const bool diagonal_imag_zero) { - - // Determines whether or not the fast-version could potentially be used - auto use_fast_kernel = (src_offset == 0) && (dest_offset == 0) && (do_conjugate == false) && - (src_one == dest_one) && (src_two == dest_two) && (src_ld == dest_ld) && - (upper == false) && (lower == false) && (diagonal_imag_zero == false); - - // Determines the right kernel - auto kernel_name = std::string{}; - if (do_transpose) { - if (use_fast_kernel && - IsMultiple(src_ld, db_["TRA_WPT"]) && - IsMultiple(src_one, db_["TRA_WPT"]*db_["TRA_WPT"]) && - IsMultiple(src_two, db_["TRA_WPT"]*db_["TRA_WPT"])) { - kernel_name = "TransposeMatrixFast"; - } - else { - use_fast_kernel = false; - kernel_name = (do_pad) ? "TransposePadMatrix" : "TransposeMatrix"; - } - } - else { - if (use_fast_kernel && - IsMultiple(src_ld, db_["COPY_VW"]) && - IsMultiple(src_one, db_["COPY_VW"]*db_["COPY_DIMX"]) && - IsMultiple(src_two, db_["COPY_WPT"]*db_["COPY_DIMY"])) { - kernel_name = "CopyMatrixFast"; - } - else { - use_fast_kernel = false; - kernel_name = (do_pad) ? "CopyPadMatrix" : "CopyMatrix"; - } - } - - // Upload the scalar argument as a constant buffer to the device (needed for half-precision) - auto alpha_buffer = Buffer(context_, 1); - alpha_buffer.Write(queue_, 1, &alpha); - - // Retrieves the kernel from the compiled binary - try { - auto kernel = Kernel(program, kernel_name); - - // Sets the kernel arguments - if (use_fast_kernel) { - kernel.SetArgument(0, static_cast(src_ld)); - kernel.SetArgument(1, src()); - kernel.SetArgument(2, dest()); - kernel.SetArgument(3, alpha_buffer()); - } - else { - kernel.SetArgument(0, static_cast(src_one)); - kernel.SetArgument(1, static_cast(src_two)); - kernel.SetArgument(2, static_cast(src_ld)); - kernel.SetArgument(3, static_cast(src_offset)); - kernel.SetArgument(4, src()); - kernel.SetArgument(5, static_cast(dest_one)); - kernel.SetArgument(6, static_cast(dest_two)); - kernel.SetArgument(7, static_cast(dest_ld)); - kernel.SetArgument(8, static_cast(dest_offset)); - kernel.SetArgument(9, dest()); - kernel.SetArgument(10, alpha_buffer()); - if (do_pad) { - kernel.SetArgument(11, static_cast(do_conjugate)); - } - else { - kernel.SetArgument(11, static_cast(upper)); - kernel.SetArgument(12, static_cast(lower)); - kernel.SetArgument(13, static_cast(diagonal_imag_zero)); - } - } - - // Launches the kernel and returns the error code. Uses global and local thread sizes based on - // parameters in the database. - if (do_transpose) { - if (use_fast_kernel) { - const auto global = std::vector{ - dest_one / db_["TRA_WPT"], - dest_two / db_["TRA_WPT"] - }; - const auto local = std::vector{db_["TRA_DIM"], db_["TRA_DIM"]}; - return RunKernel(kernel, global, local, event, waitForEvents); - } - else { - const auto global = std::vector{ - Ceil(CeilDiv(dest_one, db_["PADTRA_WPT"]), db_["PADTRA_TILE"]), - Ceil(CeilDiv(dest_two, db_["PADTRA_WPT"]), db_["PADTRA_TILE"]) - }; - const auto local = std::vector{db_["PADTRA_TILE"], db_["PADTRA_TILE"]}; - return RunKernel(kernel, global, local, event, waitForEvents); - } - } - else { - if (use_fast_kernel) { - const auto global = std::vector{ - dest_one / db_["COPY_VW"], - dest_two / db_["COPY_WPT"] - }; - const auto local = std::vector{db_["COPY_DIMX"], db_["COPY_DIMY"]}; - return RunKernel(kernel, global, local, event, waitForEvents); - } - else { - const auto global = std::vector{ - Ceil(CeilDiv(dest_one, db_["PAD_WPTX"]), db_["PAD_DIMX"]), - Ceil(CeilDiv(dest_two, db_["PAD_WPTY"]), db_["PAD_DIMY"]) - }; - const auto local = std::vector{db_["PAD_DIMX"], db_["PAD_DIMY"]}; - return RunKernel(kernel, global, local, event, waitForEvents); - } - } - } catch (...) { return StatusCode::kInvalidKernel; } + return RunKernel(kernel, queue, device, global, local, event, emptyWaitingList); } // ================================================================================================= diff --git a/src/routines/level1/xamax.cc b/src/routines/level1/xamax.cc index 9a7d2173..6028d953 100644 --- a/src/routines/level1/xamax.cc +++ b/src/routines/level1/xamax.cc @@ -80,7 +80,7 @@ StatusCode Xamax::DoAmax(const size_t n, auto global1 = std::vector{db_["WGS1"]*temp_size}; auto local1 = std::vector{db_["WGS1"]}; auto kernelEvent = Event(); - status = RunKernel(kernel1, global1, local1, kernelEvent.pointer()); + status = RunKernel(kernel1, queue_, device_, global1, local1, kernelEvent.pointer()); if (ErrorIn(status)) { return status; } eventWaitList.push_back(kernelEvent); @@ -93,7 +93,7 @@ StatusCode Xamax::DoAmax(const size_t n, // Launches the epilogue kernel auto global2 = std::vector{db_["WGS2"]}; auto local2 = std::vector{db_["WGS2"]}; - status = RunKernel(kernel2, global2, local2, event_, eventWaitList); + status = RunKernel(kernel2, queue_, device_, global2, local2, event_, eventWaitList); if (ErrorIn(status)) { return status; } // Succesfully finished the computation diff --git a/src/routines/level1/xasum.cc b/src/routines/level1/xasum.cc index 3dcaa80a..6046a467 100644 --- a/src/routines/level1/xasum.cc +++ b/src/routines/level1/xasum.cc @@ -78,7 +78,7 @@ StatusCode Xasum::DoAsum(const size_t n, auto global1 = std::vector{db_["WGS1"]*temp_size}; auto local1 = std::vector{db_["WGS1"]}; auto kernelEvent = Event(); - status = RunKernel(kernel1, global1, local1, kernelEvent.pointer()); + status = RunKernel(kernel1, queue_, device_, global1, local1, kernelEvent.pointer()); if (ErrorIn(status)) { return status; } eventWaitList.push_back(kernelEvent); @@ -90,7 +90,7 @@ StatusCode Xasum::DoAsum(const size_t n, // Launches the epilogue kernel auto global2 = std::vector{db_["WGS2"]}; auto local2 = std::vector{db_["WGS2"]}; - status = RunKernel(kernel2, global2, local2, event_, eventWaitList); + status = RunKernel(kernel2, queue_, device_, global2, local2, event_, eventWaitList); if (ErrorIn(status)) { return status; } // Succesfully finished the computation diff --git a/src/routines/level1/xaxpy.cc b/src/routines/level1/xaxpy.cc index b57001f9..dbc05cf7 100644 --- a/src/routines/level1/xaxpy.cc +++ b/src/routines/level1/xaxpy.cc @@ -94,13 +94,13 @@ StatusCode Xaxpy::DoAxpy(const size_t n, const T alpha, if (use_fast_kernel) { auto global = std::vector{CeilDiv(n, db_["WPT"]*db_["VW"])}; auto local = std::vector{db_["WGS"]}; - status = RunKernel(kernel, global, local, event_); + status = RunKernel(kernel, queue_, device_, global, local, event_); } else { auto n_ceiled = Ceil(n, db_["WGS"]*db_["WPT"]); auto global = std::vector{n_ceiled/db_["WPT"]}; auto local = std::vector{db_["WGS"]}; - status = RunKernel(kernel, global, local, event_); + status = RunKernel(kernel, queue_, device_, global, local, event_); } if (ErrorIn(status)) { return status; } diff --git a/src/routines/level1/xcopy.cc b/src/routines/level1/xcopy.cc index 273e87a6..8848201c 100644 --- a/src/routines/level1/xcopy.cc +++ b/src/routines/level1/xcopy.cc @@ -88,13 +88,13 @@ StatusCode Xcopy::DoCopy(const size_t n, if (use_fast_kernel) { auto global = std::vector{CeilDiv(n, db_["WPT"]*db_["VW"])}; auto local = std::vector{db_["WGS"]}; - status = RunKernel(kernel, global, local, event_); + status = RunKernel(kernel, queue_, device_, global, local, event_); } else { auto n_ceiled = Ceil(n, db_["WGS"]*db_["WPT"]); auto global = std::vector{n_ceiled/db_["WPT"]}; auto local = std::vector{db_["WGS"]}; - status = RunKernel(kernel, global, local, event_); + status = RunKernel(kernel, queue_, device_, global, local, event_); } if (ErrorIn(status)) { return status; } diff --git a/src/routines/level1/xdot.cc b/src/routines/level1/xdot.cc index 25eccadf..a819564a 100644 --- a/src/routines/level1/xdot.cc +++ b/src/routines/level1/xdot.cc @@ -86,7 +86,7 @@ StatusCode Xdot::DoDot(const size_t n, auto global1 = std::vector{db_["WGS1"]*temp_size}; auto local1 = std::vector{db_["WGS1"]}; auto kernelEvent = Event(); - status = RunKernel(kernel1, global1, local1, kernelEvent.pointer()); + status = RunKernel(kernel1, queue_, device_, global1, local1, kernelEvent.pointer()); if (ErrorIn(status)) { return status; } eventWaitList.push_back(kernelEvent); @@ -98,7 +98,7 @@ StatusCode Xdot::DoDot(const size_t n, // Launches the epilogue kernel auto global2 = std::vector{db_["WGS2"]}; auto local2 = std::vector{db_["WGS2"]}; - status = RunKernel(kernel2, global2, local2, event_, eventWaitList); + status = RunKernel(kernel2, queue_, device_, global2, local2, event_, eventWaitList); if (ErrorIn(status)) { return status; } // Succesfully finished the computation diff --git a/src/routines/level1/xnrm2.cc b/src/routines/level1/xnrm2.cc index eca283f8..8904c369 100644 --- a/src/routines/level1/xnrm2.cc +++ b/src/routines/level1/xnrm2.cc @@ -78,7 +78,7 @@ StatusCode Xnrm2::DoNrm2(const size_t n, auto global1 = std::vector{db_["WGS1"]*temp_size}; auto local1 = std::vector{db_["WGS1"]}; auto kernelEvent = Event(); - status = RunKernel(kernel1, global1, local1, kernelEvent.pointer()); + status = RunKernel(kernel1, queue_, device_, global1, local1, kernelEvent.pointer()); if (ErrorIn(status)) { return status; } eventWaitList.push_back(kernelEvent); @@ -90,7 +90,7 @@ StatusCode Xnrm2::DoNrm2(const size_t n, // Launches the epilogue kernel auto global2 = std::vector{db_["WGS2"]}; auto local2 = std::vector{db_["WGS2"]}; - status = RunKernel(kernel2, global2, local2, event_, eventWaitList); + status = RunKernel(kernel2, queue_, device_, global2, local2, event_, eventWaitList); if (ErrorIn(status)) { return status; } // Succesfully finished the computation diff --git a/src/routines/level1/xscal.cc b/src/routines/level1/xscal.cc index 0ce211b6..8078c076 100644 --- a/src/routines/level1/xscal.cc +++ b/src/routines/level1/xscal.cc @@ -82,13 +82,13 @@ StatusCode Xscal::DoScal(const size_t n, const T alpha, if (use_fast_kernel) { auto global = std::vector{CeilDiv(n, db_["WPT"]*db_["VW"])}; auto local = std::vector{db_["WGS"]}; - status = RunKernel(kernel, global, local, event_); + status = RunKernel(kernel, queue_, device_, global, local, event_); } else { auto n_ceiled = Ceil(n, db_["WGS"]*db_["WPT"]); auto global = std::vector{n_ceiled/db_["WPT"]}; auto local = std::vector{db_["WGS"]}; - status = RunKernel(kernel, global, local, event_); + status = RunKernel(kernel, queue_, device_, global, local, event_); } if (ErrorIn(status)) { return status; } diff --git a/src/routines/level1/xswap.cc b/src/routines/level1/xswap.cc index 773d78b5..01184db5 100644 --- a/src/routines/level1/xswap.cc +++ b/src/routines/level1/xswap.cc @@ -88,13 +88,13 @@ StatusCode Xswap::DoSwap(const size_t n, if (use_fast_kernel) { auto global = std::vector{CeilDiv(n, db_["WPT"]*db_["VW"])}; auto local = std::vector{db_["WGS"]}; - status = RunKernel(kernel, global, local, event_); + status = RunKernel(kernel, queue_, device_, global, local, event_); } else { auto n_ceiled = Ceil(n, db_["WGS"]*db_["WPT"]); auto global = std::vector{n_ceiled/db_["WPT"]}; auto local = std::vector{db_["WGS"]}; - status = RunKernel(kernel, global, local, event_); + status = RunKernel(kernel, queue_, device_, global, local, event_); } if (ErrorIn(status)) { return status; } diff --git a/src/routines/level2/xgemv.cc b/src/routines/level2/xgemv.cc index 18e61f28..07c6ec9d 100644 --- a/src/routines/level2/xgemv.cc +++ b/src/routines/level2/xgemv.cc @@ -169,7 +169,7 @@ StatusCode Xgemv::MatVec(const Layout layout, const Transpose a_transpose, // Launches the kernel auto global = std::vector{global_size}; auto local = std::vector{local_size}; - status = RunKernel(kernel, global, local, event_); + status = RunKernel(kernel, queue_, device_, global, local, event_); if (ErrorIn(status)) { return status; } // Succesfully finished the computation diff --git a/src/routines/level2/xger.cc b/src/routines/level2/xger.cc index 7d6fb091..c69efc23 100644 --- a/src/routines/level2/xger.cc +++ b/src/routines/level2/xger.cc @@ -94,7 +94,7 @@ StatusCode Xger::DoGer(const Layout layout, auto a_two_ceiled = Ceil(CeilDiv(a_two, db_["WPT"]), db_["WGS2"]); auto global = std::vector{a_one_ceiled, a_two_ceiled}; auto local = std::vector{db_["WGS1"], db_["WGS2"]}; - status = RunKernel(kernel, global, local, event_); + status = RunKernel(kernel, queue_, device_, global, local, event_); if (ErrorIn(status)) { return status; } // Succesfully finished the computation diff --git a/src/routines/level2/xher.cc b/src/routines/level2/xher.cc index 3d5c0baf..ed8763dc 100644 --- a/src/routines/level2/xher.cc +++ b/src/routines/level2/xher.cc @@ -105,7 +105,7 @@ StatusCode Xher::DoHer(const Layout layout, const Triangle triangle, auto global_two = Ceil(CeilDiv(n, db_["WPT"]), db_["WGS2"]); auto global = std::vector{global_one, global_two}; auto local = std::vector{db_["WGS1"], db_["WGS2"]}; - status = RunKernel(kernel, global, local, event_); + status = RunKernel(kernel, queue_, device_, global, local, event_); if (ErrorIn(status)) { return status; } // Succesfully finished the computation diff --git a/src/routines/level2/xher2.cc b/src/routines/level2/xher2.cc index a7362410..10b98329 100644 --- a/src/routines/level2/xher2.cc +++ b/src/routines/level2/xher2.cc @@ -96,7 +96,7 @@ StatusCode Xher2::DoHer2(const Layout layout, const Triangle triangle, auto global_two = Ceil(CeilDiv(n, db_["WPT"]), db_["WGS2"]); auto global = std::vector{global_one, global_two}; auto local = std::vector{db_["WGS1"], db_["WGS2"]}; - status = RunKernel(kernel, global, local, event_); + status = RunKernel(kernel, queue_, device_, global, local, event_); if (ErrorIn(status)) { return status; } // Succesfully finished the computation diff --git a/src/routines/level3/xgemm.cc b/src/routines/level3/xgemm.cc index 713bed8f..eced53ab 100644 --- a/src/routines/level3/xgemm.cc +++ b/src/routines/level3/xgemm.cc @@ -142,7 +142,7 @@ StatusCode Xgemm::DoGemm(const Layout layout, // case nothing has to be done, these kernels can be skipped. if (!a_no_temp) { auto eventProcessA = Event(); - status = PadCopyTransposeMatrix(eventProcessA.pointer(), emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, eventProcessA.pointer(), emptyEventList, a_one, a_two, a_ld, a_offset, a_buffer, m_ceiled, k_ceiled, m_ceiled, 0, a_temp, ConstantOne(), program, @@ -154,7 +154,7 @@ StatusCode Xgemm::DoGemm(const Layout layout, // As above, but now for matrix B if (!b_no_temp) { auto eventProcessB = Event(); - status = PadCopyTransposeMatrix(eventProcessB.pointer(), emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, eventProcessB.pointer(), emptyEventList, b_one, b_two, b_ld, b_offset, b_buffer, n_ceiled, k_ceiled, n_ceiled, 0, b_temp, ConstantOne(), program, @@ -166,7 +166,7 @@ StatusCode Xgemm::DoGemm(const Layout layout, // As above, but now for matrix C. This is only necessary if C is used both as input and output. if (!c_no_temp && beta != static_cast(0)) { auto eventProcessC = Event(); - status = PadCopyTransposeMatrix(eventProcessC.pointer(), emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, eventProcessC.pointer(), emptyEventList, c_one, c_two, c_ld, c_offset, c_buffer, m_ceiled, n_ceiled, m_ceiled, 0, c_temp, ConstantOne(), program, @@ -199,13 +199,13 @@ StatusCode Xgemm::DoGemm(const Layout layout, // Launches the kernel auto eventKernel = Event(); auto eventPointer = (!c_no_temp) ? eventKernel.pointer() : event_; - status = RunKernel(kernel, global, local, eventPointer, eventWaitList); + status = RunKernel(kernel, queue_, device_, global, local, eventPointer, eventWaitList); if (ErrorIn(status)) { return status; } // Runs the post-processing kernel if needed if (!c_no_temp) { eventWaitList.push_back(eventKernel); - status = PadCopyTransposeMatrix(event_, eventWaitList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, event_, eventWaitList, m_ceiled, n_ceiled, m_ceiled, 0, c_temp, c_one, c_two, c_ld, c_offset, c_buffer, ConstantOne(), program, diff --git a/src/routines/level3/xhemm.cc b/src/routines/level3/xhemm.cc index a6e853e9..9791d7b4 100644 --- a/src/routines/level3/xhemm.cc +++ b/src/routines/level3/xhemm.cc @@ -80,7 +80,7 @@ StatusCode Xhemm::DoHemm(const Layout layout, const Side side, const Triangle Ceil(CeilDiv(k, db_["PAD_WPTY"]), db_["PAD_DIMY"])}; auto local = std::vector{db_["PAD_DIMX"], db_["PAD_DIMY"]}; auto kernelEvent = Event(); - status = RunKernel(kernel, global, local, kernelEvent.pointer()); + status = RunKernel(kernel, queue_, device_, global, local, kernelEvent.pointer()); if (ErrorIn(status)) { return status; } // Synchronize now: 'DoGemm' does not accept a list of events to wait for diff --git a/src/routines/level3/xher2k.cc b/src/routines/level3/xher2k.cc index c891c202..43f7bb76 100644 --- a/src/routines/level3/xher2k.cc +++ b/src/routines/level3/xher2k.cc @@ -129,7 +129,7 @@ StatusCode Xher2k::DoHer2k(const Layout layout, const Triangle triangle, co // case nothing has to be done, these kernels can be skipped. if (!a1_no_temp) { auto eventProcessA1 = Event(); - status = PadCopyTransposeMatrix(eventProcessA1.pointer(), emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, eventProcessA1.pointer(), emptyEventList, ab_one, ab_two, a_ld, a_offset, a_buffer, n_ceiled, k_ceiled, n_ceiled, 0, a1_temp, ConstantOne(), program, @@ -139,7 +139,7 @@ StatusCode Xher2k::DoHer2k(const Layout layout, const Triangle triangle, co } if (!a2_no_temp) { auto eventProcessA2 = Event(); - status = PadCopyTransposeMatrix(eventProcessA2.pointer(), emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, eventProcessA2.pointer(), emptyEventList, ab_one, ab_two, a_ld, a_offset, a_buffer, n_ceiled, k_ceiled, n_ceiled, 0, a2_temp, ConstantOne(), program, @@ -149,7 +149,7 @@ StatusCode Xher2k::DoHer2k(const Layout layout, const Triangle triangle, co } if (!b1_no_temp) { auto eventProcessB1 = Event(); - status = PadCopyTransposeMatrix(eventProcessB1.pointer(), emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, eventProcessB1.pointer(), emptyEventList, ab_one, ab_two, b_ld, b_offset, b_buffer, n_ceiled, k_ceiled, n_ceiled, 0, b1_temp, ConstantOne(), program, @@ -159,7 +159,7 @@ StatusCode Xher2k::DoHer2k(const Layout layout, const Triangle triangle, co } if (!b2_no_temp) { auto eventProcessB2 = Event(); - status = PadCopyTransposeMatrix(eventProcessB2.pointer(), emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, eventProcessB2.pointer(), emptyEventList, ab_one, ab_two, b_ld, b_offset, b_buffer, n_ceiled, k_ceiled, n_ceiled, 0, b2_temp, ConstantOne(), program, @@ -171,7 +171,7 @@ StatusCode Xher2k::DoHer2k(const Layout layout, const Triangle triangle, co // Furthermore, also creates a (possibly padded) copy of matrix C, since it is not allowed to // modify the other triangle. auto eventProcessC = Event(); - status = PadCopyTransposeMatrix(eventProcessC.pointer(), emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, eventProcessC.pointer(), emptyEventList, n, n, c_ld, c_offset, c_buffer, n_ceiled, n_ceiled, n_ceiled, 0, c_temp, ConstantOne(), program, @@ -201,7 +201,7 @@ StatusCode Xher2k::DoHer2k(const Layout layout, const Triangle triangle, co // Launches the kernel auto eventKernel1 = Event(); - status = RunKernel(kernel, global, local, eventKernel1.pointer(), eventWaitList); + status = RunKernel(kernel, queue_, device_, global, local, eventKernel1.pointer(), eventWaitList); if (ErrorIn(status)) { return status; } eventWaitList.push_back(eventKernel1); @@ -217,14 +217,14 @@ StatusCode Xher2k::DoHer2k(const Layout layout, const Triangle triangle, co // Runs the kernel again auto eventKernel2 = Event(); - status = RunKernel(kernel, global, local, eventKernel2.pointer(), eventWaitList); + status = RunKernel(kernel, queue_, device_, global, local, eventKernel2.pointer(), eventWaitList); if (ErrorIn(status)) { return status; } eventWaitList.push_back(eventKernel2); // Runs the post-processing kernel auto upper = (triangle == Triangle::kUpper); auto lower = (triangle == Triangle::kLower); - status = PadCopyTransposeMatrix(event_, eventWaitList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, event_, eventWaitList, n_ceiled, n_ceiled, n_ceiled, 0, c_temp, n, n, c_ld, c_offset, c_buffer, ConstantOne(), program, diff --git a/src/routines/level3/xherk.cc b/src/routines/level3/xherk.cc index 9d64af95..8ebcbfa8 100644 --- a/src/routines/level3/xherk.cc +++ b/src/routines/level3/xherk.cc @@ -121,7 +121,7 @@ StatusCode Xherk::DoHerk(const Layout layout, const Triangle triangle, cons // case nothing has to be done, these kernels can be skipped. Two copies are created. if (!a_no_temp) { auto eventProcessA = Event(); - status = PadCopyTransposeMatrix(eventProcessA.pointer(), emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, eventProcessA.pointer(), emptyEventList, a_one, a_two, a_ld, a_offset, a_buffer, n_ceiled, k_ceiled, n_ceiled, 0, a_temp, ConstantOne(), program, @@ -131,7 +131,7 @@ StatusCode Xherk::DoHerk(const Layout layout, const Triangle triangle, cons } if (!b_no_temp) { auto eventProcessB = Event(); - status = PadCopyTransposeMatrix(eventProcessB.pointer(), emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, eventProcessB.pointer(), emptyEventList, a_one, a_two, a_ld, a_offset, a_buffer, n_ceiled, k_ceiled, n_ceiled, 0, b_temp, ConstantOne(), program, @@ -143,7 +143,7 @@ StatusCode Xherk::DoHerk(const Layout layout, const Triangle triangle, cons // Furthermore, also creates a (possibly padded) copy of matrix C, since it is not allowed to // modify the other triangle. auto eventProcessC = Event(); - status = PadCopyTransposeMatrix(eventProcessC.pointer(), emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, eventProcessC.pointer(), emptyEventList, n, n, c_ld, c_offset, c_buffer, n_ceiled, n_ceiled, n_ceiled, 0, c_temp, ConstantOne(), program, @@ -173,14 +173,14 @@ StatusCode Xherk::DoHerk(const Layout layout, const Triangle triangle, cons // Launches the kernel auto eventKernel = Event(); - status = RunKernel(kernel, global, local, eventKernel.pointer(), eventWaitList); + status = RunKernel(kernel, queue_, device_, global, local, eventKernel.pointer(), eventWaitList); if (ErrorIn(status)) { return status; } eventWaitList.push_back(eventKernel); // Runs the post-processing kernel auto upper = (triangle == Triangle::kUpper); auto lower = (triangle == Triangle::kLower); - status = PadCopyTransposeMatrix(event_, eventWaitList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, event_, eventWaitList, n_ceiled, n_ceiled, n_ceiled, 0, c_temp, n, n, c_ld, c_offset, c_buffer, ConstantOne(), program, diff --git a/src/routines/level3/xsymm.cc b/src/routines/level3/xsymm.cc index 379e2908..650afbfc 100644 --- a/src/routines/level3/xsymm.cc +++ b/src/routines/level3/xsymm.cc @@ -80,7 +80,7 @@ StatusCode Xsymm::DoSymm(const Layout layout, const Side side, const Triangle Ceil(CeilDiv(k, db_["PAD_WPTY"]), db_["PAD_DIMY"])}; auto local = std::vector{db_["PAD_DIMX"], db_["PAD_DIMY"]}; auto kernelEvent = Event(); - status = RunKernel(kernel, global, local, kernelEvent.pointer()); + status = RunKernel(kernel, queue_, device_, global, local, kernelEvent.pointer()); if (ErrorIn(status)) { return status; } // Synchronize now: 'DoGemm' does not accept a list of events to wait for diff --git a/src/routines/level3/xsyr2k.cc b/src/routines/level3/xsyr2k.cc index 886d1e16..4b436381 100644 --- a/src/routines/level3/xsyr2k.cc +++ b/src/routines/level3/xsyr2k.cc @@ -121,7 +121,7 @@ StatusCode Xsyr2k::DoSyr2k(const Layout layout, const Triangle triangle, cons // case nothing has to be done, these kernels can be skipped. if (!a_no_temp) { auto eventProcessA = Event(); - status = PadCopyTransposeMatrix(eventProcessA.pointer(), emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, eventProcessA.pointer(), emptyEventList, ab_one, ab_two, a_ld, a_offset, a_buffer, n_ceiled, k_ceiled, n_ceiled, 0, a_temp, ConstantOne(), program, @@ -131,7 +131,7 @@ StatusCode Xsyr2k::DoSyr2k(const Layout layout, const Triangle triangle, cons } if (!b_no_temp) { auto eventProcessB = Event(); - status = PadCopyTransposeMatrix(eventProcessB.pointer(), emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, eventProcessB.pointer(), emptyEventList, ab_one, ab_two, b_ld, b_offset, b_buffer, n_ceiled, k_ceiled, n_ceiled, 0, b_temp, ConstantOne(), program, @@ -143,7 +143,7 @@ StatusCode Xsyr2k::DoSyr2k(const Layout layout, const Triangle triangle, cons // Furthermore, also creates a (possibly padded) copy of matrix C, since it is not allowed to // modify the other triangle. auto eventProcessC = Event(); - status = PadCopyTransposeMatrix(eventProcessC.pointer(), emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, eventProcessC.pointer(), emptyEventList, n, n, c_ld, c_offset, c_buffer, n_ceiled, n_ceiled, n_ceiled, 0, c_temp, ConstantOne(), program, @@ -173,7 +173,7 @@ StatusCode Xsyr2k::DoSyr2k(const Layout layout, const Triangle triangle, cons // Launches the kernel auto eventKernel1 = Event(); - status = RunKernel(kernel, global, local, eventKernel1.pointer(), eventWaitList); + status = RunKernel(kernel, queue_, device_, global, local, eventKernel1.pointer(), eventWaitList); if (ErrorIn(status)) { return status; } eventWaitList.push_back(eventKernel1); @@ -186,14 +186,14 @@ StatusCode Xsyr2k::DoSyr2k(const Layout layout, const Triangle triangle, cons // Runs the kernel again auto eventKernel2 = Event(); - status = RunKernel(kernel, global, local, eventKernel2.pointer(), eventWaitList); + status = RunKernel(kernel, queue_, device_, global, local, eventKernel2.pointer(), eventWaitList); if (ErrorIn(status)) { return status; } eventWaitList.push_back(eventKernel2); // Runs the post-processing kernel auto upper = (triangle == Triangle::kUpper); auto lower = (triangle == Triangle::kLower); - status = PadCopyTransposeMatrix(event_, eventWaitList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, event_, eventWaitList, n_ceiled, n_ceiled, n_ceiled, 0, c_temp, n, n, c_ld, c_offset, c_buffer, ConstantOne(), program, diff --git a/src/routines/level3/xsyrk.cc b/src/routines/level3/xsyrk.cc index 000347f3..5c49795b 100644 --- a/src/routines/level3/xsyrk.cc +++ b/src/routines/level3/xsyrk.cc @@ -114,7 +114,7 @@ StatusCode Xsyrk::DoSyrk(const Layout layout, const Triangle triangle, const // case nothing has to be done, these kernels can be skipped. if (!a_no_temp) { auto eventProcessA = Event(); - status = PadCopyTransposeMatrix(eventProcessA.pointer(), emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, eventProcessA.pointer(), emptyEventList, a_one, a_two, a_ld, a_offset, a_buffer, n_ceiled, k_ceiled, n_ceiled, 0, a_temp, ConstantOne(), program, @@ -126,7 +126,7 @@ StatusCode Xsyrk::DoSyrk(const Layout layout, const Triangle triangle, const // Furthermore, also creates a (possibly padded) copy of matrix C, since it is not allowed to // modify the other triangle. auto eventProcessC = Event(); - status = PadCopyTransposeMatrix(eventProcessC.pointer(), emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, eventProcessC.pointer(), emptyEventList, n, n, c_ld, c_offset, c_buffer, n_ceiled, n_ceiled, n_ceiled, 0, c_temp, ConstantOne(), program, @@ -156,14 +156,14 @@ StatusCode Xsyrk::DoSyrk(const Layout layout, const Triangle triangle, const // Launches the kernel auto eventKernel = Event(); - status = RunKernel(kernel, global, local, eventKernel.pointer(), eventWaitList); + status = RunKernel(kernel, queue_, device_, global, local, eventKernel.pointer(), eventWaitList); if (ErrorIn(status)) { return status; } eventWaitList.push_back(eventKernel); // Runs the post-processing kernel auto upper = (triangle == Triangle::kUpper); auto lower = (triangle == Triangle::kLower); - status = PadCopyTransposeMatrix(event_, eventWaitList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, event_, eventWaitList, n_ceiled, n_ceiled, n_ceiled, 0, c_temp, n, n, c_ld, c_offset, c_buffer, ConstantOne(), program, diff --git a/src/routines/level3/xtrmm.cc b/src/routines/level3/xtrmm.cc index c62305aa..98e0622d 100644 --- a/src/routines/level3/xtrmm.cc +++ b/src/routines/level3/xtrmm.cc @@ -83,7 +83,7 @@ StatusCode Xtrmm::DoTrmm(const Layout layout, const Side side, const Triangle Ceil(CeilDiv(k, db_["PAD_WPTY"]), db_["PAD_DIMY"])}; auto local = std::vector{db_["PAD_DIMX"], db_["PAD_DIMY"]}; auto kernelEvent = Event(); - status = RunKernel(kernel, global, local, kernelEvent.pointer()); + status = RunKernel(kernel, queue_, device_, global, local, kernelEvent.pointer()); if (ErrorIn(status)) { return status; } // Synchronize now: 'DoGemm' does not accept a list of events to wait for diff --git a/src/routines/levelx/xomatcopy.cc b/src/routines/levelx/xomatcopy.cc index dcc4e52a..199a4903 100644 --- a/src/routines/levelx/xomatcopy.cc +++ b/src/routines/levelx/xomatcopy.cc @@ -81,7 +81,7 @@ StatusCode Xomatcopy::DoOmatcopy(const Layout layout, const Transpose a_trans const auto program = GetProgramFromCache(); auto emptyEventList = std::vector(); - status = PadCopyTransposeMatrix(event_, emptyEventList, + status = PadCopyTransposeMatrix(queue_, device_, context_, db_, event_, emptyEventList, a_one, a_two, a_ld, a_offset, a_buffer, b_one, b_two, b_ld, b_offset, b_buffer, alpha, program, false, transpose, conjugate); From 536b7fe4bce4b183cb060a1b9045752ae39d842f Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Fri, 17 Jun 2016 13:57:50 +0200 Subject: [PATCH 4/9] Removed the interface to the cache functions from the Routine class, calls them directly now --- include/internal/cache.h | 4 +--- include/internal/routine.h | 24 -------------------- include/internal/routines/level1/xamax.h | 2 +- include/internal/routines/level1/xasum.h | 2 +- include/internal/routines/level1/xaxpy.h | 2 +- include/internal/routines/level1/xcopy.h | 3 ++- include/internal/routines/level1/xdot.h | 2 +- include/internal/routines/level1/xnrm2.h | 2 +- include/internal/routines/level1/xscal.h | 3 ++- include/internal/routines/level1/xswap.h | 3 ++- include/internal/routines/level2/xgemv.h | 2 +- include/internal/routines/level2/xger.h | 2 +- include/internal/routines/level2/xher.h | 2 +- include/internal/routines/level2/xher2.h | 2 +- include/internal/routines/level2/xtbmv.h | 1 + include/internal/routines/level2/xtpmv.h | 1 + include/internal/routines/level2/xtrmv.h | 1 + include/internal/routines/level3/xgemm.h | 4 ++-- include/internal/routines/level3/xhemm.h | 3 ++- include/internal/routines/level3/xher2k.h | 2 +- include/internal/routines/level3/xherk.h | 2 +- include/internal/routines/level3/xsymm.h | 3 ++- include/internal/routines/level3/xsyr2k.h | 2 +- include/internal/routines/level3/xsyrk.h | 2 +- include/internal/routines/level3/xtrmm.h | 3 ++- include/internal/routines/levelx/xomatcopy.h | 2 +- src/cache.cc | 4 +--- src/clblast.cc | 2 +- src/routine.cc | 12 +++++----- src/routines/level1/xamax.cc | 2 +- src/routines/level1/xasum.cc | 2 +- src/routines/level1/xaxpy.cc | 2 +- src/routines/level1/xcopy.cc | 2 +- src/routines/level1/xdot.cc | 2 +- src/routines/level1/xnrm2.cc | 2 +- src/routines/level1/xscal.cc | 2 +- src/routines/level1/xswap.cc | 2 +- src/routines/level2/xgemv.cc | 2 +- src/routines/level2/xger.cc | 2 +- src/routines/level2/xher.cc | 2 +- src/routines/level2/xher2.cc | 2 +- src/routines/level3/xgemm.cc | 2 +- src/routines/level3/xhemm.cc | 2 +- src/routines/level3/xher2k.cc | 2 +- src/routines/level3/xherk.cc | 2 +- src/routines/level3/xsymm.cc | 2 +- src/routines/level3/xsyr2k.cc | 2 +- src/routines/level3/xsyrk.cc | 2 +- src/routines/level3/xtrmm.cc | 2 +- src/routines/levelx/xomatcopy.cc | 2 +- 50 files changed, 61 insertions(+), 80 deletions(-) diff --git a/include/internal/cache.h b/include/internal/cache.h index 4a11b70f..bc7e87d9 100644 --- a/include/internal/cache.h +++ b/include/internal/cache.h @@ -21,7 +21,6 @@ #include "internal/utilities.h" namespace clblast { -namespace cache { // ================================================================================================= // The cache of compiled OpenCL binaries, along with some meta-data @@ -90,10 +89,9 @@ bool ProgramIsInCache(const Context &context, const Precision &precision, // ================================================================================================= // Clears the cache of stored binaries -StatusCode ClearCache(); +StatusCode CacheClearAll(); // ================================================================================================= -} // namespace cache } // namespace clblast // CLBLAST_CACHE_H_ diff --git a/include/internal/routine.h b/include/internal/routine.h index e1888f1f..c64abc4c 100644 --- a/include/internal/routine.h +++ b/include/internal/routine.h @@ -41,30 +41,6 @@ class Routine { protected: - // Stores a newly compiled binary/program into the cache - void StoreBinaryToCache(const std::string& binary) const { - cache::StoreBinaryToCache(binary, device_name_, precision_, routine_name_); - } - void StoreProgramToCache(const Program& program) const { - cache::StoreProgramToCache(program, context_, precision_, routine_name_); - } - - // Queries the cache and retrieve either a matching binary/program or a boolean whether a match - // exists. The first assumes that the binary/program is available in the cache and will throw an - // exception otherwise. - std::string GetBinaryFromCache() const { - return cache::GetBinaryFromCache(device_name_, precision_, routine_name_); - } - Program GetProgramFromCache() const { - return cache::GetProgramFromCache(context_, precision_, routine_name_); - } - bool BinaryIsInCache() const { - return cache::BinaryIsInCache(device_name_, precision_, routine_name_); - } - bool ProgramIsInCache() const { - return cache::ProgramIsInCache(context_, precision_, routine_name_); - } - // Non-static variable for the precision. Note that the same variable (but static) might exist in // a derived class. const Precision precision_; diff --git a/include/internal/routines/level1/xamax.h b/include/internal/routines/level1/xamax.h index 54434362..ec1de346 100644 --- a/include/internal/routines/level1/xamax.h +++ b/include/internal/routines/level1/xamax.h @@ -31,7 +31,7 @@ class Xamax: public Routine { using Routine::device_; using Routine::event_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Constructor Xamax(Queue &queue, EventPointer event, const std::string &name = "AMAX"); diff --git a/include/internal/routines/level1/xasum.h b/include/internal/routines/level1/xasum.h index ee593e30..b6c8e4e6 100644 --- a/include/internal/routines/level1/xasum.h +++ b/include/internal/routines/level1/xasum.h @@ -31,7 +31,7 @@ class Xasum: public Routine { using Routine::device_; using Routine::event_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Constructor Xasum(Queue &queue, EventPointer event, const std::string &name = "ASUM"); diff --git a/include/internal/routines/level1/xaxpy.h b/include/internal/routines/level1/xaxpy.h index 6ea3264b..71e7c01c 100644 --- a/include/internal/routines/level1/xaxpy.h +++ b/include/internal/routines/level1/xaxpy.h @@ -31,7 +31,7 @@ class Xaxpy: public Routine { using Routine::device_; using Routine::event_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Constructor Xaxpy(Queue &queue, EventPointer event, const std::string &name = "AXPY"); diff --git a/include/internal/routines/level1/xcopy.h b/include/internal/routines/level1/xcopy.h index b371ca9b..de9edaaf 100644 --- a/include/internal/routines/level1/xcopy.h +++ b/include/internal/routines/level1/xcopy.h @@ -30,7 +30,8 @@ class Xcopy: public Routine { using Routine::queue_; using Routine::device_; using Routine::event_; - using Routine::GetProgramFromCache; + using Routine::context_; + using Routine::routine_name_; // Constructor Xcopy(Queue &queue, EventPointer event, const std::string &name = "COPY"); diff --git a/include/internal/routines/level1/xdot.h b/include/internal/routines/level1/xdot.h index 7c69a902..b70ff3fe 100644 --- a/include/internal/routines/level1/xdot.h +++ b/include/internal/routines/level1/xdot.h @@ -31,7 +31,7 @@ class Xdot: public Routine { using Routine::device_; using Routine::event_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Constructor Xdot(Queue &queue, EventPointer event, const std::string &name = "DOT"); diff --git a/include/internal/routines/level1/xnrm2.h b/include/internal/routines/level1/xnrm2.h index f83cc2ce..1cb22728 100644 --- a/include/internal/routines/level1/xnrm2.h +++ b/include/internal/routines/level1/xnrm2.h @@ -31,7 +31,7 @@ class Xnrm2: public Routine { using Routine::device_; using Routine::event_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Constructor Xnrm2(Queue &queue, EventPointer event, const std::string &name = "NRM2"); diff --git a/include/internal/routines/level1/xscal.h b/include/internal/routines/level1/xscal.h index 40f017f2..c2b2c1bf 100644 --- a/include/internal/routines/level1/xscal.h +++ b/include/internal/routines/level1/xscal.h @@ -30,7 +30,8 @@ class Xscal: public Routine { using Routine::queue_; using Routine::device_; using Routine::event_; - using Routine::GetProgramFromCache; + using Routine::context_; + using Routine::routine_name_; // Constructor Xscal(Queue &queue, EventPointer event, const std::string &name = "SCAL"); diff --git a/include/internal/routines/level1/xswap.h b/include/internal/routines/level1/xswap.h index f794a1b4..45e34dd6 100644 --- a/include/internal/routines/level1/xswap.h +++ b/include/internal/routines/level1/xswap.h @@ -30,7 +30,8 @@ class Xswap: public Routine { using Routine::queue_; using Routine::device_; using Routine::event_; - using Routine::GetProgramFromCache; + using Routine::context_; + using Routine::routine_name_; // Constructor Xswap(Queue &queue, EventPointer event, const std::string &name = "SWAP"); diff --git a/include/internal/routines/level2/xgemv.h b/include/internal/routines/level2/xgemv.h index aec8b35b..b28536bd 100644 --- a/include/internal/routines/level2/xgemv.h +++ b/include/internal/routines/level2/xgemv.h @@ -31,7 +31,7 @@ class Xgemv: public Routine { using Routine::device_; using Routine::event_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Constructor Xgemv(Queue &queue, EventPointer event, const std::string &name = "GEMV"); diff --git a/include/internal/routines/level2/xger.h b/include/internal/routines/level2/xger.h index 260325cb..996e0fc8 100644 --- a/include/internal/routines/level2/xger.h +++ b/include/internal/routines/level2/xger.h @@ -31,7 +31,7 @@ class Xger: public Routine { using Routine::device_; using Routine::event_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Constructor Xger(Queue &queue, EventPointer event, const std::string &name = "GER"); diff --git a/include/internal/routines/level2/xher.h b/include/internal/routines/level2/xher.h index d66b2603..a4a25c3c 100644 --- a/include/internal/routines/level2/xher.h +++ b/include/internal/routines/level2/xher.h @@ -31,7 +31,7 @@ class Xher: public Routine { using Routine::device_; using Routine::event_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Constructor Xher(Queue &queue, EventPointer event, const std::string &name = "HER"); diff --git a/include/internal/routines/level2/xher2.h b/include/internal/routines/level2/xher2.h index 35bf8190..de8583f4 100644 --- a/include/internal/routines/level2/xher2.h +++ b/include/internal/routines/level2/xher2.h @@ -31,7 +31,7 @@ class Xher2: public Routine { using Routine::device_; using Routine::event_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Constructor Xher2(Queue &queue, EventPointer event, const std::string &name = "HER2"); diff --git a/include/internal/routines/level2/xtbmv.h b/include/internal/routines/level2/xtbmv.h index c9107c25..3ccdf3f8 100644 --- a/include/internal/routines/level2/xtbmv.h +++ b/include/internal/routines/level2/xtbmv.h @@ -30,6 +30,7 @@ class Xtbmv: public Xgemv { using Routine::queue_; using Routine::device_; using Routine::context_; + using Routine::routine_name_; // Uses the generic matrix-vector routine using Xgemv::MatVec; diff --git a/include/internal/routines/level2/xtpmv.h b/include/internal/routines/level2/xtpmv.h index e85c225f..7619197d 100644 --- a/include/internal/routines/level2/xtpmv.h +++ b/include/internal/routines/level2/xtpmv.h @@ -30,6 +30,7 @@ class Xtpmv: public Xgemv { using Routine::queue_; using Routine::device_; using Routine::context_; + using Routine::routine_name_; // Uses the generic matrix-vector routine using Xgemv::MatVec; diff --git a/include/internal/routines/level2/xtrmv.h b/include/internal/routines/level2/xtrmv.h index 97a180ff..4021b39c 100644 --- a/include/internal/routines/level2/xtrmv.h +++ b/include/internal/routines/level2/xtrmv.h @@ -30,6 +30,7 @@ class Xtrmv: public Xgemv { using Routine::queue_; using Routine::device_; using Routine::context_; + using Routine::routine_name_; // Uses the generic matrix-vector routine using Xgemv::MatVec; diff --git a/include/internal/routines/level3/xgemm.h b/include/internal/routines/level3/xgemm.h index 2fd853a9..211ae990 100644 --- a/include/internal/routines/level3/xgemm.h +++ b/include/internal/routines/level3/xgemm.h @@ -31,7 +31,7 @@ class Xgemm: public Routine { using Routine::device_; using Routine::event_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Constructor Xgemm(Queue &queue, EventPointer event, const std::string &name = "GEMM"); @@ -45,7 +45,7 @@ class Xgemm: public Routine { const T beta, const Buffer &c_buffer, const size_t c_offset, const size_t c_ld); - private: + protected: // Static variable to get the precision const static Precision precision_; }; diff --git a/include/internal/routines/level3/xhemm.h b/include/internal/routines/level3/xhemm.h index 8bd38393..a9a422b0 100644 --- a/include/internal/routines/level3/xhemm.h +++ b/include/internal/routines/level3/xhemm.h @@ -30,10 +30,11 @@ class Xhemm: public Xgemm { using Routine::queue_; using Routine::device_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Uses the regular Xgemm routine using Xgemm::DoGemm; + using Xgemm::precision_; // Constructor Xhemm(Queue &queue, EventPointer event, const std::string &name = "HEMM"); diff --git a/include/internal/routines/level3/xher2k.h b/include/internal/routines/level3/xher2k.h index 1afe87a6..092d7246 100644 --- a/include/internal/routines/level3/xher2k.h +++ b/include/internal/routines/level3/xher2k.h @@ -33,7 +33,7 @@ class Xher2k: public Routine { using Routine::device_; using Routine::event_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Constructor Xher2k(Queue &queue, EventPointer event, const std::string &name = "HER2K"); diff --git a/include/internal/routines/level3/xherk.h b/include/internal/routines/level3/xherk.h index 64abae3b..b5e2d723 100644 --- a/include/internal/routines/level3/xherk.h +++ b/include/internal/routines/level3/xherk.h @@ -33,7 +33,7 @@ class Xherk: public Routine { using Routine::device_; using Routine::event_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Constructor Xherk(Queue &queue, EventPointer event, const std::string &name = "HERK"); diff --git a/include/internal/routines/level3/xsymm.h b/include/internal/routines/level3/xsymm.h index c35dfb5e..991284f5 100644 --- a/include/internal/routines/level3/xsymm.h +++ b/include/internal/routines/level3/xsymm.h @@ -32,10 +32,11 @@ class Xsymm: public Xgemm { using Routine::queue_; using Routine::device_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Uses the regular Xgemm routine using Xgemm::DoGemm; + using Xgemm::precision_; // Constructor Xsymm(Queue &queue, EventPointer event, const std::string &name = "SYMM"); diff --git a/include/internal/routines/level3/xsyr2k.h b/include/internal/routines/level3/xsyr2k.h index 73d11b0b..c7ae1678 100644 --- a/include/internal/routines/level3/xsyr2k.h +++ b/include/internal/routines/level3/xsyr2k.h @@ -33,7 +33,7 @@ class Xsyr2k: public Routine { using Routine::device_; using Routine::event_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Constructor Xsyr2k(Queue &queue, EventPointer event, const std::string &name = "SYR2K"); diff --git a/include/internal/routines/level3/xsyrk.h b/include/internal/routines/level3/xsyrk.h index 344c02e2..860f8e10 100644 --- a/include/internal/routines/level3/xsyrk.h +++ b/include/internal/routines/level3/xsyrk.h @@ -35,7 +35,7 @@ class Xsyrk: public Routine { using Routine::device_; using Routine::event_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Constructor Xsyrk(Queue &queue, EventPointer event, const std::string &name = "SYRK"); diff --git a/include/internal/routines/level3/xtrmm.h b/include/internal/routines/level3/xtrmm.h index 5c12815d..caf1ca75 100644 --- a/include/internal/routines/level3/xtrmm.h +++ b/include/internal/routines/level3/xtrmm.h @@ -31,10 +31,11 @@ class Xtrmm: public Xgemm { using Routine::queue_; using Routine::device_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Uses the regular Xgemm routine using Xgemm::DoGemm; + using Xgemm::precision_; // Constructor Xtrmm(Queue &queue, EventPointer event, const std::string &name = "TRMM"); diff --git a/include/internal/routines/levelx/xomatcopy.h b/include/internal/routines/levelx/xomatcopy.h index 7c284635..29f33aac 100644 --- a/include/internal/routines/levelx/xomatcopy.h +++ b/include/internal/routines/levelx/xomatcopy.h @@ -31,7 +31,7 @@ class Xomatcopy: public Routine { using Routine::device_; using Routine::event_; using Routine::context_; - using Routine::GetProgramFromCache; + using Routine::routine_name_; // Constructor Xomatcopy(Queue &queue, EventPointer event, const std::string &name = "OMATCOPY"); diff --git a/src/cache.cc b/src/cache.cc index 4dbdb711..a34d351f 100644 --- a/src/cache.cc +++ b/src/cache.cc @@ -18,7 +18,6 @@ #include "internal/cache.h" namespace clblast { -namespace cache { // ================================================================================================= // Stores the compiled binary or IR in the cache @@ -98,7 +97,7 @@ bool ProgramIsInCache(const Context &context, const Precision &precision, // ================================================================================================= // Clears the cache of stored binaries and programs -StatusCode ClearCache() { +StatusCode CacheClearAll() { binary_cache_mutex_.lock(); binary_cache_.clear(); binary_cache_mutex_.unlock(); @@ -109,5 +108,4 @@ StatusCode ClearCache() { } // ================================================================================================= -} // namespace cache } // namespace clblast diff --git a/src/clblast.cc b/src/clblast.cc index e3df6ede..2d6776d0 100644 --- a/src/clblast.cc +++ b/src/clblast.cc @@ -2120,7 +2120,7 @@ template StatusCode PUBLIC_API Omatcopy(const Layout, const Transpose, // ================================================================================================= // Clears the cache of stored binaries -StatusCode ClearCache() { return cache::ClearCache(); } +StatusCode ClearCache() { return CacheClearAll(); } // Fills the cache with all binaries for a specific device StatusCode FillCache(const cl_device_id device) { diff --git a/src/routine.cc b/src/routine.cc index c59cbc11..1086aead 100644 --- a/src/routine.cc +++ b/src/routine.cc @@ -40,17 +40,17 @@ template StatusCode Routine::SetUp() { // Queries the cache to see whether or not the program (context-specific) is already there - if (ProgramIsInCache()) { return StatusCode::kSuccess; } + if (ProgramIsInCache(context_, precision_, routine_name_)) { return StatusCode::kSuccess; } // Queries the cache to see whether or not the binary (device-specific) is already there. If it // is, a program is created and stored in the cache - if (BinaryIsInCache()) { + if (BinaryIsInCache(device_name_, precision_, routine_name_)) { try { - auto& binary = cache::GetBinaryFromCache(device_name_, precision_, routine_name_); + auto& binary = GetBinaryFromCache(device_name_, precision_, routine_name_); auto program = Program(device_, context_, binary); auto options = std::vector(); program.Build(device_, options); - StoreProgramToCache(program); + StoreProgramToCache(program, context_, precision_, routine_name_); } catch (...) { return StatusCode::kBuildProgramFailure; } return StatusCode::kSuccess; } @@ -121,8 +121,8 @@ StatusCode Routine::SetUp() { // Store the compiled binary and program in the cache const auto binary = program.GetIR(); - StoreBinaryToCache(binary); - StoreProgramToCache(program); + StoreBinaryToCache(binary, device_name_, precision_, routine_name_); + StoreProgramToCache(program, context_, precision_, routine_name_); } catch (...) { return StatusCode::kBuildProgramFailure; } // No errors, normal termination of this function diff --git a/src/routines/level1/xamax.cc b/src/routines/level1/xamax.cc index 6028d953..9e203d03 100644 --- a/src/routines/level1/xamax.cc +++ b/src/routines/level1/xamax.cc @@ -56,7 +56,7 @@ StatusCode Xamax::DoAmax(const size_t n, // Retrieves the Xamax kernels from the compiled binary try { - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); auto kernel1 = Kernel(program, "Xamax"); auto kernel2 = Kernel(program, "XamaxEpilogue"); diff --git a/src/routines/level1/xasum.cc b/src/routines/level1/xasum.cc index 6046a467..f4d898be 100644 --- a/src/routines/level1/xasum.cc +++ b/src/routines/level1/xasum.cc @@ -56,7 +56,7 @@ StatusCode Xasum::DoAsum(const size_t n, // Retrieves the Xasum kernels from the compiled binary try { - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); auto kernel1 = Kernel(program, "Xasum"); auto kernel2 = Kernel(program, "XasumEpilogue"); diff --git a/src/routines/level1/xaxpy.cc b/src/routines/level1/xaxpy.cc index dbc05cf7..221e1195 100644 --- a/src/routines/level1/xaxpy.cc +++ b/src/routines/level1/xaxpy.cc @@ -65,7 +65,7 @@ StatusCode Xaxpy::DoAxpy(const size_t n, const T alpha, // Retrieves the Xaxpy kernel from the compiled binary try { - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); auto kernel = Kernel(program, kernel_name); // Upload the scalar argument as a constant buffer to the device (needed for half-precision) diff --git a/src/routines/level1/xcopy.cc b/src/routines/level1/xcopy.cc index 8848201c..647a681a 100644 --- a/src/routines/level1/xcopy.cc +++ b/src/routines/level1/xcopy.cc @@ -65,7 +65,7 @@ StatusCode Xcopy::DoCopy(const size_t n, // Retrieves the Xcopy kernel from the compiled binary try { - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); auto kernel = Kernel(program, kernel_name); // Sets the kernel arguments diff --git a/src/routines/level1/xdot.cc b/src/routines/level1/xdot.cc index a819564a..eac64d13 100644 --- a/src/routines/level1/xdot.cc +++ b/src/routines/level1/xdot.cc @@ -60,7 +60,7 @@ StatusCode Xdot::DoDot(const size_t n, // Retrieves the Xdot kernels from the compiled binary try { - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); auto kernel1 = Kernel(program, "Xdot"); auto kernel2 = Kernel(program, "XdotEpilogue"); diff --git a/src/routines/level1/xnrm2.cc b/src/routines/level1/xnrm2.cc index 8904c369..23055aac 100644 --- a/src/routines/level1/xnrm2.cc +++ b/src/routines/level1/xnrm2.cc @@ -56,7 +56,7 @@ StatusCode Xnrm2::DoNrm2(const size_t n, // Retrieves the Xnrm2 kernels from the compiled binary try { - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); auto kernel1 = Kernel(program, "Xnrm2"); auto kernel2 = Kernel(program, "Xnrm2Epilogue"); diff --git a/src/routines/level1/xscal.cc b/src/routines/level1/xscal.cc index 8078c076..22d2cb5b 100644 --- a/src/routines/level1/xscal.cc +++ b/src/routines/level1/xscal.cc @@ -61,7 +61,7 @@ StatusCode Xscal::DoScal(const size_t n, const T alpha, // Retrieves the Xscal kernel from the compiled binary try { - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); auto kernel = Kernel(program, kernel_name); // Sets the kernel arguments diff --git a/src/routines/level1/xswap.cc b/src/routines/level1/xswap.cc index 01184db5..b6996932 100644 --- a/src/routines/level1/xswap.cc +++ b/src/routines/level1/xswap.cc @@ -65,7 +65,7 @@ StatusCode Xswap::DoSwap(const size_t n, // Retrieves the Xswap kernel from the compiled binary try { - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); auto kernel = Kernel(program, kernel_name); // Sets the kernel arguments diff --git a/src/routines/level2/xgemv.cc b/src/routines/level2/xgemv.cc index 07c6ec9d..b997673b 100644 --- a/src/routines/level2/xgemv.cc +++ b/src/routines/level2/xgemv.cc @@ -143,7 +143,7 @@ StatusCode Xgemv::MatVec(const Layout layout, const Transpose a_transpose, // Retrieves the Xgemv kernel from the compiled binary try { - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); auto kernel = Kernel(program, kernel_name); // Sets the kernel arguments diff --git a/src/routines/level2/xger.cc b/src/routines/level2/xger.cc index c69efc23..e2f7397a 100644 --- a/src/routines/level2/xger.cc +++ b/src/routines/level2/xger.cc @@ -71,7 +71,7 @@ StatusCode Xger::DoGer(const Layout layout, // Retrieves the kernel from the compiled binary try { - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); auto kernel = Kernel(program, "Xger"); // Sets the kernel arguments diff --git a/src/routines/level2/xher.cc b/src/routines/level2/xher.cc index ed8763dc..3ee3911a 100644 --- a/src/routines/level2/xher.cc +++ b/src/routines/level2/xher.cc @@ -85,7 +85,7 @@ StatusCode Xher::DoHer(const Layout layout, const Triangle triangle, // Retrieves the kernel from the compiled binary try { - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); auto kernel = Kernel(program, "Xher"); // Sets the kernel arguments diff --git a/src/routines/level2/xher2.cc b/src/routines/level2/xher2.cc index 10b98329..9edc1dd9 100644 --- a/src/routines/level2/xher2.cc +++ b/src/routines/level2/xher2.cc @@ -73,7 +73,7 @@ StatusCode Xher2::DoHer2(const Layout layout, const Triangle triangle, // Retrieves the kernel from the compiled binary try { - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); auto kernel = Kernel(program, "Xher2"); // Sets the kernel arguments diff --git a/src/routines/level3/xgemm.cc b/src/routines/level3/xgemm.cc index eced53ab..a602e550 100644 --- a/src/routines/level3/xgemm.cc +++ b/src/routines/level3/xgemm.cc @@ -112,7 +112,7 @@ StatusCode Xgemm::DoGemm(const Layout layout, try { // Loads the program from the database - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); // Determines whether or not temporary matrices are needed auto a_no_temp = a_one == m_ceiled && a_two == k_ceiled && a_ld == m_ceiled && a_offset == 0 && diff --git a/src/routines/level3/xhemm.cc b/src/routines/level3/xhemm.cc index 9791d7b4..8b2c971d 100644 --- a/src/routines/level3/xhemm.cc +++ b/src/routines/level3/xhemm.cc @@ -61,7 +61,7 @@ StatusCode Xhemm::DoHemm(const Layout layout, const Side side, const Triangle // Creates a general matrix from the hermitian matrix to be able to run the regular Xgemm // routine afterwards try { - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); auto kernel = Kernel(program, kernel_name); // Sets the arguments for the hermitian-to-squared kernel diff --git a/src/routines/level3/xher2k.cc b/src/routines/level3/xher2k.cc index 43f7bb76..8fc70abd 100644 --- a/src/routines/level3/xher2k.cc +++ b/src/routines/level3/xher2k.cc @@ -94,7 +94,7 @@ StatusCode Xher2k::DoHer2k(const Layout layout, const Triangle triangle, co try { // Loads the program from the database - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); // Determines whether or not temporary matrices are needed auto a1_no_temp = ab_one == n_ceiled && ab_two == k_ceiled && a_ld == n_ceiled && a_offset == 0 && diff --git a/src/routines/level3/xherk.cc b/src/routines/level3/xherk.cc index 8ebcbfa8..af0e32ba 100644 --- a/src/routines/level3/xherk.cc +++ b/src/routines/level3/xherk.cc @@ -91,7 +91,7 @@ StatusCode Xherk::DoHerk(const Layout layout, const Triangle triangle, cons try { // Loads the program from the database - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); // Determines whether or not temporary matrices are needed auto a_no_temp = a_one == n_ceiled && a_two == k_ceiled && a_ld == n_ceiled && a_offset == 0 && diff --git a/src/routines/level3/xsymm.cc b/src/routines/level3/xsymm.cc index 650afbfc..cbacbb71 100644 --- a/src/routines/level3/xsymm.cc +++ b/src/routines/level3/xsymm.cc @@ -61,7 +61,7 @@ StatusCode Xsymm::DoSymm(const Layout layout, const Side side, const Triangle // Creates a general matrix from the symmetric matrix to be able to run the regular Xgemm // routine afterwards try { - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); auto kernel = Kernel(program, kernel_name); // Sets the arguments for the symmetric-to-squared kernel diff --git a/src/routines/level3/xsyr2k.cc b/src/routines/level3/xsyr2k.cc index 4b436381..88bb5387 100644 --- a/src/routines/level3/xsyr2k.cc +++ b/src/routines/level3/xsyr2k.cc @@ -93,7 +93,7 @@ StatusCode Xsyr2k::DoSyr2k(const Layout layout, const Triangle triangle, cons try { // Loads the program from the database - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); // Determines whether or not temporary matrices are needed auto a_no_temp = ab_one == n_ceiled && ab_two == k_ceiled && a_ld == n_ceiled && a_offset == 0 && diff --git a/src/routines/level3/xsyrk.cc b/src/routines/level3/xsyrk.cc index 5c49795b..88623ad4 100644 --- a/src/routines/level3/xsyrk.cc +++ b/src/routines/level3/xsyrk.cc @@ -89,7 +89,7 @@ StatusCode Xsyrk::DoSyrk(const Layout layout, const Triangle triangle, const try { // Loads the program from the database - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); // Determines whether or not temporary matrices are needed auto a_no_temp = a_one == n_ceiled && a_two == k_ceiled && a_ld == n_ceiled && a_offset == 0 && diff --git a/src/routines/level3/xtrmm.cc b/src/routines/level3/xtrmm.cc index 98e0622d..b756d187 100644 --- a/src/routines/level3/xtrmm.cc +++ b/src/routines/level3/xtrmm.cc @@ -63,7 +63,7 @@ StatusCode Xtrmm::DoTrmm(const Layout layout, const Side side, const Triangle // Creates a general matrix from the triangular matrix to be able to run the regular Xgemm // routine afterwards try { - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); auto kernel = Kernel(program, kernel_name); // Sets the arguments for the triangular-to-squared kernel diff --git a/src/routines/levelx/xomatcopy.cc b/src/routines/levelx/xomatcopy.cc index 199a4903..80683b7a 100644 --- a/src/routines/levelx/xomatcopy.cc +++ b/src/routines/levelx/xomatcopy.cc @@ -78,7 +78,7 @@ StatusCode Xomatcopy::DoOmatcopy(const Layout layout, const Transpose a_trans if (ErrorIn(status)) { return status; } // Loads the program from the database - const auto program = GetProgramFromCache(); + const auto program = GetProgramFromCache(context_, precision_, routine_name_); auto emptyEventList = std::vector(); status = PadCopyTransposeMatrix(queue_, device_, context_, db_, event_, emptyEventList, From f9947b4d7ffedcf98cdb128de835422f647e7f15 Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Fri, 17 Jun 2016 14:30:37 +0200 Subject: [PATCH 5/9] Removed the precision argument from the routines in favor of a single templated function --- include/internal/routines/level1/xamax.h | 4 ---- include/internal/routines/level1/xasum.h | 4 ---- include/internal/routines/level1/xaxpy.h | 4 ---- include/internal/routines/level1/xcopy.h | 4 ---- include/internal/routines/level1/xdot.h | 4 ---- include/internal/routines/level1/xnrm2.h | 4 ---- include/internal/routines/level1/xscal.h | 4 ---- include/internal/routines/level1/xswap.h | 4 ---- include/internal/routines/level2/xgemv.h | 4 ---- include/internal/routines/level2/xger.h | 4 ---- include/internal/routines/level2/xher.h | 4 ---- include/internal/routines/level2/xher2.h | 4 ---- include/internal/routines/level3/xher2k.h | 4 ---- include/internal/routines/level3/xherk.h | 4 ---- include/internal/routines/level3/xsyr2k.h | 4 ---- include/internal/routines/level3/xsyrk.h | 4 ---- include/internal/routines/levelx/xomatcopy.h | 4 ---- include/internal/utilities.h | 4 ++++ src/routines/level1/xamax.cc | 13 ++----------- src/routines/level1/xasum.cc | 13 ++----------- src/routines/level1/xaxpy.cc | 13 ++----------- src/routines/level1/xcopy.cc | 13 ++----------- src/routines/level1/xdot.cc | 13 ++----------- src/routines/level1/xnrm2.cc | 13 ++----------- src/routines/level1/xscal.cc | 13 ++----------- src/routines/level1/xswap.cc | 13 ++----------- src/routines/level2/xgemv.cc | 13 ++----------- src/routines/level2/xger.cc | 13 ++----------- src/routines/level2/xher.cc | 13 ++----------- src/routines/level2/xher2.cc | 13 ++----------- src/routines/level3/xgemm.cc | 13 ++----------- src/routines/level3/xhemm.cc | 2 +- src/routines/level3/xher2k.cc | 10 ++-------- src/routines/level3/xherk.cc | 10 ++-------- src/routines/level3/xsymm.cc | 2 +- src/routines/level3/xsyr2k.cc | 13 ++----------- src/routines/level3/xsyrk.cc | 13 ++----------- src/routines/level3/xtrmm.cc | 2 +- src/routines/levelx/xomatcopy.cc | 13 ++----------- src/utilities.cc | 7 +++++++ 40 files changed, 50 insertions(+), 263 deletions(-) diff --git a/include/internal/routines/level1/xamax.h b/include/internal/routines/level1/xamax.h index ec1de346..8b80044e 100644 --- a/include/internal/routines/level1/xamax.h +++ b/include/internal/routines/level1/xamax.h @@ -40,10 +40,6 @@ class Xamax: public Routine { StatusCode DoAmax(const size_t n, const Buffer &imax_buffer, const size_t imax_offset, const Buffer &x_buffer, const size_t x_offset, const size_t x_inc); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level1/xasum.h b/include/internal/routines/level1/xasum.h index b6c8e4e6..fe8529e3 100644 --- a/include/internal/routines/level1/xasum.h +++ b/include/internal/routines/level1/xasum.h @@ -40,10 +40,6 @@ class Xasum: public Routine { StatusCode DoAsum(const size_t n, const Buffer &asum_buffer, const size_t asum_offset, const Buffer &x_buffer, const size_t x_offset, const size_t x_inc); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level1/xaxpy.h b/include/internal/routines/level1/xaxpy.h index 71e7c01c..af48086a 100644 --- a/include/internal/routines/level1/xaxpy.h +++ b/include/internal/routines/level1/xaxpy.h @@ -40,10 +40,6 @@ class Xaxpy: public Routine { StatusCode DoAxpy(const size_t n, const T alpha, const Buffer &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer &y_buffer, const size_t y_offset, const size_t y_inc); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level1/xcopy.h b/include/internal/routines/level1/xcopy.h index de9edaaf..eb245192 100644 --- a/include/internal/routines/level1/xcopy.h +++ b/include/internal/routines/level1/xcopy.h @@ -40,10 +40,6 @@ class Xcopy: public Routine { StatusCode DoCopy(const size_t n, const Buffer &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer &y_buffer, const size_t y_offset, const size_t y_inc); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level1/xdot.h b/include/internal/routines/level1/xdot.h index b70ff3fe..ce26d267 100644 --- a/include/internal/routines/level1/xdot.h +++ b/include/internal/routines/level1/xdot.h @@ -42,10 +42,6 @@ class Xdot: public Routine { const Buffer &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer &y_buffer, const size_t y_offset, const size_t y_inc, const bool do_conjugate = false); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level1/xnrm2.h b/include/internal/routines/level1/xnrm2.h index 1cb22728..5186acc5 100644 --- a/include/internal/routines/level1/xnrm2.h +++ b/include/internal/routines/level1/xnrm2.h @@ -40,10 +40,6 @@ class Xnrm2: public Routine { StatusCode DoNrm2(const size_t n, const Buffer &nrm2_buffer, const size_t nrm2_offset, const Buffer &x_buffer, const size_t x_offset, const size_t x_inc); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level1/xscal.h b/include/internal/routines/level1/xscal.h index c2b2c1bf..6c82dd89 100644 --- a/include/internal/routines/level1/xscal.h +++ b/include/internal/routines/level1/xscal.h @@ -39,10 +39,6 @@ class Xscal: public Routine { // Templated-precision implementation of the routine StatusCode DoScal(const size_t n, const T alpha, const Buffer &x_buffer, const size_t x_offset, const size_t x_inc); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level1/xswap.h b/include/internal/routines/level1/xswap.h index 45e34dd6..6a568377 100644 --- a/include/internal/routines/level1/xswap.h +++ b/include/internal/routines/level1/xswap.h @@ -40,10 +40,6 @@ class Xswap: public Routine { StatusCode DoSwap(const size_t n, const Buffer &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer &y_buffer, const size_t y_offset, const size_t y_inc); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level2/xgemv.h b/include/internal/routines/level2/xgemv.h index b28536bd..b1277079 100644 --- a/include/internal/routines/level2/xgemv.h +++ b/include/internal/routines/level2/xgemv.h @@ -56,10 +56,6 @@ class Xgemv: public Routine { bool fast_kernel, bool fast_kernel_rot, const size_t parameter, const bool packed, const size_t kl, const size_t ku); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level2/xger.h b/include/internal/routines/level2/xger.h index 996e0fc8..aab5075d 100644 --- a/include/internal/routines/level2/xger.h +++ b/include/internal/routines/level2/xger.h @@ -43,10 +43,6 @@ class Xger: public Routine { const Buffer &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer &y_buffer, const size_t y_offset, const size_t y_inc, const Buffer &a_buffer, const size_t a_offset, const size_t a_ld); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level2/xher.h b/include/internal/routines/level2/xher.h index a4a25c3c..97ccfde7 100644 --- a/include/internal/routines/level2/xher.h +++ b/include/internal/routines/level2/xher.h @@ -46,10 +46,6 @@ class Xher: public Routine { const Buffer &x_buffer, const size_t x_offset, const size_t x_inc, const Buffer &a_buffer, const size_t a_offset, const size_t a_ld, const bool packed = false); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level2/xher2.h b/include/internal/routines/level2/xher2.h index de8583f4..067f85e6 100644 --- a/include/internal/routines/level2/xher2.h +++ b/include/internal/routines/level2/xher2.h @@ -44,10 +44,6 @@ class Xher2: public Routine { const Buffer &y_buffer, const size_t y_offset, const size_t y_inc, const Buffer &a_buffer, const size_t a_offset, const size_t a_ld, const bool packed = false); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level3/xher2k.h b/include/internal/routines/level3/xher2k.h index 092d7246..dfeb737e 100644 --- a/include/internal/routines/level3/xher2k.h +++ b/include/internal/routines/level3/xher2k.h @@ -46,10 +46,6 @@ class Xher2k: public Routine { const Buffer &b_buffer, const size_t b_offset, const size_t b_ld, const U beta, const Buffer &c_buffer, const size_t c_offset, const size_t c_ld); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level3/xherk.h b/include/internal/routines/level3/xherk.h index b5e2d723..7ea59579 100644 --- a/include/internal/routines/level3/xherk.h +++ b/include/internal/routines/level3/xherk.h @@ -45,10 +45,6 @@ class Xherk: public Routine { const Buffer &a_buffer, const size_t a_offset, const size_t a_ld, const U beta, const Buffer &c_buffer, const size_t c_offset, const size_t c_ld); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level3/xsyr2k.h b/include/internal/routines/level3/xsyr2k.h index c7ae1678..aefd016d 100644 --- a/include/internal/routines/level3/xsyr2k.h +++ b/include/internal/routines/level3/xsyr2k.h @@ -46,10 +46,6 @@ class Xsyr2k: public Routine { const Buffer &b_buffer, const size_t b_offset, const size_t b_ld, const T beta, const Buffer &c_buffer, const size_t c_offset, const size_t c_ld); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/level3/xsyrk.h b/include/internal/routines/level3/xsyrk.h index 860f8e10..75726496 100644 --- a/include/internal/routines/level3/xsyrk.h +++ b/include/internal/routines/level3/xsyrk.h @@ -47,10 +47,6 @@ class Xsyrk: public Routine { const Buffer &a_buffer, const size_t a_offset, const size_t a_ld, const T beta, const Buffer &c_buffer, const size_t c_offset, const size_t c_ld); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/routines/levelx/xomatcopy.h b/include/internal/routines/levelx/xomatcopy.h index 29f33aac..e5c0529f 100644 --- a/include/internal/routines/levelx/xomatcopy.h +++ b/include/internal/routines/levelx/xomatcopy.h @@ -41,10 +41,6 @@ class Xomatcopy: public Routine { const size_t m, const size_t n, const T alpha, const Buffer &a_buffer, const size_t a_offset, const size_t a_ld, const Buffer &b_buffer, const size_t b_offset, const size_t b_ld); - - private: - // Static variable to get the precision - const static Precision precision_; }; // ================================================================================================= diff --git a/include/internal/utilities.h b/include/internal/utilities.h index 26145528..7092bcdd 100644 --- a/include/internal/utilities.h +++ b/include/internal/utilities.h @@ -240,6 +240,10 @@ bool IsMultiple(const size_t a, const size_t b); // Convert the precision enum into bytes, e.g. a double takes up 8 bytes size_t GetBytes(const Precision precision); +// Convert the template argument into a precision value +template +Precision PrecisionValue(); + // ================================================================================================= // Returns false is this precision is not supported by the device diff --git a/src/routines/level1/xamax.cc b/src/routines/level1/xamax.cc index 9e203d03..1a3441ef 100644 --- a/src/routines/level1/xamax.cc +++ b/src/routines/level1/xamax.cc @@ -19,19 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xamax::precision_ = Precision::kHalf; -template <> const Precision Xamax::precision_ = Precision::kSingle; -template <> const Precision Xamax::precision_ = Precision::kDouble; -template <> const Precision Xamax::precision_ = Precision::kComplexSingle; -template <> const Precision Xamax::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xamax::Xamax(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xdot"}, precision_) { + Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/xamax.opencl" ; @@ -56,7 +47,7 @@ StatusCode Xamax::DoAmax(const size_t n, // Retrieves the Xamax kernels from the compiled binary try { - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); auto kernel1 = Kernel(program, "Xamax"); auto kernel2 = Kernel(program, "XamaxEpilogue"); diff --git a/src/routines/level1/xasum.cc b/src/routines/level1/xasum.cc index f4d898be..85c6e1ed 100644 --- a/src/routines/level1/xasum.cc +++ b/src/routines/level1/xasum.cc @@ -19,19 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xasum::precision_ = Precision::kHalf; -template <> const Precision Xasum::precision_ = Precision::kSingle; -template <> const Precision Xasum::precision_ = Precision::kDouble; -template <> const Precision Xasum::precision_ = Precision::kComplexSingle; -template <> const Precision Xasum::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xasum::Xasum(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xdot"}, precision_) { + Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/xasum.opencl" ; @@ -56,7 +47,7 @@ StatusCode Xasum::DoAsum(const size_t n, // Retrieves the Xasum kernels from the compiled binary try { - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); auto kernel1 = Kernel(program, "Xasum"); auto kernel2 = Kernel(program, "XasumEpilogue"); diff --git a/src/routines/level1/xaxpy.cc b/src/routines/level1/xaxpy.cc index 221e1195..39121067 100644 --- a/src/routines/level1/xaxpy.cc +++ b/src/routines/level1/xaxpy.cc @@ -19,19 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xaxpy::precision_ = Precision::kHalf; -template <> const Precision Xaxpy::precision_ = Precision::kSingle; -template <> const Precision Xaxpy::precision_ = Precision::kDouble; -template <> const Precision Xaxpy::precision_ = Precision::kComplexSingle; -template <> const Precision Xaxpy::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xaxpy::Xaxpy(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xaxpy"}, precision_) { + Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/level1.opencl" #include "../../kernels/level1/xaxpy.opencl" @@ -65,7 +56,7 @@ StatusCode Xaxpy::DoAxpy(const size_t n, const T alpha, // Retrieves the Xaxpy kernel from the compiled binary try { - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); auto kernel = Kernel(program, kernel_name); // Upload the scalar argument as a constant buffer to the device (needed for half-precision) diff --git a/src/routines/level1/xcopy.cc b/src/routines/level1/xcopy.cc index 647a681a..d85efca3 100644 --- a/src/routines/level1/xcopy.cc +++ b/src/routines/level1/xcopy.cc @@ -19,19 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xcopy::precision_ = Precision::kHalf; -template <> const Precision Xcopy::precision_ = Precision::kSingle; -template <> const Precision Xcopy::precision_ = Precision::kDouble; -template <> const Precision Xcopy::precision_ = Precision::kComplexSingle; -template <> const Precision Xcopy::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xcopy::Xcopy(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xaxpy"}, precision_) { + Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/level1.opencl" #include "../../kernels/level1/xcopy.opencl" @@ -65,7 +56,7 @@ StatusCode Xcopy::DoCopy(const size_t n, // Retrieves the Xcopy kernel from the compiled binary try { - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); auto kernel = Kernel(program, kernel_name); // Sets the kernel arguments diff --git a/src/routines/level1/xdot.cc b/src/routines/level1/xdot.cc index eac64d13..e3a6b1f0 100644 --- a/src/routines/level1/xdot.cc +++ b/src/routines/level1/xdot.cc @@ -19,19 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xdot::precision_ = Precision::kHalf; -template <> const Precision Xdot::precision_ = Precision::kSingle; -template <> const Precision Xdot::precision_ = Precision::kDouble; -template <> const Precision Xdot::precision_ = Precision::kComplexSingle; -template <> const Precision Xdot::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xdot::Xdot(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xdot"}, precision_) { + Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/xdot.opencl" ; @@ -60,7 +51,7 @@ StatusCode Xdot::DoDot(const size_t n, // Retrieves the Xdot kernels from the compiled binary try { - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); auto kernel1 = Kernel(program, "Xdot"); auto kernel2 = Kernel(program, "XdotEpilogue"); diff --git a/src/routines/level1/xnrm2.cc b/src/routines/level1/xnrm2.cc index 23055aac..1730e144 100644 --- a/src/routines/level1/xnrm2.cc +++ b/src/routines/level1/xnrm2.cc @@ -19,19 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xnrm2::precision_ = Precision::kHalf; -template <> const Precision Xnrm2::precision_ = Precision::kSingle; -template <> const Precision Xnrm2::precision_ = Precision::kDouble; -template <> const Precision Xnrm2::precision_ = Precision::kComplexSingle; -template <> const Precision Xnrm2::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xnrm2::Xnrm2(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xdot"}, precision_) { + Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/xnrm2.opencl" ; @@ -56,7 +47,7 @@ StatusCode Xnrm2::DoNrm2(const size_t n, // Retrieves the Xnrm2 kernels from the compiled binary try { - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); auto kernel1 = Kernel(program, "Xnrm2"); auto kernel2 = Kernel(program, "Xnrm2Epilogue"); diff --git a/src/routines/level1/xscal.cc b/src/routines/level1/xscal.cc index 22d2cb5b..4792d40b 100644 --- a/src/routines/level1/xscal.cc +++ b/src/routines/level1/xscal.cc @@ -19,19 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xscal::precision_ = Precision::kHalf; -template <> const Precision Xscal::precision_ = Precision::kSingle; -template <> const Precision Xscal::precision_ = Precision::kDouble; -template <> const Precision Xscal::precision_ = Precision::kComplexSingle; -template <> const Precision Xscal::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xscal::Xscal(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xaxpy"}, precision_) { + Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/level1.opencl" #include "../../kernels/level1/xscal.opencl" @@ -61,7 +52,7 @@ StatusCode Xscal::DoScal(const size_t n, const T alpha, // Retrieves the Xscal kernel from the compiled binary try { - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); auto kernel = Kernel(program, kernel_name); // Sets the kernel arguments diff --git a/src/routines/level1/xswap.cc b/src/routines/level1/xswap.cc index b6996932..897515fb 100644 --- a/src/routines/level1/xswap.cc +++ b/src/routines/level1/xswap.cc @@ -19,19 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xswap::precision_ = Precision::kHalf; -template <> const Precision Xswap::precision_ = Precision::kSingle; -template <> const Precision Xswap::precision_ = Precision::kDouble; -template <> const Precision Xswap::precision_ = Precision::kComplexSingle; -template <> const Precision Xswap::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xswap::Xswap(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xaxpy"}, precision_) { + Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/level1.opencl" #include "../../kernels/level1/xswap.opencl" @@ -65,7 +56,7 @@ StatusCode Xswap::DoSwap(const size_t n, // Retrieves the Xswap kernel from the compiled binary try { - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); auto kernel = Kernel(program, kernel_name); // Sets the kernel arguments diff --git a/src/routines/level2/xgemv.cc b/src/routines/level2/xgemv.cc index b997673b..ea3b245d 100644 --- a/src/routines/level2/xgemv.cc +++ b/src/routines/level2/xgemv.cc @@ -19,19 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xgemv::precision_ = Precision::kHalf; -template <> const Precision Xgemv::precision_ = Precision::kSingle; -template <> const Precision Xgemv::precision_ = Precision::kDouble; -template <> const Precision Xgemv::precision_ = Precision::kComplexSingle; -template <> const Precision Xgemv::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xgemv::Xgemv(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Pad", "Xgemv"}, precision_) { + Routine(queue, event, name, {"Pad", "Xgemv"}, PrecisionValue()) { source_string_ = #include "../../kernels/level2/xgemv.opencl" #include "../../kernels/level2/xgemv_fast.opencl" @@ -143,7 +134,7 @@ StatusCode Xgemv::MatVec(const Layout layout, const Transpose a_transpose, // Retrieves the Xgemv kernel from the compiled binary try { - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); auto kernel = Kernel(program, kernel_name); // Sets the kernel arguments diff --git a/src/routines/level2/xger.cc b/src/routines/level2/xger.cc index e2f7397a..e487d41b 100644 --- a/src/routines/level2/xger.cc +++ b/src/routines/level2/xger.cc @@ -19,19 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xger::precision_ = Precision::kHalf; -template <> const Precision Xger::precision_ = Precision::kSingle; -template <> const Precision Xger::precision_ = Precision::kDouble; -template <> const Precision Xger::precision_ = Precision::kComplexSingle; -template <> const Precision Xger::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xger::Xger(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xger"}, precision_) { + Routine(queue, event, name, {"Xger"}, PrecisionValue()) { source_string_ = #include "../../kernels/level2/level2.opencl" #include "../../kernels/level2/xger.opencl" @@ -71,7 +62,7 @@ StatusCode Xger::DoGer(const Layout layout, // Retrieves the kernel from the compiled binary try { - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); auto kernel = Kernel(program, "Xger"); // Sets the kernel arguments diff --git a/src/routines/level2/xher.cc b/src/routines/level2/xher.cc index 3ee3911a..08ff5a2e 100644 --- a/src/routines/level2/xher.cc +++ b/src/routines/level2/xher.cc @@ -18,19 +18,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xher::precision_ = Precision::kHalf; -template <> const Precision Xher::precision_ = Precision::kSingle; -template <> const Precision Xher::precision_ = Precision::kDouble; -template <> const Precision Xher::precision_ = Precision::kComplexSingle; -template <> const Precision Xher::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xher::Xher(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xger"}, precision_) { + Routine(queue, event, name, {"Xger"}, PrecisionValue()) { source_string_ = #include "../../kernels/level2/level2.opencl" #include "../../kernels/level2/xher.opencl" @@ -85,7 +76,7 @@ StatusCode Xher::DoHer(const Layout layout, const Triangle triangle, // Retrieves the kernel from the compiled binary try { - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); auto kernel = Kernel(program, "Xher"); // Sets the kernel arguments diff --git a/src/routines/level2/xher2.cc b/src/routines/level2/xher2.cc index 9edc1dd9..d5d4323b 100644 --- a/src/routines/level2/xher2.cc +++ b/src/routines/level2/xher2.cc @@ -18,19 +18,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xher2::precision_ = Precision::kHalf; -template <> const Precision Xher2::precision_ = Precision::kSingle; -template <> const Precision Xher2::precision_ = Precision::kDouble; -template <> const Precision Xher2::precision_ = Precision::kComplexSingle; -template <> const Precision Xher2::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xher2::Xher2(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xger"}, precision_) { + Routine(queue, event, name, {"Xger"}, PrecisionValue()) { source_string_ = #include "../../kernels/level2/level2.opencl" #include "../../kernels/level2/xher2.opencl" @@ -73,7 +64,7 @@ StatusCode Xher2::DoHer2(const Layout layout, const Triangle triangle, // Retrieves the kernel from the compiled binary try { - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); auto kernel = Kernel(program, "Xher2"); // Sets the kernel arguments diff --git a/src/routines/level3/xgemm.cc b/src/routines/level3/xgemm.cc index a602e550..7d06c2a2 100644 --- a/src/routines/level3/xgemm.cc +++ b/src/routines/level3/xgemm.cc @@ -19,19 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xgemm::precision_ = Precision::kHalf; -template <> const Precision Xgemm::precision_ = Precision::kSingle; -template <> const Precision Xgemm::precision_ = Precision::kDouble; -template <> const Precision Xgemm::precision_ = Precision::kComplexSingle; -template <> const Precision Xgemm::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xgemm::Xgemm(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, precision_) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" @@ -112,7 +103,7 @@ StatusCode Xgemm::DoGemm(const Layout layout, try { // Loads the program from the database - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); // Determines whether or not temporary matrices are needed auto a_no_temp = a_one == m_ceiled && a_two == k_ceiled && a_ld == m_ceiled && a_offset == 0 && diff --git a/src/routines/level3/xhemm.cc b/src/routines/level3/xhemm.cc index 8b2c971d..8120c09c 100644 --- a/src/routines/level3/xhemm.cc +++ b/src/routines/level3/xhemm.cc @@ -61,7 +61,7 @@ StatusCode Xhemm::DoHemm(const Layout layout, const Side side, const Triangle // Creates a general matrix from the hermitian matrix to be able to run the regular Xgemm // routine afterwards try { - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); auto kernel = Kernel(program, kernel_name); // Sets the arguments for the hermitian-to-squared kernel diff --git a/src/routines/level3/xher2k.cc b/src/routines/level3/xher2k.cc index 8fc70abd..0e5178df 100644 --- a/src/routines/level3/xher2k.cc +++ b/src/routines/level3/xher2k.cc @@ -19,16 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xher2k::precision_ = Precision::kComplexSingle; -template <> const Precision Xher2k::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xher2k::Xher2k(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, precision_) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" @@ -94,7 +88,7 @@ StatusCode Xher2k::DoHer2k(const Layout layout, const Triangle triangle, co try { // Loads the program from the database - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); // Determines whether or not temporary matrices are needed auto a1_no_temp = ab_one == n_ceiled && ab_two == k_ceiled && a_ld == n_ceiled && a_offset == 0 && diff --git a/src/routines/level3/xherk.cc b/src/routines/level3/xherk.cc index af0e32ba..f8ec217a 100644 --- a/src/routines/level3/xherk.cc +++ b/src/routines/level3/xherk.cc @@ -19,16 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xherk::precision_ = Precision::kComplexSingle; -template <> const Precision Xherk::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xherk::Xherk(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, precision_) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" @@ -91,7 +85,7 @@ StatusCode Xherk::DoHerk(const Layout layout, const Triangle triangle, cons try { // Loads the program from the database - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); // Determines whether or not temporary matrices are needed auto a_no_temp = a_one == n_ceiled && a_two == k_ceiled && a_ld == n_ceiled && a_offset == 0 && diff --git a/src/routines/level3/xsymm.cc b/src/routines/level3/xsymm.cc index cbacbb71..c5e56617 100644 --- a/src/routines/level3/xsymm.cc +++ b/src/routines/level3/xsymm.cc @@ -61,7 +61,7 @@ StatusCode Xsymm::DoSymm(const Layout layout, const Side side, const Triangle // Creates a general matrix from the symmetric matrix to be able to run the regular Xgemm // routine afterwards try { - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); auto kernel = Kernel(program, kernel_name); // Sets the arguments for the symmetric-to-squared kernel diff --git a/src/routines/level3/xsyr2k.cc b/src/routines/level3/xsyr2k.cc index 88bb5387..b517520c 100644 --- a/src/routines/level3/xsyr2k.cc +++ b/src/routines/level3/xsyr2k.cc @@ -19,19 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xsyr2k::precision_ = Precision::kHalf; -template <> const Precision Xsyr2k::precision_ = Precision::kSingle; -template <> const Precision Xsyr2k::precision_ = Precision::kDouble; -template <> const Precision Xsyr2k::precision_ = Precision::kComplexSingle; -template <> const Precision Xsyr2k::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xsyr2k::Xsyr2k(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, precision_) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" @@ -93,7 +84,7 @@ StatusCode Xsyr2k::DoSyr2k(const Layout layout, const Triangle triangle, cons try { // Loads the program from the database - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); // Determines whether or not temporary matrices are needed auto a_no_temp = ab_one == n_ceiled && ab_two == k_ceiled && a_ld == n_ceiled && a_offset == 0 && diff --git a/src/routines/level3/xsyrk.cc b/src/routines/level3/xsyrk.cc index 88623ad4..ccf8710c 100644 --- a/src/routines/level3/xsyrk.cc +++ b/src/routines/level3/xsyrk.cc @@ -19,19 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xsyrk::precision_ = Precision::kHalf; -template <> const Precision Xsyrk::precision_ = Precision::kSingle; -template <> const Precision Xsyrk::precision_ = Precision::kDouble; -template <> const Precision Xsyrk::precision_ = Precision::kComplexSingle; -template <> const Precision Xsyrk::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xsyrk::Xsyrk(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, precision_) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" @@ -89,7 +80,7 @@ StatusCode Xsyrk::DoSyrk(const Layout layout, const Triangle triangle, const try { // Loads the program from the database - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); // Determines whether or not temporary matrices are needed auto a_no_temp = a_one == n_ceiled && a_two == k_ceiled && a_ld == n_ceiled && a_offset == 0 && diff --git a/src/routines/level3/xtrmm.cc b/src/routines/level3/xtrmm.cc index b756d187..92dda9fb 100644 --- a/src/routines/level3/xtrmm.cc +++ b/src/routines/level3/xtrmm.cc @@ -63,7 +63,7 @@ StatusCode Xtrmm::DoTrmm(const Layout layout, const Side side, const Triangle // Creates a general matrix from the triangular matrix to be able to run the regular Xgemm // routine afterwards try { - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); auto kernel = Kernel(program, kernel_name); // Sets the arguments for the triangular-to-squared kernel diff --git a/src/routines/levelx/xomatcopy.cc b/src/routines/levelx/xomatcopy.cc index 80683b7a..c724b56b 100644 --- a/src/routines/levelx/xomatcopy.cc +++ b/src/routines/levelx/xomatcopy.cc @@ -19,19 +19,10 @@ namespace clblast { // ================================================================================================= -// Specific implementations to get the memory-type based on a template argument -template <> const Precision Xomatcopy::precision_ = Precision::kHalf; -template <> const Precision Xomatcopy::precision_ = Precision::kSingle; -template <> const Precision Xomatcopy::precision_ = Precision::kDouble; -template <> const Precision Xomatcopy::precision_ = Precision::kComplexSingle; -template <> const Precision Xomatcopy::precision_ = Precision::kComplexDouble; - -// ================================================================================================= - // Constructor: forwards to base class constructor template Xomatcopy::Xomatcopy(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose"}, precision_) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" @@ -78,7 +69,7 @@ StatusCode Xomatcopy::DoOmatcopy(const Layout layout, const Transpose a_trans if (ErrorIn(status)) { return status; } // Loads the program from the database - const auto program = GetProgramFromCache(context_, precision_, routine_name_); + const auto program = GetProgramFromCache(context_, PrecisionValue(), routine_name_); auto emptyEventList = std::vector(); status = PadCopyTransposeMatrix(queue_, device_, context_, db_, event_, emptyEventList, diff --git a/src/utilities.cc b/src/utilities.cc index 851e6d9f..30b09a5f 100644 --- a/src/utilities.cc +++ b/src/utilities.cc @@ -360,6 +360,13 @@ size_t GetBytes(const Precision precision) { } } +// Convert the template argument into a precision value +template <> Precision PrecisionValue() { return Precision::kHalf; } +template <> Precision PrecisionValue() { return Precision::kSingle; } +template <> Precision PrecisionValue() { return Precision::kDouble; } +template <> Precision PrecisionValue() { return Precision::kComplexSingle; } +template <> Precision PrecisionValue() { return Precision::kComplexDouble; } + // ================================================================================================= // Returns false is this precision is not supported by the device From 7b4c0e1cf03a94077c20f7f12ef15fb8717c74ca Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Sat, 18 Jun 2016 14:56:55 +0200 Subject: [PATCH 6/9] Removed the template from the Routine base-class --- include/internal/routine.h | 1 - include/internal/routines/level1/xamax.h | 11 +---------- include/internal/routines/level1/xasum.h | 11 +---------- include/internal/routines/level1/xaxpy.h | 11 +---------- include/internal/routines/level1/xcopy.h | 11 +---------- include/internal/routines/level1/xdot.h | 11 +---------- include/internal/routines/level1/xnrm2.h | 11 +---------- include/internal/routines/level1/xscal.h | 11 +---------- include/internal/routines/level1/xswap.h | 11 +---------- include/internal/routines/level2/xgemv.h | 11 +---------- include/internal/routines/level2/xger.h | 11 +---------- include/internal/routines/level2/xher.h | 11 +---------- include/internal/routines/level2/xher2.h | 11 +---------- include/internal/routines/level2/xtbmv.h | 8 ++------ include/internal/routines/level2/xtpmv.h | 8 ++------ include/internal/routines/level2/xtrmv.h | 8 ++------ include/internal/routines/level3/xgemm.h | 11 +---------- include/internal/routines/level3/xhemm.h | 16 +++++++--------- include/internal/routines/level3/xher2k.h | 11 +---------- include/internal/routines/level3/xherk.h | 11 +---------- include/internal/routines/level3/xsymm.h | 16 +++++++--------- include/internal/routines/level3/xsyr2k.h | 11 +---------- include/internal/routines/level3/xsyrk.h | 11 +---------- include/internal/routines/level3/xtrmm.h | 16 +++++++--------- include/internal/routines/levelx/xomatcopy.h | 11 +---------- src/routine.cc | 17 +++-------------- src/routines/level1/xamax.cc | 2 +- src/routines/level1/xasum.cc | 2 +- src/routines/level1/xaxpy.cc | 2 +- src/routines/level1/xcopy.cc | 2 +- src/routines/level1/xdot.cc | 2 +- src/routines/level1/xnrm2.cc | 2 +- src/routines/level1/xscal.cc | 2 +- src/routines/level1/xswap.cc | 2 +- src/routines/level2/xgemv.cc | 2 +- src/routines/level2/xger.cc | 2 +- src/routines/level2/xher.cc | 2 +- src/routines/level2/xher2.cc | 2 +- src/routines/level3/xgemm.cc | 2 +- src/routines/level3/xher2k.cc | 2 +- src/routines/level3/xherk.cc | 2 +- src/routines/level3/xsyr2k.cc | 2 +- src/routines/level3/xsyrk.cc | 2 +- src/routines/levelx/xomatcopy.cc | 2 +- 44 files changed, 66 insertions(+), 258 deletions(-) diff --git a/include/internal/routine.h b/include/internal/routine.h index c64abc4c..9db4e227 100644 --- a/include/internal/routine.h +++ b/include/internal/routine.h @@ -28,7 +28,6 @@ namespace clblast { // ================================================================================================= // See comment at top of file for a description of the class -template class Routine { public: diff --git a/include/internal/routines/level1/xamax.h b/include/internal/routines/level1/xamax.h index 8b80044e..42f8f67c 100644 --- a/include/internal/routines/level1/xamax.h +++ b/include/internal/routines/level1/xamax.h @@ -21,18 +21,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xamax: public Routine { +class Xamax: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xamax(Queue &queue, EventPointer event, const std::string &name = "AMAX"); diff --git a/include/internal/routines/level1/xasum.h b/include/internal/routines/level1/xasum.h index fe8529e3..9d93a6f4 100644 --- a/include/internal/routines/level1/xasum.h +++ b/include/internal/routines/level1/xasum.h @@ -21,18 +21,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xasum: public Routine { +class Xasum: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xasum(Queue &queue, EventPointer event, const std::string &name = "ASUM"); diff --git a/include/internal/routines/level1/xaxpy.h b/include/internal/routines/level1/xaxpy.h index af48086a..4c8d2c1f 100644 --- a/include/internal/routines/level1/xaxpy.h +++ b/include/internal/routines/level1/xaxpy.h @@ -21,18 +21,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xaxpy: public Routine { +class Xaxpy: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xaxpy(Queue &queue, EventPointer event, const std::string &name = "AXPY"); diff --git a/include/internal/routines/level1/xcopy.h b/include/internal/routines/level1/xcopy.h index eb245192..c7d03dd0 100644 --- a/include/internal/routines/level1/xcopy.h +++ b/include/internal/routines/level1/xcopy.h @@ -21,18 +21,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xcopy: public Routine { +class Xcopy: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xcopy(Queue &queue, EventPointer event, const std::string &name = "COPY"); diff --git a/include/internal/routines/level1/xdot.h b/include/internal/routines/level1/xdot.h index ce26d267..e1968740 100644 --- a/include/internal/routines/level1/xdot.h +++ b/include/internal/routines/level1/xdot.h @@ -21,18 +21,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xdot: public Routine { +class Xdot: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xdot(Queue &queue, EventPointer event, const std::string &name = "DOT"); diff --git a/include/internal/routines/level1/xnrm2.h b/include/internal/routines/level1/xnrm2.h index 5186acc5..ca9268c0 100644 --- a/include/internal/routines/level1/xnrm2.h +++ b/include/internal/routines/level1/xnrm2.h @@ -21,18 +21,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xnrm2: public Routine { +class Xnrm2: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xnrm2(Queue &queue, EventPointer event, const std::string &name = "NRM2"); diff --git a/include/internal/routines/level1/xscal.h b/include/internal/routines/level1/xscal.h index 6c82dd89..b9430f3b 100644 --- a/include/internal/routines/level1/xscal.h +++ b/include/internal/routines/level1/xscal.h @@ -21,18 +21,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xscal: public Routine { +class Xscal: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xscal(Queue &queue, EventPointer event, const std::string &name = "SCAL"); diff --git a/include/internal/routines/level1/xswap.h b/include/internal/routines/level1/xswap.h index 6a568377..bd063afc 100644 --- a/include/internal/routines/level1/xswap.h +++ b/include/internal/routines/level1/xswap.h @@ -21,18 +21,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xswap: public Routine { +class Xswap: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xswap(Queue &queue, EventPointer event, const std::string &name = "SWAP"); diff --git a/include/internal/routines/level2/xgemv.h b/include/internal/routines/level2/xgemv.h index b1277079..e9804c62 100644 --- a/include/internal/routines/level2/xgemv.h +++ b/include/internal/routines/level2/xgemv.h @@ -21,18 +21,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xgemv: public Routine { +class Xgemv: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xgemv(Queue &queue, EventPointer event, const std::string &name = "GEMV"); diff --git a/include/internal/routines/level2/xger.h b/include/internal/routines/level2/xger.h index aab5075d..184f8477 100644 --- a/include/internal/routines/level2/xger.h +++ b/include/internal/routines/level2/xger.h @@ -21,18 +21,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xger: public Routine { +class Xger: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xger(Queue &queue, EventPointer event, const std::string &name = "GER"); diff --git a/include/internal/routines/level2/xher.h b/include/internal/routines/level2/xher.h index 97ccfde7..fca8bb97 100644 --- a/include/internal/routines/level2/xher.h +++ b/include/internal/routines/level2/xher.h @@ -21,18 +21,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xher: public Routine { +class Xher: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xher(Queue &queue, EventPointer event, const std::string &name = "HER"); diff --git a/include/internal/routines/level2/xher2.h b/include/internal/routines/level2/xher2.h index 067f85e6..9a7610f1 100644 --- a/include/internal/routines/level2/xher2.h +++ b/include/internal/routines/level2/xher2.h @@ -21,18 +21,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xher2: public Routine { +class Xher2: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xher2(Queue &queue, EventPointer event, const std::string &name = "HER2"); diff --git a/include/internal/routines/level2/xtbmv.h b/include/internal/routines/level2/xtbmv.h index 3ccdf3f8..493a9853 100644 --- a/include/internal/routines/level2/xtbmv.h +++ b/include/internal/routines/level2/xtbmv.h @@ -25,14 +25,10 @@ namespace clblast { template class Xtbmv: public Xgemv { public: - - // Members from the base class - using Routine::queue_; - using Routine::device_; - using Routine::context_; - using Routine::routine_name_; // Uses the generic matrix-vector routine + using Xgemv::queue_; + using Xgemv::context_; using Xgemv::MatVec; // Constructor diff --git a/include/internal/routines/level2/xtpmv.h b/include/internal/routines/level2/xtpmv.h index 7619197d..ce5cae6f 100644 --- a/include/internal/routines/level2/xtpmv.h +++ b/include/internal/routines/level2/xtpmv.h @@ -25,14 +25,10 @@ namespace clblast { template class Xtpmv: public Xgemv { public: - - // Members from the base class - using Routine::queue_; - using Routine::device_; - using Routine::context_; - using Routine::routine_name_; // Uses the generic matrix-vector routine + using Xgemv::queue_; + using Xgemv::context_; using Xgemv::MatVec; // Constructor diff --git a/include/internal/routines/level2/xtrmv.h b/include/internal/routines/level2/xtrmv.h index 4021b39c..4407bad7 100644 --- a/include/internal/routines/level2/xtrmv.h +++ b/include/internal/routines/level2/xtrmv.h @@ -25,14 +25,10 @@ namespace clblast { template class Xtrmv: public Xgemv { public: - - // Members from the base class - using Routine::queue_; - using Routine::device_; - using Routine::context_; - using Routine::routine_name_; // Uses the generic matrix-vector routine + using Xgemv::queue_; + using Xgemv::context_; using Xgemv::MatVec; // Constructor diff --git a/include/internal/routines/level3/xgemm.h b/include/internal/routines/level3/xgemm.h index 211ae990..c0541eef 100644 --- a/include/internal/routines/level3/xgemm.h +++ b/include/internal/routines/level3/xgemm.h @@ -21,18 +21,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xgemm: public Routine { +class Xgemm: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xgemm(Queue &queue, EventPointer event, const std::string &name = "GEMM"); diff --git a/include/internal/routines/level3/xhemm.h b/include/internal/routines/level3/xhemm.h index a9a422b0..e0f35669 100644 --- a/include/internal/routines/level3/xhemm.h +++ b/include/internal/routines/level3/xhemm.h @@ -25,16 +25,14 @@ template class Xhemm: public Xgemm { public: - // Members and methods from the base class - using Routine::db_; - using Routine::queue_; - using Routine::device_; - using Routine::context_; - using Routine::routine_name_; - - // Uses the regular Xgemm routine - using Xgemm::DoGemm; + // Uses methods and variables the regular Xgemm routine using Xgemm::precision_; + using Xgemm::routine_name_; + using Xgemm::queue_; + using Xgemm::context_; + using Xgemm::device_; + using Xgemm::db_; + using Xgemm::DoGemm; // Constructor Xhemm(Queue &queue, EventPointer event, const std::string &name = "HEMM"); diff --git a/include/internal/routines/level3/xher2k.h b/include/internal/routines/level3/xher2k.h index dfeb737e..b7764e18 100644 --- a/include/internal/routines/level3/xher2k.h +++ b/include/internal/routines/level3/xher2k.h @@ -23,18 +23,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xher2k: public Routine { +class Xher2k: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xher2k(Queue &queue, EventPointer event, const std::string &name = "HER2K"); diff --git a/include/internal/routines/level3/xherk.h b/include/internal/routines/level3/xherk.h index 7ea59579..abcf4c1a 100644 --- a/include/internal/routines/level3/xherk.h +++ b/include/internal/routines/level3/xherk.h @@ -23,18 +23,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xherk: public Routine { +class Xherk: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xherk(Queue &queue, EventPointer event, const std::string &name = "HERK"); diff --git a/include/internal/routines/level3/xsymm.h b/include/internal/routines/level3/xsymm.h index 991284f5..889abfb7 100644 --- a/include/internal/routines/level3/xsymm.h +++ b/include/internal/routines/level3/xsymm.h @@ -27,16 +27,14 @@ template class Xsymm: public Xgemm { public: - // Members and methods from the base class - using Routine::db_; - using Routine::queue_; - using Routine::device_; - using Routine::context_; - using Routine::routine_name_; - - // Uses the regular Xgemm routine - using Xgemm::DoGemm; + // Uses methods and variables the regular Xgemm routine using Xgemm::precision_; + using Xgemm::routine_name_; + using Xgemm::queue_; + using Xgemm::context_; + using Xgemm::device_; + using Xgemm::db_; + using Xgemm::DoGemm; // Constructor Xsymm(Queue &queue, EventPointer event, const std::string &name = "SYMM"); diff --git a/include/internal/routines/level3/xsyr2k.h b/include/internal/routines/level3/xsyr2k.h index aefd016d..f75c91e5 100644 --- a/include/internal/routines/level3/xsyr2k.h +++ b/include/internal/routines/level3/xsyr2k.h @@ -23,18 +23,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xsyr2k: public Routine { +class Xsyr2k: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xsyr2k(Queue &queue, EventPointer event, const std::string &name = "SYR2K"); diff --git a/include/internal/routines/level3/xsyrk.h b/include/internal/routines/level3/xsyrk.h index 75726496..0710fa74 100644 --- a/include/internal/routines/level3/xsyrk.h +++ b/include/internal/routines/level3/xsyrk.h @@ -25,18 +25,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xsyrk: public Routine { +class Xsyrk: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xsyrk(Queue &queue, EventPointer event, const std::string &name = "SYRK"); diff --git a/include/internal/routines/level3/xtrmm.h b/include/internal/routines/level3/xtrmm.h index caf1ca75..e18ad17a 100644 --- a/include/internal/routines/level3/xtrmm.h +++ b/include/internal/routines/level3/xtrmm.h @@ -26,16 +26,14 @@ template class Xtrmm: public Xgemm { public: - // Members and methods from the base class - using Routine::db_; - using Routine::queue_; - using Routine::device_; - using Routine::context_; - using Routine::routine_name_; - - // Uses the regular Xgemm routine - using Xgemm::DoGemm; + // Uses methods and variables the regular Xgemm routine using Xgemm::precision_; + using Xgemm::routine_name_; + using Xgemm::queue_; + using Xgemm::context_; + using Xgemm::device_; + using Xgemm::db_; + using Xgemm::DoGemm; // Constructor Xtrmm(Queue &queue, EventPointer event, const std::string &name = "TRMM"); diff --git a/include/internal/routines/levelx/xomatcopy.h b/include/internal/routines/levelx/xomatcopy.h index e5c0529f..d2acb50d 100644 --- a/include/internal/routines/levelx/xomatcopy.h +++ b/include/internal/routines/levelx/xomatcopy.h @@ -21,18 +21,9 @@ namespace clblast { // See comment at top of file for a description of the class template -class Xomatcopy: public Routine { +class Xomatcopy: public Routine { public: - // Members and methods from the base class - using Routine::db_; - using Routine::source_string_; - using Routine::queue_; - using Routine::device_; - using Routine::event_; - using Routine::context_; - using Routine::routine_name_; - // Constructor Xomatcopy(Queue &queue, EventPointer event, const std::string &name = "OMATCOPY"); diff --git a/src/routine.cc b/src/routine.cc index 1086aead..9b1640b5 100644 --- a/src/routine.cc +++ b/src/routine.cc @@ -20,9 +20,8 @@ namespace clblast { // ================================================================================================= // Constructor: not much here, because no status codes can be returned -template -Routine::Routine(Queue &queue, EventPointer event, const std::string &name, - const std::vector &routines, const Precision precision): +Routine::Routine(Queue &queue, EventPointer event, const std::string &name, + const std::vector &routines, const Precision precision): precision_(precision), routine_name_(name), queue_(queue), @@ -36,8 +35,7 @@ Routine::Routine(Queue &queue, EventPointer event, const std::string &name, // ================================================================================================= // Separate set-up function to allow for status codes to be returned -template -StatusCode Routine::SetUp() { +StatusCode Routine::SetUp() { // Queries the cache to see whether or not the program (context-specific) is already there if (ProgramIsInCache(context_, precision_, routine_name_)) { return StatusCode::kSuccess; } @@ -174,14 +172,5 @@ StatusCode RunKernel(Kernel &kernel, Queue queue, const Device device, return RunKernel(kernel, queue, device, global, local, event, emptyWaitingList); } -// ================================================================================================= - -// Compiles the templated class -template class Routine; -template class Routine; -template class Routine; -template class Routine; -template class Routine; - // ================================================================================================= } // namespace clblast diff --git a/src/routines/level1/xamax.cc b/src/routines/level1/xamax.cc index 1a3441ef..b4add2a3 100644 --- a/src/routines/level1/xamax.cc +++ b/src/routines/level1/xamax.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xamax::Xamax(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { + Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/xamax.opencl" ; diff --git a/src/routines/level1/xasum.cc b/src/routines/level1/xasum.cc index 85c6e1ed..80f04829 100644 --- a/src/routines/level1/xasum.cc +++ b/src/routines/level1/xasum.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xasum::Xasum(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { + Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/xasum.opencl" ; diff --git a/src/routines/level1/xaxpy.cc b/src/routines/level1/xaxpy.cc index 39121067..4a548757 100644 --- a/src/routines/level1/xaxpy.cc +++ b/src/routines/level1/xaxpy.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xaxpy::Xaxpy(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { + Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/level1.opencl" #include "../../kernels/level1/xaxpy.opencl" diff --git a/src/routines/level1/xcopy.cc b/src/routines/level1/xcopy.cc index d85efca3..92d31786 100644 --- a/src/routines/level1/xcopy.cc +++ b/src/routines/level1/xcopy.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xcopy::Xcopy(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { + Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/level1.opencl" #include "../../kernels/level1/xcopy.opencl" diff --git a/src/routines/level1/xdot.cc b/src/routines/level1/xdot.cc index e3a6b1f0..8709c541 100644 --- a/src/routines/level1/xdot.cc +++ b/src/routines/level1/xdot.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xdot::Xdot(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { + Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/xdot.opencl" ; diff --git a/src/routines/level1/xnrm2.cc b/src/routines/level1/xnrm2.cc index 1730e144..105f991c 100644 --- a/src/routines/level1/xnrm2.cc +++ b/src/routines/level1/xnrm2.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xnrm2::Xnrm2(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { + Routine(queue, event, name, {"Xdot"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/xnrm2.opencl" ; diff --git a/src/routines/level1/xscal.cc b/src/routines/level1/xscal.cc index 4792d40b..3c1b5257 100644 --- a/src/routines/level1/xscal.cc +++ b/src/routines/level1/xscal.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xscal::Xscal(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { + Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/level1.opencl" #include "../../kernels/level1/xscal.opencl" diff --git a/src/routines/level1/xswap.cc b/src/routines/level1/xswap.cc index 897515fb..27eb9b13 100644 --- a/src/routines/level1/xswap.cc +++ b/src/routines/level1/xswap.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xswap::Xswap(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { + Routine(queue, event, name, {"Xaxpy"}, PrecisionValue()) { source_string_ = #include "../../kernels/level1/level1.opencl" #include "../../kernels/level1/xswap.opencl" diff --git a/src/routines/level2/xgemv.cc b/src/routines/level2/xgemv.cc index ea3b245d..ccadd131 100644 --- a/src/routines/level2/xgemv.cc +++ b/src/routines/level2/xgemv.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xgemv::Xgemv(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Pad", "Xgemv"}, PrecisionValue()) { + Routine(queue, event, name, {"Pad", "Xgemv"}, PrecisionValue()) { source_string_ = #include "../../kernels/level2/xgemv.opencl" #include "../../kernels/level2/xgemv_fast.opencl" diff --git a/src/routines/level2/xger.cc b/src/routines/level2/xger.cc index e487d41b..6ceaa00e 100644 --- a/src/routines/level2/xger.cc +++ b/src/routines/level2/xger.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xger::Xger(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xger"}, PrecisionValue()) { + Routine(queue, event, name, {"Xger"}, PrecisionValue()) { source_string_ = #include "../../kernels/level2/level2.opencl" #include "../../kernels/level2/xger.opencl" diff --git a/src/routines/level2/xher.cc b/src/routines/level2/xher.cc index 08ff5a2e..939e17bb 100644 --- a/src/routines/level2/xher.cc +++ b/src/routines/level2/xher.cc @@ -21,7 +21,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xher::Xher(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xger"}, PrecisionValue()) { + Routine(queue, event, name, {"Xger"}, PrecisionValue()) { source_string_ = #include "../../kernels/level2/level2.opencl" #include "../../kernels/level2/xher.opencl" diff --git a/src/routines/level2/xher2.cc b/src/routines/level2/xher2.cc index d5d4323b..95dbd87a 100644 --- a/src/routines/level2/xher2.cc +++ b/src/routines/level2/xher2.cc @@ -21,7 +21,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xher2::Xher2(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Xger"}, PrecisionValue()) { + Routine(queue, event, name, {"Xger"}, PrecisionValue()) { source_string_ = #include "../../kernels/level2/level2.opencl" #include "../../kernels/level2/xher2.opencl" diff --git a/src/routines/level3/xgemm.cc b/src/routines/level3/xgemm.cc index 7d06c2a2..8386ad09 100644 --- a/src/routines/level3/xgemm.cc +++ b/src/routines/level3/xgemm.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xgemm::Xgemm(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" diff --git a/src/routines/level3/xher2k.cc b/src/routines/level3/xher2k.cc index 0e5178df..bd0f83dd 100644 --- a/src/routines/level3/xher2k.cc +++ b/src/routines/level3/xher2k.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xher2k::Xher2k(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" diff --git a/src/routines/level3/xherk.cc b/src/routines/level3/xherk.cc index f8ec217a..6155734a 100644 --- a/src/routines/level3/xherk.cc +++ b/src/routines/level3/xherk.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xherk::Xherk(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" diff --git a/src/routines/level3/xsyr2k.cc b/src/routines/level3/xsyr2k.cc index b517520c..f9655889 100644 --- a/src/routines/level3/xsyr2k.cc +++ b/src/routines/level3/xsyr2k.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xsyr2k::Xsyr2k(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" diff --git a/src/routines/level3/xsyrk.cc b/src/routines/level3/xsyrk.cc index ccf8710c..bceb6afd 100644 --- a/src/routines/level3/xsyrk.cc +++ b/src/routines/level3/xsyrk.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xsyrk::Xsyrk(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose","Xgemm"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" diff --git a/src/routines/levelx/xomatcopy.cc b/src/routines/levelx/xomatcopy.cc index c724b56b..6e4bddb2 100644 --- a/src/routines/levelx/xomatcopy.cc +++ b/src/routines/levelx/xomatcopy.cc @@ -22,7 +22,7 @@ namespace clblast { // Constructor: forwards to base class constructor template Xomatcopy::Xomatcopy(Queue &queue, EventPointer event, const std::string &name): - Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose"}, PrecisionValue()) { + Routine(queue, event, name, {"Copy","Pad","Transpose","Padtranspose"}, PrecisionValue()) { source_string_ = #include "../../kernels/level3/level3.opencl" #include "../../kernels/level3/copy_fast.opencl" From bacb5d2bb2ea7b141034878090aca850db8f9d00 Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Sat, 18 Jun 2016 18:16:14 +0200 Subject: [PATCH 7/9] Clean-up of the routine class, moved RunKernel to the routine/common file --- CMakeLists.txt | 2 +- include/internal/routine.h | 19 +-------- include/internal/routines/common.h | 24 ++++++++--- scripts/generator/generator.py | 2 +- src/clblast.cc | 14 ++++--- src/routine.cc | 45 --------------------- src/routines/common.cc | 65 ++++++++++++++++++++++++++++++ 7 files changed, 97 insertions(+), 74 deletions(-) create mode 100644 src/routines/common.cc diff --git a/CMakeLists.txt b/CMakeLists.txt index 21982f39..b0ea8777 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,7 +141,7 @@ set(PRECISIONS 32 64 3232 6464) # Gathers all source-files set(SOURCES src/clblast.cc src/database.cc src/routine.cc src/cache.cc - src/utilities.cc src/clblast_c.cc) + src/utilities.cc src/clblast_c.cc src/routines/common.cc) foreach(ROUTINE ${LEVEL1_ROUTINES}) set(SOURCES ${SOURCES} src/routines/level1/${ROUTINE}.cc) endforeach() diff --git a/include/internal/routine.h b/include/internal/routine.h index 9db4e227..a6a59d77 100644 --- a/include/internal/routine.h +++ b/include/internal/routine.h @@ -23,6 +23,7 @@ #include "internal/utilities.h" #include "internal/database.h" #include "internal/buffer_test.h" +#include "internal/routines/common.h" namespace clblast { // ================================================================================================= @@ -40,8 +41,7 @@ class Routine { protected: - // Non-static variable for the precision. Note that the same variable (but static) might exist in - // a derived class. + // Non-static variable for the precision const Precision precision_; // The routine's name and its kernel-source in string form @@ -61,23 +61,8 @@ class Routine { const Database db_; }; -// ================================================================================================= - -// Enqueues a kernel, waits for completion, and checks for errors -StatusCode RunKernel(Kernel &kernel, Queue queue, const Device device, - std::vector global, const std::vector &local, - EventPointer event, std::vector& waitForEvents); - -// As above, but without an event waiting list -StatusCode RunKernel(Kernel &kernel, Queue queue, const Device device, - std::vector global, const std::vector &local, - EventPointer event); - // ================================================================================================= } // namespace clblast -// Temporary fix: TODO place include in a more logical place -#include "internal/routines/common.h" - // CLBLAST_ROUTINE_H_ #endif diff --git a/include/internal/routines/common.h b/include/internal/routines/common.h index 95fbde46..308785bd 100644 --- a/include/internal/routines/common.h +++ b/include/internal/routines/common.h @@ -8,7 +8,8 @@ // Cedric Nugteren // // This file contains all the interfaces to common kernels, such as copying, padding, and -// transposing a matrix. These functions are templated and thus header-only. +// transposing a matrix. These functions are templated and thus header-only. This file also contains +// other common functions to routines, such as a function to launch a kernel. // // ================================================================================================= @@ -18,17 +19,30 @@ #include #include -#include "internal/utilities.h" -#include "internal/routine.h" +#include "clblast.h" +#include "internal/clpp11.h" +#include "internal/database.h" namespace clblast { // ================================================================================================= +// Enqueues a kernel, waits for completion, and checks for errors +StatusCode RunKernel(Kernel &kernel, Queue &queue, const Device &device, + std::vector global, const std::vector &local, + EventPointer event, std::vector& waitForEvents); + +// As above, but without an event waiting list +StatusCode RunKernel(Kernel &kernel, Queue &queue, const Device &device, + std::vector global, const std::vector &local, + EventPointer event); + +// ================================================================================================= + // Copies or transposes a matrix and optionally pads/unpads it with zeros. This method is also able // to write to symmetric and triangular matrices through optional arguments. template -StatusCode PadCopyTransposeMatrix(Queue queue, const Device device, const Context context, - const Database db, +StatusCode PadCopyTransposeMatrix(Queue &queue, const Device &device, const Context &context, + const Database &db, EventPointer event, std::vector& waitForEvents, const size_t src_one, const size_t src_two, const size_t src_ld, const size_t src_offset, diff --git a/scripts/generator/generator.py b/scripts/generator/generator.py index 6726adda..c597c556 100644 --- a/scripts/generator/generator.py +++ b/scripts/generator/generator.py @@ -386,7 +386,7 @@ files = [ path_clblast+"/test/wrapper_cblas.h", ] header_lines = [84, 74, 93, 22, 29, 41] -footer_lines = [17, 71, 19, 14, 6, 6] +footer_lines = [17, 75, 19, 14, 6, 6] # Checks whether the command-line arguments are valid; exists otherwise for f in files: diff --git a/src/clblast.cc b/src/clblast.cc index 2d6776d0..d0f0c937 100644 --- a/src/clblast.cc +++ b/src/clblast.cc @@ -29,10 +29,10 @@ #include "internal/routines/level1/xdotc.h" #include "internal/routines/level1/xnrm2.h" #include "internal/routines/level1/xasum.h" -#include "internal/routines/level1/xsum.h" // non-BLAS function +#include "internal/routines/level1/xsum.h" // non-BLAS routine #include "internal/routines/level1/xamax.h" -#include "internal/routines/level1/xmax.h" // non-BLAS function -#include "internal/routines/level1/xmin.h" // non-BLAS function +#include "internal/routines/level1/xmax.h" // non-BLAS routine +#include "internal/routines/level1/xmin.h" // non-BLAS routine // BLAS level-2 includes #include "internal/routines/level2/xgemv.h" @@ -68,7 +68,7 @@ #include "internal/routines/level3/xher2k.h" #include "internal/routines/level3/xtrmm.h" -// Extra includes (level-x) +// Level-x includes (non-BLAS) #include "internal/routines/levelx/xomatcopy.h" namespace clblast { @@ -2123,6 +2123,7 @@ template StatusCode PUBLIC_API Omatcopy(const Layout, const Transpose, StatusCode ClearCache() { return CacheClearAll(); } // Fills the cache with all binaries for a specific device +// TODO: Add half-precision FP16 set-up calls StatusCode FillCache(const cl_device_id device) { try { @@ -2171,7 +2172,7 @@ StatusCode FillCache(const cl_device_id device) { Xsyr2(queue, nullptr).SetUp(); Xsyr2(queue, nullptr).SetUp(); Xspr2(queue, nullptr).SetUp(); Xspr2(queue, nullptr).SetUp(); - // Runs all the level 1 set-up functions + // Runs all the level 3 set-up functions Xgemm(queue, nullptr).SetUp(); Xgemm(queue, nullptr).SetUp(); Xgemm(queue, nullptr).SetUp(); Xgemm(queue, nullptr).SetUp(); Xsymm(queue, nullptr).SetUp(); Xsymm(queue, nullptr).SetUp(); Xsymm(queue, nullptr).SetUp(); Xsymm(queue, nullptr).SetUp(); Xhemm(queue, nullptr).SetUp(); Xhemm(queue, nullptr).SetUp(); @@ -2181,6 +2182,9 @@ StatusCode FillCache(const cl_device_id device) { Xher2k(queue, nullptr).SetUp(); Xher2k(queue, nullptr).SetUp(); Xtrmm(queue, nullptr).SetUp(); Xtrmm(queue, nullptr).SetUp(); Xtrmm(queue, nullptr).SetUp(); Xtrmm(queue, nullptr).SetUp(); + // Runs all the level 3 set-up functions + Xomatcopy(queue, nullptr).SetUp(); Xomatcopy(queue, nullptr).SetUp(); Xomatcopy(queue, nullptr).SetUp(); Xomatcopy(queue, nullptr).SetUp(); + } catch (...) { return StatusCode::kBuildProgramFailure; } return StatusCode::kSuccess; } diff --git a/src/routine.cc b/src/routine.cc index 9b1640b5..11633ede 100644 --- a/src/routine.cc +++ b/src/routine.cc @@ -127,50 +127,5 @@ StatusCode Routine::SetUp() { return StatusCode::kSuccess; } -// ================================================================================================= - -// Enqueues a kernel, waits for completion, and checks for errors -StatusCode RunKernel(Kernel &kernel, Queue queue, const Device device, - std::vector global, const std::vector &local, - EventPointer event, std::vector& waitForEvents) { - - // Tests for validity of the local thread sizes - if (local.size() > device.MaxWorkItemDimensions()) { - return StatusCode::kInvalidLocalNumDimensions; - } - const auto max_work_item_sizes = device.MaxWorkItemSizes(); - for (auto i=size_t{0}; i max_work_item_sizes[i]) { return StatusCode::kInvalidLocalThreadsDim; } - } - auto local_size = size_t{1}; - for (auto &item: local) { local_size *= item; } - if (local_size > device.MaxWorkGroupSize()) { return StatusCode::kInvalidLocalThreadsTotal; } - - // Make sure the global thread sizes are at least equal to the local sizes - for (auto i=size_t{0}; i global, const std::vector &local, - EventPointer event) { - auto emptyWaitingList = std::vector(); - return RunKernel(kernel, queue, device, global, local, event, emptyWaitingList); -} - // ================================================================================================= } // namespace clblast diff --git a/src/routines/common.cc b/src/routines/common.cc new file mode 100644 index 00000000..561a1bd8 --- /dev/null +++ b/src/routines/common.cc @@ -0,0 +1,65 @@ + +// ================================================================================================= +// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This +// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max- +// width of 100 characters per line. +// +// Author(s): +// Cedric Nugteren +// +// This file implements the common routine functions (see the header for more information). +// +// ================================================================================================= + +#include + +#include "internal/routines/common.h" + +namespace clblast { +// ================================================================================================= + +// Enqueues a kernel, waits for completion, and checks for errors +StatusCode RunKernel(Kernel &kernel, Queue &queue, const Device &device, + std::vector global, const std::vector &local, + EventPointer event, std::vector& waitForEvents) { + + // Tests for validity of the local thread sizes + if (local.size() > device.MaxWorkItemDimensions()) { + return StatusCode::kInvalidLocalNumDimensions; + } + const auto max_work_item_sizes = device.MaxWorkItemSizes(); + for (auto i=size_t{0}; i max_work_item_sizes[i]) { return StatusCode::kInvalidLocalThreadsDim; } + } + auto local_size = size_t{1}; + for (auto &item: local) { local_size *= item; } + if (local_size > device.MaxWorkGroupSize()) { return StatusCode::kInvalidLocalThreadsTotal; } + + // Make sure the global thread sizes are at least equal to the local sizes + for (auto i=size_t{0}; i global, const std::vector &local, + EventPointer event) { + auto emptyWaitingList = std::vector(); + return RunKernel(kernel, queue, device, global, local, event, emptyWaitingList); +} + +// ================================================================================================= +} // namespace clblast From f726fbdc9fef937fbe32222f0e66aac8d7e2678c Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Sat, 18 Jun 2016 20:20:13 +0200 Subject: [PATCH 8/9] Moved all headers into the source tree, changed headers to .hpp extension --- CMakeLists.txt | 17 +++- scripts/database/database.py | 2 +- scripts/generator/generator.py | 12 +-- .../buffer_test.h => src/buffer_test.hpp | 0 src/cache.cc | 2 +- include/internal/cache.h => src/cache.hpp | 2 +- src/clblast.cc | 92 +++++++++---------- src/clblast_c.cc | 2 +- include/internal/clpp11.h => src/clpp11.hpp | 0 src/{ => database}/database.cc | 22 ++--- .../database.h => src/database/database.hpp | 2 +- .../copy.h => src/database/kernels/copy.hpp | 0 .../pad.h => src/database/kernels/pad.hpp | 0 .../database/kernels/padtranspose.hpp | 0 .../database/kernels/transpose.hpp | 0 .../xaxpy.h => src/database/kernels/xaxpy.hpp | 0 .../xdot.h => src/database/kernels/xdot.hpp | 0 .../xgemm.h => src/database/kernels/xgemm.hpp | 0 .../xgemv.h => src/database/kernels/xgemv.hpp | 0 .../xger.h => src/database/kernels/xger.hpp | 0 .../public_api.h => src/public_api.hpp | 0 src/routine.cc | 2 +- include/internal/routine.h => src/routine.hpp | 10 +- src/routines/common.cc | 2 +- .../common.h => src/routines/common.hpp | 4 +- src/routines/level1/xamax.cc | 2 +- .../xamax.h => src/routines/level1/xamax.hpp | 2 +- src/routines/level1/xasum.cc | 2 +- .../xasum.h => src/routines/level1/xasum.hpp | 2 +- src/routines/level1/xaxpy.cc | 2 +- .../xaxpy.h => src/routines/level1/xaxpy.hpp | 2 +- src/routines/level1/xcopy.cc | 2 +- .../xcopy.h => src/routines/level1/xcopy.hpp | 2 +- src/routines/level1/xdot.cc | 2 +- .../xdot.h => src/routines/level1/xdot.hpp | 2 +- src/routines/level1/xdotc.cc | 2 +- .../xdotc.h => src/routines/level1/xdotc.hpp | 2 +- src/routines/level1/xdotu.cc | 2 +- .../xdotu.h => src/routines/level1/xdotu.hpp | 2 +- .../xmax.h => src/routines/level1/xmax.hpp | 4 +- .../xmin.h => src/routines/level1/xmin.hpp | 4 +- src/routines/level1/xnrm2.cc | 2 +- .../xnrm2.h => src/routines/level1/xnrm2.hpp | 2 +- src/routines/level1/xscal.cc | 2 +- .../xscal.h => src/routines/level1/xscal.hpp | 2 +- .../xsum.h => src/routines/level1/xsum.hpp | 4 +- src/routines/level1/xswap.cc | 2 +- .../xswap.h => src/routines/level1/xswap.hpp | 2 +- src/routines/level2/xgbmv.cc | 2 +- .../xgbmv.h => src/routines/level2/xgbmv.hpp | 2 +- src/routines/level2/xgemv.cc | 2 +- .../xgemv.h => src/routines/level2/xgemv.hpp | 2 +- src/routines/level2/xger.cc | 2 +- .../xger.h => src/routines/level2/xger.hpp | 2 +- src/routines/level2/xgerc.cc | 2 +- .../xgerc.h => src/routines/level2/xgerc.hpp | 2 +- src/routines/level2/xgeru.cc | 2 +- .../xgeru.h => src/routines/level2/xgeru.hpp | 2 +- src/routines/level2/xhbmv.cc | 2 +- .../xhbmv.h => src/routines/level2/xhbmv.hpp | 2 +- src/routines/level2/xhemv.cc | 2 +- .../xhemv.h => src/routines/level2/xhemv.hpp | 2 +- src/routines/level2/xher.cc | 2 +- .../xher.h => src/routines/level2/xher.hpp | 2 +- src/routines/level2/xher2.cc | 2 +- .../xher2.h => src/routines/level2/xher2.hpp | 2 +- src/routines/level2/xhpmv.cc | 2 +- .../xhpmv.h => src/routines/level2/xhpmv.hpp | 2 +- src/routines/level2/xhpr.cc | 2 +- .../xhpr.h => src/routines/level2/xhpr.hpp | 2 +- src/routines/level2/xhpr2.cc | 2 +- .../xhpr2.h => src/routines/level2/xhpr2.hpp | 2 +- src/routines/level2/xsbmv.cc | 2 +- .../xsbmv.h => src/routines/level2/xsbmv.hpp | 2 +- src/routines/level2/xspmv.cc | 2 +- .../xspmv.h => src/routines/level2/xspmv.hpp | 2 +- src/routines/level2/xspr.cc | 2 +- .../xspr.h => src/routines/level2/xspr.hpp | 2 +- src/routines/level2/xspr2.cc | 2 +- .../xspr2.h => src/routines/level2/xspr2.hpp | 2 +- src/routines/level2/xsymv.cc | 2 +- .../xsymv.h => src/routines/level2/xsymv.hpp | 2 +- src/routines/level2/xsyr.cc | 2 +- .../xsyr.h => src/routines/level2/xsyr.hpp | 2 +- src/routines/level2/xsyr2.cc | 2 +- .../xsyr2.h => src/routines/level2/xsyr2.hpp | 2 +- src/routines/level2/xtbmv.cc | 2 +- .../xtbmv.h => src/routines/level2/xtbmv.hpp | 2 +- src/routines/level2/xtpmv.cc | 2 +- .../xtpmv.h => src/routines/level2/xtpmv.hpp | 2 +- src/routines/level2/xtrmv.cc | 2 +- .../xtrmv.h => src/routines/level2/xtrmv.hpp | 2 +- src/routines/level3/xgemm.cc | 2 +- .../xgemm.h => src/routines/level3/xgemm.hpp | 2 +- src/routines/level3/xhemm.cc | 2 +- .../xhemm.h => src/routines/level3/xhemm.hpp | 2 +- src/routines/level3/xher2k.cc | 2 +- .../routines/level3/xher2k.hpp | 2 +- src/routines/level3/xherk.cc | 2 +- .../xherk.h => src/routines/level3/xherk.hpp | 2 +- src/routines/level3/xsymm.cc | 2 +- .../xsymm.h => src/routines/level3/xsymm.hpp | 2 +- src/routines/level3/xsyr2k.cc | 2 +- .../routines/level3/xsyr2k.hpp | 2 +- src/routines/level3/xsyrk.cc | 2 +- .../xsyrk.h => src/routines/level3/xsyrk.hpp | 2 +- src/routines/level3/xtrmm.cc | 2 +- .../xtrmm.h => src/routines/level3/xtrmm.hpp | 2 +- src/routines/levelx/xomatcopy.cc | 2 +- .../routines/levelx/xomatcopy.hpp | 2 +- src/tuning/{ => kernels}/copy_fast.cc | 4 +- src/tuning/{ => kernels}/copy_pad.cc | 4 +- src/tuning/{ => kernels}/transpose_fast.cc | 4 +- src/tuning/{ => kernels}/transpose_pad.cc | 4 +- src/tuning/{ => kernels}/xaxpy.cc | 4 +- src/tuning/{ => kernels}/xdot.cc | 4 +- src/tuning/{ => kernels}/xgemm.cc | 4 +- src/tuning/{ => kernels}/xgemv.cc | 4 +- src/tuning/{ => kernels}/xger.cc | 4 +- .../tuning.h => src/tuning/tuning.hpp | 2 +- src/utilities.cc | 2 +- .../internal/utilities.h => src/utilities.hpp | 2 +- test/correctness/routines/level1/xamax.cc | 4 +- test/correctness/routines/level1/xasum.cc | 4 +- test/correctness/routines/level1/xaxpy.cc | 4 +- test/correctness/routines/level1/xcopy.cc | 4 +- test/correctness/routines/level1/xdot.cc | 4 +- test/correctness/routines/level1/xdotc.cc | 4 +- test/correctness/routines/level1/xdotu.cc | 4 +- test/correctness/routines/level1/xnrm2.cc | 4 +- test/correctness/routines/level1/xrot.cc | 4 +- test/correctness/routines/level1/xrotg.cc | 4 +- test/correctness/routines/level1/xrotm.cc | 4 +- test/correctness/routines/level1/xrotmg.cc | 4 +- test/correctness/routines/level1/xscal.cc | 4 +- test/correctness/routines/level1/xswap.cc | 4 +- test/correctness/routines/level2/xgbmv.cc | 4 +- test/correctness/routines/level2/xgemv.cc | 4 +- test/correctness/routines/level2/xger.cc | 4 +- test/correctness/routines/level2/xgerc.cc | 4 +- test/correctness/routines/level2/xgeru.cc | 4 +- test/correctness/routines/level2/xhbmv.cc | 4 +- test/correctness/routines/level2/xhemv.cc | 4 +- test/correctness/routines/level2/xher.cc | 4 +- test/correctness/routines/level2/xher2.cc | 4 +- test/correctness/routines/level2/xhpmv.cc | 4 +- test/correctness/routines/level2/xhpr.cc | 4 +- test/correctness/routines/level2/xhpr2.cc | 4 +- test/correctness/routines/level2/xsbmv.cc | 4 +- test/correctness/routines/level2/xspmv.cc | 4 +- test/correctness/routines/level2/xspr.cc | 4 +- test/correctness/routines/level2/xspr2.cc | 4 +- test/correctness/routines/level2/xsymv.cc | 4 +- test/correctness/routines/level2/xsyr.cc | 4 +- test/correctness/routines/level2/xsyr2.cc | 4 +- test/correctness/routines/level2/xtbmv.cc | 4 +- test/correctness/routines/level2/xtbsv.cc | 4 +- test/correctness/routines/level2/xtpmv.cc | 4 +- test/correctness/routines/level2/xtpsv.cc | 4 +- test/correctness/routines/level2/xtrmv.cc | 4 +- test/correctness/routines/level2/xtrsv.cc | 4 +- test/correctness/routines/level3/xgemm.cc | 4 +- test/correctness/routines/level3/xhemm.cc | 4 +- test/correctness/routines/level3/xher2k.cc | 4 +- test/correctness/routines/level3/xherk.cc | 4 +- test/correctness/routines/level3/xsymm.cc | 4 +- test/correctness/routines/level3/xsyr2k.cc | 4 +- test/correctness/routines/level3/xsyrk.cc | 4 +- test/correctness/routines/level3/xtrmm.cc | 4 +- test/correctness/routines/level3/xtrsm.cc | 4 +- test/correctness/routines/levelx/xomatcopy.cc | 4 +- test/correctness/testblas.cc | 2 +- test/correctness/{testblas.h => testblas.hpp} | 2 +- test/correctness/tester.cc | 4 +- test/correctness/{tester.h => tester.hpp} | 2 +- test/performance/client.cc | 2 +- test/performance/{client.h => client.hpp} | 2 +- test/performance/routines/level1/xamax.cc | 4 +- test/performance/routines/level1/xasum.cc | 4 +- test/performance/routines/level1/xaxpy.cc | 4 +- test/performance/routines/level1/xcopy.cc | 4 +- test/performance/routines/level1/xdot.cc | 4 +- test/performance/routines/level1/xdotc.cc | 4 +- test/performance/routines/level1/xdotu.cc | 4 +- test/performance/routines/level1/xnrm2.cc | 4 +- test/performance/routines/level1/xrot.cc | 4 +- test/performance/routines/level1/xrotg.cc | 4 +- test/performance/routines/level1/xrotm.cc | 4 +- test/performance/routines/level1/xrotmg.cc | 4 +- test/performance/routines/level1/xscal.cc | 4 +- test/performance/routines/level1/xswap.cc | 4 +- test/performance/routines/level2/xgbmv.cc | 4 +- test/performance/routines/level2/xgemv.cc | 4 +- test/performance/routines/level2/xger.cc | 4 +- test/performance/routines/level2/xgerc.cc | 4 +- test/performance/routines/level2/xgeru.cc | 4 +- test/performance/routines/level2/xhbmv.cc | 4 +- test/performance/routines/level2/xhemv.cc | 4 +- test/performance/routines/level2/xher.cc | 4 +- test/performance/routines/level2/xher2.cc | 4 +- test/performance/routines/level2/xhpmv.cc | 4 +- test/performance/routines/level2/xhpr.cc | 4 +- test/performance/routines/level2/xhpr2.cc | 4 +- test/performance/routines/level2/xsbmv.cc | 4 +- test/performance/routines/level2/xspmv.cc | 4 +- test/performance/routines/level2/xspr.cc | 4 +- test/performance/routines/level2/xspr2.cc | 4 +- test/performance/routines/level2/xsymv.cc | 4 +- test/performance/routines/level2/xsyr.cc | 4 +- test/performance/routines/level2/xsyr2.cc | 4 +- test/performance/routines/level2/xtbmv.cc | 4 +- test/performance/routines/level2/xtbsv.cc | 4 +- test/performance/routines/level2/xtpmv.cc | 4 +- test/performance/routines/level2/xtpsv.cc | 4 +- test/performance/routines/level2/xtrmv.cc | 4 +- test/performance/routines/level2/xtrsv.cc | 4 +- test/performance/routines/level3/xgemm.cc | 4 +- test/performance/routines/level3/xhemm.cc | 4 +- test/performance/routines/level3/xher2k.cc | 4 +- test/performance/routines/level3/xherk.cc | 4 +- test/performance/routines/level3/xsymm.cc | 4 +- test/performance/routines/level3/xsyr2k.cc | 4 +- test/performance/routines/level3/xsyrk.cc | 4 +- test/performance/routines/level3/xtrmm.cc | 4 +- test/performance/routines/level3/xtrsm.cc | 4 +- test/performance/routines/levelx/xomatcopy.cc | 4 +- test/routines/level1/{xamax.h => xamax.hpp} | 4 +- test/routines/level1/{xasum.h => xasum.hpp} | 4 +- test/routines/level1/{xaxpy.h => xaxpy.hpp} | 4 +- test/routines/level1/{xcopy.h => xcopy.hpp} | 4 +- test/routines/level1/{xdot.h => xdot.hpp} | 4 +- test/routines/level1/{xdotc.h => xdotc.hpp} | 4 +- test/routines/level1/{xdotu.h => xdotu.hpp} | 4 +- test/routines/level1/{xnrm2.h => xnrm2.hpp} | 4 +- test/routines/level1/{xscal.h => xscal.hpp} | 4 +- test/routines/level1/{xswap.h => xswap.hpp} | 4 +- test/routines/level2/{xgbmv.h => xgbmv.hpp} | 4 +- test/routines/level2/{xgemv.h => xgemv.hpp} | 4 +- test/routines/level2/{xger.h => xger.hpp} | 4 +- test/routines/level2/{xgerc.h => xgerc.hpp} | 4 +- test/routines/level2/{xgeru.h => xgeru.hpp} | 4 +- test/routines/level2/{xhbmv.h => xhbmv.hpp} | 4 +- test/routines/level2/{xhemv.h => xhemv.hpp} | 4 +- test/routines/level2/{xher.h => xher.hpp} | 4 +- test/routines/level2/{xher2.h => xher2.hpp} | 4 +- test/routines/level2/{xhpmv.h => xhpmv.hpp} | 4 +- test/routines/level2/{xhpr.h => xhpr.hpp} | 4 +- test/routines/level2/{xhpr2.h => xhpr2.hpp} | 4 +- test/routines/level2/{xsbmv.h => xsbmv.hpp} | 4 +- test/routines/level2/{xspmv.h => xspmv.hpp} | 4 +- test/routines/level2/{xspr.h => xspr.hpp} | 4 +- test/routines/level2/{xspr2.h => xspr2.hpp} | 4 +- test/routines/level2/{xsymv.h => xsymv.hpp} | 4 +- test/routines/level2/{xsyr.h => xsyr.hpp} | 4 +- test/routines/level2/{xsyr2.h => xsyr2.hpp} | 4 +- test/routines/level2/{xtbmv.h => xtbmv.hpp} | 4 +- test/routines/level2/{xtpmv.h => xtpmv.hpp} | 4 +- test/routines/level2/{xtrmv.h => xtrmv.hpp} | 4 +- test/routines/level3/{xgemm.h => xgemm.hpp} | 4 +- test/routines/level3/{xhemm.h => xhemm.hpp} | 4 +- test/routines/level3/{xher2k.h => xher2k.hpp} | 4 +- test/routines/level3/{xherk.h => xherk.hpp} | 4 +- test/routines/level3/{xsymm.h => xsymm.hpp} | 4 +- test/routines/level3/{xsyr2k.h => xsyr2k.hpp} | 4 +- test/routines/level3/{xsyrk.h => xsyrk.hpp} | 4 +- test/routines/level3/{xtrmm.h => xtrmm.hpp} | 4 +- .../levelx/{xomatcopy.h => xomatcopy.hpp} | 0 test/{wrapper_cblas.h => wrapper_cblas.hpp} | 2 +- test/{wrapper_clblas.h => wrapper_clblas.hpp} | 2 +- 269 files changed, 483 insertions(+), 476 deletions(-) rename include/internal/buffer_test.h => src/buffer_test.hpp (100%) rename include/internal/cache.h => src/cache.hpp (99%) rename include/internal/clpp11.h => src/clpp11.hpp (100%) rename src/{ => database}/database.cc (92%) rename include/internal/database.h => src/database/database.hpp (99%) rename include/internal/database/copy.h => src/database/kernels/copy.hpp (100%) rename include/internal/database/pad.h => src/database/kernels/pad.hpp (100%) rename include/internal/database/padtranspose.h => src/database/kernels/padtranspose.hpp (100%) rename include/internal/database/transpose.h => src/database/kernels/transpose.hpp (100%) rename include/internal/database/xaxpy.h => src/database/kernels/xaxpy.hpp (100%) rename include/internal/database/xdot.h => src/database/kernels/xdot.hpp (100%) rename include/internal/database/xgemm.h => src/database/kernels/xgemm.hpp (100%) rename include/internal/database/xgemv.h => src/database/kernels/xgemv.hpp (100%) rename include/internal/database/xger.h => src/database/kernels/xger.hpp (100%) rename include/internal/public_api.h => src/public_api.hpp (100%) rename include/internal/routine.h => src/routine.hpp (92%) rename include/internal/routines/common.h => src/routines/common.hpp (99%) rename include/internal/routines/level1/xamax.h => src/routines/level1/xamax.hpp (97%) rename include/internal/routines/level1/xasum.h => src/routines/level1/xasum.hpp (97%) rename include/internal/routines/level1/xaxpy.h => src/routines/level1/xaxpy.hpp (97%) rename include/internal/routines/level1/xcopy.h => src/routines/level1/xcopy.hpp (97%) rename include/internal/routines/level1/xdot.h => src/routines/level1/xdot.hpp (98%) rename include/internal/routines/level1/xdotc.h => src/routines/level1/xdotc.hpp (97%) rename include/internal/routines/level1/xdotu.h => src/routines/level1/xdotu.hpp (97%) rename include/internal/routines/level1/xmax.h => src/routines/level1/xmax.hpp (95%) rename include/internal/routines/level1/xmin.h => src/routines/level1/xmin.hpp (95%) rename include/internal/routines/level1/xnrm2.h => src/routines/level1/xnrm2.hpp (97%) rename include/internal/routines/level1/xscal.h => src/routines/level1/xscal.hpp (97%) rename include/internal/routines/level1/xsum.h => src/routines/level1/xsum.hpp (95%) rename include/internal/routines/level1/xswap.h => src/routines/level1/xswap.hpp (97%) rename include/internal/routines/level2/xgbmv.h => src/routines/level2/xgbmv.hpp (97%) rename include/internal/routines/level2/xgemv.h => src/routines/level2/xgemv.hpp (98%) rename include/internal/routines/level2/xger.h => src/routines/level2/xger.hpp (98%) rename include/internal/routines/level2/xgerc.h => src/routines/level2/xgerc.hpp (97%) rename include/internal/routines/level2/xgeru.h => src/routines/level2/xgeru.hpp (97%) rename include/internal/routines/level2/xhbmv.h => src/routines/level2/xhbmv.hpp (97%) rename include/internal/routines/level2/xhemv.h => src/routines/level2/xhemv.hpp (97%) rename include/internal/routines/level2/xher.h => src/routines/level2/xher.hpp (98%) rename include/internal/routines/level2/xher2.h => src/routines/level2/xher2.hpp (98%) rename include/internal/routines/level2/xhpmv.h => src/routines/level2/xhpmv.hpp (97%) rename include/internal/routines/level2/xhpr.h => src/routines/level2/xhpr.hpp (97%) rename include/internal/routines/level2/xhpr2.h => src/routines/level2/xhpr2.hpp (97%) rename include/internal/routines/level2/xsbmv.h => src/routines/level2/xsbmv.hpp (97%) rename include/internal/routines/level2/xspmv.h => src/routines/level2/xspmv.hpp (97%) rename include/internal/routines/level2/xspr.h => src/routines/level2/xspr.hpp (97%) rename include/internal/routines/level2/xspr2.h => src/routines/level2/xspr2.hpp (97%) rename include/internal/routines/level2/xsymv.h => src/routines/level2/xsymv.hpp (97%) rename include/internal/routines/level2/xsyr.h => src/routines/level2/xsyr.hpp (97%) rename include/internal/routines/level2/xsyr2.h => src/routines/level2/xsyr2.hpp (97%) rename include/internal/routines/level2/xtbmv.h => src/routines/level2/xtbmv.hpp (97%) rename include/internal/routines/level2/xtpmv.h => src/routines/level2/xtpmv.hpp (97%) rename include/internal/routines/level2/xtrmv.h => src/routines/level2/xtrmv.hpp (97%) rename include/internal/routines/level3/xgemm.h => src/routines/level3/xgemm.hpp (98%) rename include/internal/routines/level3/xhemm.h => src/routines/level3/xhemm.hpp (97%) rename include/internal/routines/level3/xher2k.h => src/routines/level3/xher2k.hpp (98%) rename include/internal/routines/level3/xherk.h => src/routines/level3/xherk.hpp (98%) rename include/internal/routines/level3/xsymm.h => src/routines/level3/xsymm.hpp (98%) rename include/internal/routines/level3/xsyr2k.h => src/routines/level3/xsyr2k.hpp (98%) rename include/internal/routines/level3/xsyrk.h => src/routines/level3/xsyrk.hpp (98%) rename include/internal/routines/level3/xtrmm.h => src/routines/level3/xtrmm.hpp (97%) rename include/internal/routines/levelx/xomatcopy.h => src/routines/levelx/xomatcopy.hpp (98%) rename src/tuning/{ => kernels}/copy_fast.cc (98%) rename src/tuning/{ => kernels}/copy_pad.cc (98%) rename src/tuning/{ => kernels}/transpose_fast.cc (98%) rename src/tuning/{ => kernels}/transpose_pad.cc (98%) rename src/tuning/{ => kernels}/xaxpy.cc (98%) rename src/tuning/{ => kernels}/xdot.cc (99%) rename src/tuning/{ => kernels}/xgemm.cc (99%) rename src/tuning/{ => kernels}/xgemv.cc (99%) rename src/tuning/{ => kernels}/xger.cc (98%) rename include/internal/tuning.h => src/tuning/tuning.hpp (99%) rename include/internal/utilities.h => src/utilities.hpp (99%) rename test/correctness/{testblas.h => testblas.hpp} (99%) rename test/correctness/{tester.h => tester.hpp} (99%) rename test/performance/{client.h => client.hpp} (99%) rename test/routines/level1/{xamax.h => xamax.hpp} (98%) rename test/routines/level1/{xasum.h => xasum.hpp} (98%) rename test/routines/level1/{xaxpy.h => xaxpy.hpp} (98%) rename test/routines/level1/{xcopy.h => xcopy.hpp} (98%) rename test/routines/level1/{xdot.h => xdot.hpp} (98%) rename test/routines/level1/{xdotc.h => xdotc.hpp} (98%) rename test/routines/level1/{xdotu.h => xdotu.hpp} (98%) rename test/routines/level1/{xnrm2.h => xnrm2.hpp} (98%) rename test/routines/level1/{xscal.h => xscal.hpp} (98%) rename test/routines/level1/{xswap.h => xswap.hpp} (98%) rename test/routines/level2/{xgbmv.h => xgbmv.hpp} (98%) rename test/routines/level2/{xgemv.h => xgemv.hpp} (98%) rename test/routines/level2/{xger.h => xger.hpp} (98%) rename test/routines/level2/{xgerc.h => xgerc.hpp} (98%) rename test/routines/level2/{xgeru.h => xgeru.hpp} (98%) rename test/routines/level2/{xhbmv.h => xhbmv.hpp} (98%) rename test/routines/level2/{xhemv.h => xhemv.hpp} (98%) rename test/routines/level2/{xher.h => xher.hpp} (98%) rename test/routines/level2/{xher2.h => xher2.hpp} (98%) rename test/routines/level2/{xhpmv.h => xhpmv.hpp} (98%) rename test/routines/level2/{xhpr.h => xhpr.hpp} (98%) rename test/routines/level2/{xhpr2.h => xhpr2.hpp} (98%) rename test/routines/level2/{xsbmv.h => xsbmv.hpp} (98%) rename test/routines/level2/{xspmv.h => xspmv.hpp} (98%) rename test/routines/level2/{xspr.h => xspr.hpp} (98%) rename test/routines/level2/{xspr2.h => xspr2.hpp} (98%) rename test/routines/level2/{xsymv.h => xsymv.hpp} (98%) rename test/routines/level2/{xsyr.h => xsyr.hpp} (98%) rename test/routines/level2/{xsyr2.h => xsyr2.hpp} (98%) rename test/routines/level2/{xtbmv.h => xtbmv.hpp} (98%) rename test/routines/level2/{xtpmv.h => xtpmv.hpp} (98%) rename test/routines/level2/{xtrmv.h => xtrmv.hpp} (98%) rename test/routines/level3/{xgemm.h => xgemm.hpp} (98%) rename test/routines/level3/{xhemm.h => xhemm.hpp} (98%) rename test/routines/level3/{xher2k.h => xher2k.hpp} (98%) rename test/routines/level3/{xherk.h => xherk.hpp} (98%) rename test/routines/level3/{xsymm.h => xsymm.hpp} (98%) rename test/routines/level3/{xsyr2k.h => xsyr2k.hpp} (98%) rename test/routines/level3/{xsyrk.h => xsyrk.hpp} (98%) rename test/routines/level3/{xtrmm.h => xtrmm.hpp} (98%) rename test/routines/levelx/{xomatcopy.h => xomatcopy.hpp} (100%) rename test/{wrapper_cblas.h => wrapper_cblas.hpp} (99%) rename test/{wrapper_clblas.h => wrapper_clblas.hpp} (99%) diff --git a/CMakeLists.txt b/CMakeLists.txt index b0ea8777..5ca56bd7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,7 +121,7 @@ endif() # ================================================================================================== # Includes directories: CLBlast and OpenCL -include_directories(${clblast_SOURCE_DIR}/include ${OPENCL_INCLUDE_DIRS}) +include_directories(${clblast_SOURCE_DIR}/include ${clblast_SOURCE_DIR}/src ${OPENCL_INCLUDE_DIRS}) # ================================================================================================== @@ -140,8 +140,15 @@ set(PRECISIONS 32 64 3232 6464) # ================================================================================================== # Gathers all source-files -set(SOURCES src/clblast.cc src/database.cc src/routine.cc src/cache.cc - src/utilities.cc src/clblast_c.cc src/routines/common.cc) +set(SOURCES + src/database/database.cc + src/routines/common.cc + src/cache.cc + src/clblast.cc + src/clblast_c.cc + src/routine.cc + src/utilities.cc +) foreach(ROUTINE ${LEVEL1_ROUTINES}) set(SOURCES ${SOURCES} src/routines/level1/${ROUTINE}.cc) endforeach() @@ -211,7 +218,7 @@ if(TUNERS) # Adds tuning executables foreach(KERNEL ${KERNELS}) - add_executable(clblast_tuner_${KERNEL} src/tuning/${KERNEL}.cc) + add_executable(clblast_tuner_${KERNEL} src/tuning/kernels/${KERNEL}.cc) target_link_libraries(clblast_tuner_${KERNEL} clblast ${CLTUNE_LIBRARIES} ${OPENCL_LIBRARIES}) install(TARGETS clblast_tuner_${KERNEL} DESTINATION bin) endforeach() @@ -257,7 +264,7 @@ if(CLIENTS OR TESTS) endif() # Sets the include directories - include_directories(${clblast_SOURCE_DIR}/test ${REF_INCLUDES}) + include_directories(${clblast_SOURCE_DIR} ${REF_INCLUDES}) endif() diff --git a/scripts/database/database.py b/scripts/database/database.py index 7f7f07e4..4ca184c5 100644 --- a/scripts/database/database.py +++ b/scripts/database/database.py @@ -310,7 +310,7 @@ defaults = CalculateDefaults(bests) bests = ConcatenateData(bests, defaults) # Outputs the data as a C++ database -path_cpp_database = os.path.join(path_clblast, "include", "internal", "database") +path_cpp_database = os.path.join(path_clblast, "src", "database", "kernels") print("## Producing a C++ database in '"+path_cpp_database+"'...") PrintData(bests, path_cpp_database) diff --git a/scripts/generator/generator.py b/scripts/generator/generator.py index c597c556..1df4c8e6 100644 --- a/scripts/generator/generator.py +++ b/scripts/generator/generator.py @@ -382,8 +382,8 @@ files = [ path_clblast+"/src/clblast.cc", path_clblast+"/include/clblast_c.h", path_clblast+"/src/clblast_c.cc", - path_clblast+"/test/wrapper_clblas.h", - path_clblast+"/test/wrapper_cblas.h", + path_clblast+"/test/wrapper_clblas.hpp", + path_clblast+"/test/wrapper_cblas.hpp", ] header_lines = [84, 74, 93, 22, 29, 41] footer_lines = [17, 75, 19, 14, 6, 6] @@ -436,8 +436,8 @@ for level in [1,2,3,4]: filename = path_clblast+"/test/correctness/routines/level"+levelnames[level-1]+"/x"+routine.name+".cc" with open(filename, "w") as f: body = "" - body += "#include \"correctness/testblas.h\"\n" - body += "#include \"routines/level"+levelnames[level-1]+"/x"+routine.name+".h\"\n\n" + body += "#include \"test/correctness/testblas.hpp\"\n" + body += "#include \"test/routines/level"+levelnames[level-1]+"/x"+routine.name+".hpp\"\n\n" body += "// Shortcuts to the clblast namespace\n" body += "using float2 = clblast::float2;\n" body += "using double2 = clblast::double2;\n\n" @@ -462,8 +462,8 @@ for level in [1,2,3,4]: filename = path_clblast+"/test/performance/routines/level"+levelnames[level-1]+"/x"+routine.name+".cc" with open(filename, "w") as f: body = "" - body += "#include \"performance/client.h\"\n" - body += "#include \"routines/level"+levelnames[level-1]+"/x"+routine.name+".h\"\n\n" + body += "#include \"test/performance/client.hpp\"\n" + body += "#include \"test/routines/level"+levelnames[level-1]+"/x"+routine.name+".hpp\"\n\n" body += "// Shortcuts to the clblast namespace\n" body += "using float2 = clblast::float2;\n" body += "using double2 = clblast::double2;\n\n" diff --git a/include/internal/buffer_test.h b/src/buffer_test.hpp similarity index 100% rename from include/internal/buffer_test.h rename to src/buffer_test.hpp diff --git a/src/cache.cc b/src/cache.cc index a34d351f..cd9055d0 100644 --- a/src/cache.cc +++ b/src/cache.cc @@ -15,7 +15,7 @@ #include #include -#include "internal/cache.h" +#include "cache.hpp" namespace clblast { // ================================================================================================= diff --git a/include/internal/cache.h b/src/cache.hpp similarity index 99% rename from include/internal/cache.h rename to src/cache.hpp index bc7e87d9..0d74d7bc 100644 --- a/include/internal/cache.h +++ b/src/cache.hpp @@ -18,7 +18,7 @@ #include #include -#include "internal/utilities.h" +#include "utilities.hpp" namespace clblast { // ================================================================================================= diff --git a/src/clblast.cc b/src/clblast.cc index d0f0c937..88d60772 100644 --- a/src/clblast.cc +++ b/src/clblast.cc @@ -16,60 +16,60 @@ #include #include "clblast.h" -#include "internal/public_api.h" -#include "internal/cache.h" +#include "public_api.hpp" +#include "cache.hpp" // BLAS level-1 includes -#include "internal/routines/level1/xswap.h" -#include "internal/routines/level1/xscal.h" -#include "internal/routines/level1/xcopy.h" -#include "internal/routines/level1/xaxpy.h" -#include "internal/routines/level1/xdot.h" -#include "internal/routines/level1/xdotu.h" -#include "internal/routines/level1/xdotc.h" -#include "internal/routines/level1/xnrm2.h" -#include "internal/routines/level1/xasum.h" -#include "internal/routines/level1/xsum.h" // non-BLAS routine -#include "internal/routines/level1/xamax.h" -#include "internal/routines/level1/xmax.h" // non-BLAS routine -#include "internal/routines/level1/xmin.h" // non-BLAS routine +#include "routines/level1/xswap.hpp" +#include "routines/level1/xscal.hpp" +#include "routines/level1/xcopy.hpp" +#include "routines/level1/xaxpy.hpp" +#include "routines/level1/xdot.hpp" +#include "routines/level1/xdotu.hpp" +#include "routines/level1/xdotc.hpp" +#include "routines/level1/xnrm2.hpp" +#include "routines/level1/xasum.hpp" +#include "routines/level1/xsum.hpp" // non-BLAS routine +#include "routines/level1/xamax.hpp" +#include "routines/level1/xmax.hpp" // non-BLAS routine +#include "routines/level1/xmin.hpp" // non-BLAS routine // BLAS level-2 includes -#include "internal/routines/level2/xgemv.h" -#include "internal/routines/level2/xgbmv.h" -#include "internal/routines/level2/xhemv.h" -#include "internal/routines/level2/xhbmv.h" -#include "internal/routines/level2/xhpmv.h" -#include "internal/routines/level2/xsymv.h" -#include "internal/routines/level2/xsbmv.h" -#include "internal/routines/level2/xspmv.h" -#include "internal/routines/level2/xtrmv.h" -#include "internal/routines/level2/xtbmv.h" -#include "internal/routines/level2/xtpmv.h" -#include "internal/routines/level2/xger.h" -#include "internal/routines/level2/xgeru.h" -#include "internal/routines/level2/xgerc.h" -#include "internal/routines/level2/xher.h" -#include "internal/routines/level2/xhpr.h" -#include "internal/routines/level2/xher2.h" -#include "internal/routines/level2/xhpr2.h" -#include "internal/routines/level2/xsyr.h" -#include "internal/routines/level2/xspr.h" -#include "internal/routines/level2/xsyr2.h" -#include "internal/routines/level2/xspr2.h" +#include "routines/level2/xgemv.hpp" +#include "routines/level2/xgbmv.hpp" +#include "routines/level2/xhemv.hpp" +#include "routines/level2/xhbmv.hpp" +#include "routines/level2/xhpmv.hpp" +#include "routines/level2/xsymv.hpp" +#include "routines/level2/xsbmv.hpp" +#include "routines/level2/xspmv.hpp" +#include "routines/level2/xtrmv.hpp" +#include "routines/level2/xtbmv.hpp" +#include "routines/level2/xtpmv.hpp" +#include "routines/level2/xger.hpp" +#include "routines/level2/xgeru.hpp" +#include "routines/level2/xgerc.hpp" +#include "routines/level2/xher.hpp" +#include "routines/level2/xhpr.hpp" +#include "routines/level2/xher2.hpp" +#include "routines/level2/xhpr2.hpp" +#include "routines/level2/xsyr.hpp" +#include "routines/level2/xspr.hpp" +#include "routines/level2/xsyr2.hpp" +#include "routines/level2/xspr2.hpp" // BLAS level-3 includes -#include "internal/routines/level3/xgemm.h" -#include "internal/routines/level3/xsymm.h" -#include "internal/routines/level3/xhemm.h" -#include "internal/routines/level3/xsyrk.h" -#include "internal/routines/level3/xherk.h" -#include "internal/routines/level3/xsyr2k.h" -#include "internal/routines/level3/xher2k.h" -#include "internal/routines/level3/xtrmm.h" +#include "routines/level3/xgemm.hpp" +#include "routines/level3/xsymm.hpp" +#include "routines/level3/xhemm.hpp" +#include "routines/level3/xsyrk.hpp" +#include "routines/level3/xherk.hpp" +#include "routines/level3/xsyr2k.hpp" +#include "routines/level3/xher2k.hpp" +#include "routines/level3/xtrmm.hpp" // Level-x includes (non-BLAS) -#include "internal/routines/levelx/xomatcopy.h" +#include "routines/levelx/xomatcopy.hpp" namespace clblast { diff --git a/src/clblast_c.cc b/src/clblast_c.cc index 22cb2192..9ea2c884 100644 --- a/src/clblast_c.cc +++ b/src/clblast_c.cc @@ -15,7 +15,7 @@ #include "clblast_c.h" #include "clblast.h" -#include "internal/utilities.h" +#include "utilities.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/include/internal/clpp11.h b/src/clpp11.hpp similarity index 100% rename from include/internal/clpp11.h rename to src/clpp11.hpp diff --git a/src/database.cc b/src/database/database.cc similarity index 92% rename from src/database.cc rename to src/database/database.cc index e20ae340..6ec93731 100644 --- a/src/database.cc +++ b/src/database/database.cc @@ -11,18 +11,18 @@ // // ================================================================================================= -#include "internal/database.h" -#include "internal/database/xaxpy.h" -#include "internal/database/xdot.h" -#include "internal/database/xgemv.h" -#include "internal/database/xger.h" -#include "internal/database/xgemm.h" -#include "internal/database/copy.h" -#include "internal/database/pad.h" -#include "internal/database/transpose.h" -#include "internal/database/padtranspose.h" +#include "utilities.hpp" -#include "internal/utilities.h" +#include "database/database.hpp" +#include "database/kernels/xaxpy.hpp" +#include "database/kernels/xdot.hpp" +#include "database/kernels/xgemv.hpp" +#include "database/kernels/xger.hpp" +#include "database/kernels/xgemm.hpp" +#include "database/kernels/copy.hpp" +#include "database/kernels/pad.hpp" +#include "database/kernels/transpose.hpp" +#include "database/kernels/padtranspose.hpp" namespace clblast { // ================================================================================================= diff --git a/include/internal/database.h b/src/database/database.hpp similarity index 99% rename from include/internal/database.h rename to src/database/database.hpp index f93eaa22..0987cbed 100644 --- a/include/internal/database.h +++ b/src/database/database.hpp @@ -21,7 +21,7 @@ #include #include -#include "internal/utilities.h" +#include "utilities.hpp" namespace clblast { // ================================================================================================= diff --git a/include/internal/database/copy.h b/src/database/kernels/copy.hpp similarity index 100% rename from include/internal/database/copy.h rename to src/database/kernels/copy.hpp diff --git a/include/internal/database/pad.h b/src/database/kernels/pad.hpp similarity index 100% rename from include/internal/database/pad.h rename to src/database/kernels/pad.hpp diff --git a/include/internal/database/padtranspose.h b/src/database/kernels/padtranspose.hpp similarity index 100% rename from include/internal/database/padtranspose.h rename to src/database/kernels/padtranspose.hpp diff --git a/include/internal/database/transpose.h b/src/database/kernels/transpose.hpp similarity index 100% rename from include/internal/database/transpose.h rename to src/database/kernels/transpose.hpp diff --git a/include/internal/database/xaxpy.h b/src/database/kernels/xaxpy.hpp similarity index 100% rename from include/internal/database/xaxpy.h rename to src/database/kernels/xaxpy.hpp diff --git a/include/internal/database/xdot.h b/src/database/kernels/xdot.hpp similarity index 100% rename from include/internal/database/xdot.h rename to src/database/kernels/xdot.hpp diff --git a/include/internal/database/xgemm.h b/src/database/kernels/xgemm.hpp similarity index 100% rename from include/internal/database/xgemm.h rename to src/database/kernels/xgemm.hpp diff --git a/include/internal/database/xgemv.h b/src/database/kernels/xgemv.hpp similarity index 100% rename from include/internal/database/xgemv.h rename to src/database/kernels/xgemv.hpp diff --git a/include/internal/database/xger.h b/src/database/kernels/xger.hpp similarity index 100% rename from include/internal/database/xger.h rename to src/database/kernels/xger.hpp diff --git a/include/internal/public_api.h b/src/public_api.hpp similarity index 100% rename from include/internal/public_api.h rename to src/public_api.hpp diff --git a/src/routine.cc b/src/routine.cc index 11633ede..d3590896 100644 --- a/src/routine.cc +++ b/src/routine.cc @@ -14,7 +14,7 @@ #include #include -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/include/internal/routine.h b/src/routine.hpp similarity index 92% rename from include/internal/routine.h rename to src/routine.hpp index a6a59d77..54b5779f 100644 --- a/include/internal/routine.h +++ b/src/routine.hpp @@ -19,11 +19,11 @@ #include #include -#include "internal/cache.h" -#include "internal/utilities.h" -#include "internal/database.h" -#include "internal/buffer_test.h" -#include "internal/routines/common.h" +#include "utilities.hpp" +#include "cache.hpp" +#include "buffer_test.hpp" +#include "database/database.hpp" +#include "routines/common.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/common.cc b/src/routines/common.cc index 561a1bd8..c378df28 100644 --- a/src/routines/common.cc +++ b/src/routines/common.cc @@ -13,7 +13,7 @@ #include -#include "internal/routines/common.h" +#include "routines/common.hpp" namespace clblast { // ================================================================================================= diff --git a/include/internal/routines/common.h b/src/routines/common.hpp similarity index 99% rename from include/internal/routines/common.h rename to src/routines/common.hpp index 308785bd..c99cd39d 100644 --- a/include/internal/routines/common.h +++ b/src/routines/common.hpp @@ -20,8 +20,8 @@ #include #include "clblast.h" -#include "internal/clpp11.h" -#include "internal/database.h" +#include "clpp11.hpp" +#include "database/database.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level1/xamax.cc b/src/routines/level1/xamax.cc index b4add2a3..6b6e7f9e 100644 --- a/src/routines/level1/xamax.cc +++ b/src/routines/level1/xamax.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level1/xamax.h" +#include "routines/level1/xamax.hpp" #include #include diff --git a/include/internal/routines/level1/xamax.h b/src/routines/level1/xamax.hpp similarity index 97% rename from include/internal/routines/level1/xamax.h rename to src/routines/level1/xamax.hpp index 42f8f67c..aa45a8e4 100644 --- a/include/internal/routines/level1/xamax.h +++ b/src/routines/level1/xamax.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XAMAX_H_ #define CLBLAST_ROUTINES_XAMAX_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level1/xasum.cc b/src/routines/level1/xasum.cc index 80f04829..0c1ce903 100644 --- a/src/routines/level1/xasum.cc +++ b/src/routines/level1/xasum.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level1/xasum.h" +#include "routines/level1/xasum.hpp" #include #include diff --git a/include/internal/routines/level1/xasum.h b/src/routines/level1/xasum.hpp similarity index 97% rename from include/internal/routines/level1/xasum.h rename to src/routines/level1/xasum.hpp index 9d93a6f4..5a253f4d 100644 --- a/include/internal/routines/level1/xasum.h +++ b/src/routines/level1/xasum.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XASUM_H_ #define CLBLAST_ROUTINES_XASUM_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level1/xaxpy.cc b/src/routines/level1/xaxpy.cc index 4a548757..5b6c9e77 100644 --- a/src/routines/level1/xaxpy.cc +++ b/src/routines/level1/xaxpy.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level1/xaxpy.h" +#include "routines/level1/xaxpy.hpp" #include #include diff --git a/include/internal/routines/level1/xaxpy.h b/src/routines/level1/xaxpy.hpp similarity index 97% rename from include/internal/routines/level1/xaxpy.h rename to src/routines/level1/xaxpy.hpp index 4c8d2c1f..caac871e 100644 --- a/include/internal/routines/level1/xaxpy.h +++ b/src/routines/level1/xaxpy.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XAXPY_H_ #define CLBLAST_ROUTINES_XAXPY_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level1/xcopy.cc b/src/routines/level1/xcopy.cc index 92d31786..673ef349 100644 --- a/src/routines/level1/xcopy.cc +++ b/src/routines/level1/xcopy.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level1/xcopy.h" +#include "routines/level1/xcopy.hpp" #include #include diff --git a/include/internal/routines/level1/xcopy.h b/src/routines/level1/xcopy.hpp similarity index 97% rename from include/internal/routines/level1/xcopy.h rename to src/routines/level1/xcopy.hpp index c7d03dd0..0c424ba3 100644 --- a/include/internal/routines/level1/xcopy.h +++ b/src/routines/level1/xcopy.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XCOPY_H_ #define CLBLAST_ROUTINES_XCOPY_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level1/xdot.cc b/src/routines/level1/xdot.cc index 8709c541..bafea157 100644 --- a/src/routines/level1/xdot.cc +++ b/src/routines/level1/xdot.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level1/xdot.h" +#include "routines/level1/xdot.hpp" #include #include diff --git a/include/internal/routines/level1/xdot.h b/src/routines/level1/xdot.hpp similarity index 98% rename from include/internal/routines/level1/xdot.h rename to src/routines/level1/xdot.hpp index e1968740..02c1efaa 100644 --- a/include/internal/routines/level1/xdot.h +++ b/src/routines/level1/xdot.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XDOT_H_ #define CLBLAST_ROUTINES_XDOT_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level1/xdotc.cc b/src/routines/level1/xdotc.cc index b3a01079..27cf2bab 100644 --- a/src/routines/level1/xdotc.cc +++ b/src/routines/level1/xdotc.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level1/xdotc.h" +#include "routines/level1/xdotc.hpp" #include #include diff --git a/include/internal/routines/level1/xdotc.h b/src/routines/level1/xdotc.hpp similarity index 97% rename from include/internal/routines/level1/xdotc.h rename to src/routines/level1/xdotc.hpp index 0dc2cfe9..b8cbdaf5 100644 --- a/include/internal/routines/level1/xdotc.h +++ b/src/routines/level1/xdotc.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XDOTC_H_ #define CLBLAST_ROUTINES_XDOTC_H_ -#include "internal/routines/level1/xdot.h" +#include "routines/level1/xdot.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level1/xdotu.cc b/src/routines/level1/xdotu.cc index 8dded6e0..0bce70b7 100644 --- a/src/routines/level1/xdotu.cc +++ b/src/routines/level1/xdotu.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level1/xdotu.h" +#include "routines/level1/xdotu.hpp" #include diff --git a/include/internal/routines/level1/xdotu.h b/src/routines/level1/xdotu.hpp similarity index 97% rename from include/internal/routines/level1/xdotu.h rename to src/routines/level1/xdotu.hpp index 98988744..b3f73086 100644 --- a/include/internal/routines/level1/xdotu.h +++ b/src/routines/level1/xdotu.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XDOTU_H_ #define CLBLAST_ROUTINES_XDOTU_H_ -#include "internal/routines/level1/xdot.h" +#include "routines/level1/xdot.hpp" namespace clblast { // ================================================================================================= diff --git a/include/internal/routines/level1/xmax.h b/src/routines/level1/xmax.hpp similarity index 95% rename from include/internal/routines/level1/xmax.h rename to src/routines/level1/xmax.hpp index a872cede..5a0236f2 100644 --- a/include/internal/routines/level1/xmax.h +++ b/src/routines/level1/xmax.hpp @@ -14,8 +14,8 @@ #ifndef CLBLAST_ROUTINES_XMAX_H_ #define CLBLAST_ROUTINES_XMAX_H_ -#include "internal/routine.h" -#include "internal/routines/level1/xamax.h" +#include "routine.hpp" +#include "routines/level1/xamax.hpp" namespace clblast { // ================================================================================================= diff --git a/include/internal/routines/level1/xmin.h b/src/routines/level1/xmin.hpp similarity index 95% rename from include/internal/routines/level1/xmin.h rename to src/routines/level1/xmin.hpp index 700c81cc..6befec64 100644 --- a/include/internal/routines/level1/xmin.h +++ b/src/routines/level1/xmin.hpp @@ -14,8 +14,8 @@ #ifndef CLBLAST_ROUTINES_XMIN_H_ #define CLBLAST_ROUTINES_XMIN_H_ -#include "internal/routine.h" -#include "internal/routines/level1/xamax.h" +#include "routine.hpp" +#include "routines/level1/xamax.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level1/xnrm2.cc b/src/routines/level1/xnrm2.cc index 105f991c..97615d8b 100644 --- a/src/routines/level1/xnrm2.cc +++ b/src/routines/level1/xnrm2.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level1/xnrm2.h" +#include "routines/level1/xnrm2.hpp" #include #include diff --git a/include/internal/routines/level1/xnrm2.h b/src/routines/level1/xnrm2.hpp similarity index 97% rename from include/internal/routines/level1/xnrm2.h rename to src/routines/level1/xnrm2.hpp index ca9268c0..7baf07f5 100644 --- a/include/internal/routines/level1/xnrm2.h +++ b/src/routines/level1/xnrm2.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XNRM2_H_ #define CLBLAST_ROUTINES_XNRM2_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level1/xscal.cc b/src/routines/level1/xscal.cc index 3c1b5257..bcc43c3b 100644 --- a/src/routines/level1/xscal.cc +++ b/src/routines/level1/xscal.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level1/xscal.h" +#include "routines/level1/xscal.hpp" #include #include diff --git a/include/internal/routines/level1/xscal.h b/src/routines/level1/xscal.hpp similarity index 97% rename from include/internal/routines/level1/xscal.h rename to src/routines/level1/xscal.hpp index b9430f3b..6c585cb2 100644 --- a/include/internal/routines/level1/xscal.h +++ b/src/routines/level1/xscal.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XSCAL_H_ #define CLBLAST_ROUTINES_XSCAL_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/include/internal/routines/level1/xsum.h b/src/routines/level1/xsum.hpp similarity index 95% rename from include/internal/routines/level1/xsum.h rename to src/routines/level1/xsum.hpp index 2f633b52..84e20bea 100644 --- a/include/internal/routines/level1/xsum.h +++ b/src/routines/level1/xsum.hpp @@ -14,8 +14,8 @@ #ifndef CLBLAST_ROUTINES_XSUM_H_ #define CLBLAST_ROUTINES_XSUM_H_ -#include "internal/routine.h" -#include "internal/routines/level1/xasum.h" +#include "routine.hpp" +#include "routines/level1/xasum.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level1/xswap.cc b/src/routines/level1/xswap.cc index 27eb9b13..03907cbd 100644 --- a/src/routines/level1/xswap.cc +++ b/src/routines/level1/xswap.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level1/xswap.h" +#include "routines/level1/xswap.hpp" #include #include diff --git a/include/internal/routines/level1/xswap.h b/src/routines/level1/xswap.hpp similarity index 97% rename from include/internal/routines/level1/xswap.h rename to src/routines/level1/xswap.hpp index bd063afc..4f9ea36d 100644 --- a/include/internal/routines/level1/xswap.h +++ b/src/routines/level1/xswap.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XSWAP_H_ #define CLBLAST_ROUTINES_XSWAP_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xgbmv.cc b/src/routines/level2/xgbmv.cc index 7a30c34a..ea4f001c 100644 --- a/src/routines/level2/xgbmv.cc +++ b/src/routines/level2/xgbmv.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xgbmv.h" +#include "routines/level2/xgbmv.hpp" #include #include diff --git a/include/internal/routines/level2/xgbmv.h b/src/routines/level2/xgbmv.hpp similarity index 97% rename from include/internal/routines/level2/xgbmv.h rename to src/routines/level2/xgbmv.hpp index bc94c77d..686ab642 100644 --- a/include/internal/routines/level2/xgbmv.h +++ b/src/routines/level2/xgbmv.hpp @@ -16,7 +16,7 @@ #ifndef CLBLAST_ROUTINES_XGBMV_H_ #define CLBLAST_ROUTINES_XGBMV_H_ -#include "internal/routines/level2/xgemv.h" +#include "routines/level2/xgemv.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xgemv.cc b/src/routines/level2/xgemv.cc index ccadd131..21fb397c 100644 --- a/src/routines/level2/xgemv.cc +++ b/src/routines/level2/xgemv.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xgemv.h" +#include "routines/level2/xgemv.hpp" #include #include diff --git a/include/internal/routines/level2/xgemv.h b/src/routines/level2/xgemv.hpp similarity index 98% rename from include/internal/routines/level2/xgemv.h rename to src/routines/level2/xgemv.hpp index e9804c62..e9afec8d 100644 --- a/include/internal/routines/level2/xgemv.h +++ b/src/routines/level2/xgemv.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XGEMV_H_ #define CLBLAST_ROUTINES_XGEMV_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xger.cc b/src/routines/level2/xger.cc index 6ceaa00e..353047d2 100644 --- a/src/routines/level2/xger.cc +++ b/src/routines/level2/xger.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xger.h" +#include "routines/level2/xger.hpp" #include #include diff --git a/include/internal/routines/level2/xger.h b/src/routines/level2/xger.hpp similarity index 98% rename from include/internal/routines/level2/xger.h rename to src/routines/level2/xger.hpp index 184f8477..3c6abe44 100644 --- a/include/internal/routines/level2/xger.h +++ b/src/routines/level2/xger.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XGER_H_ #define CLBLAST_ROUTINES_XGER_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xgerc.cc b/src/routines/level2/xgerc.cc index 73284b52..d9feda97 100644 --- a/src/routines/level2/xgerc.cc +++ b/src/routines/level2/xgerc.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xgerc.h" +#include "routines/level2/xgerc.hpp" #include diff --git a/include/internal/routines/level2/xgerc.h b/src/routines/level2/xgerc.hpp similarity index 97% rename from include/internal/routines/level2/xgerc.h rename to src/routines/level2/xgerc.hpp index 6d06ef94..f1d04dfd 100644 --- a/include/internal/routines/level2/xgerc.h +++ b/src/routines/level2/xgerc.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XGERC_H_ #define CLBLAST_ROUTINES_XGERC_H_ -#include "internal/routines/level2/xger.h" +#include "routines/level2/xger.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xgeru.cc b/src/routines/level2/xgeru.cc index 7730d6a5..da9e91c2 100644 --- a/src/routines/level2/xgeru.cc +++ b/src/routines/level2/xgeru.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xgeru.h" +#include "routines/level2/xgeru.hpp" #include diff --git a/include/internal/routines/level2/xgeru.h b/src/routines/level2/xgeru.hpp similarity index 97% rename from include/internal/routines/level2/xgeru.h rename to src/routines/level2/xgeru.hpp index 45ce1cba..fb50e917 100644 --- a/include/internal/routines/level2/xgeru.h +++ b/src/routines/level2/xgeru.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XGERU_H_ #define CLBLAST_ROUTINES_XGERU_H_ -#include "internal/routines/level2/xger.h" +#include "routines/level2/xger.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xhbmv.cc b/src/routines/level2/xhbmv.cc index 58591b50..f6c0e3c4 100644 --- a/src/routines/level2/xhbmv.cc +++ b/src/routines/level2/xhbmv.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xhbmv.h" +#include "routines/level2/xhbmv.hpp" #include #include diff --git a/include/internal/routines/level2/xhbmv.h b/src/routines/level2/xhbmv.hpp similarity index 97% rename from include/internal/routines/level2/xhbmv.h rename to src/routines/level2/xhbmv.hpp index f0a6212c..d668eb88 100644 --- a/include/internal/routines/level2/xhbmv.h +++ b/src/routines/level2/xhbmv.hpp @@ -16,7 +16,7 @@ #ifndef CLBLAST_ROUTINES_XHBMV_H_ #define CLBLAST_ROUTINES_XHBMV_H_ -#include "internal/routines/level2/xgemv.h" +#include "routines/level2/xgemv.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xhemv.cc b/src/routines/level2/xhemv.cc index b4ef0fa4..2cbcf7b4 100644 --- a/src/routines/level2/xhemv.cc +++ b/src/routines/level2/xhemv.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xhemv.h" +#include "routines/level2/xhemv.hpp" #include #include diff --git a/include/internal/routines/level2/xhemv.h b/src/routines/level2/xhemv.hpp similarity index 97% rename from include/internal/routines/level2/xhemv.h rename to src/routines/level2/xhemv.hpp index 3daf2457..8e062fd3 100644 --- a/include/internal/routines/level2/xhemv.h +++ b/src/routines/level2/xhemv.hpp @@ -16,7 +16,7 @@ #ifndef CLBLAST_ROUTINES_XHEMV_H_ #define CLBLAST_ROUTINES_XHEMV_H_ -#include "internal/routines/level2/xgemv.h" +#include "routines/level2/xgemv.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xher.cc b/src/routines/level2/xher.cc index 939e17bb..ed8ba9e9 100644 --- a/src/routines/level2/xher.cc +++ b/src/routines/level2/xher.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xher.h" +#include "routines/level2/xher.hpp" #include diff --git a/include/internal/routines/level2/xher.h b/src/routines/level2/xher.hpp similarity index 98% rename from include/internal/routines/level2/xher.h rename to src/routines/level2/xher.hpp index fca8bb97..9ff6bf3f 100644 --- a/include/internal/routines/level2/xher.h +++ b/src/routines/level2/xher.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XHER_H_ #define CLBLAST_ROUTINES_XHER_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xher2.cc b/src/routines/level2/xher2.cc index 95dbd87a..50572cea 100644 --- a/src/routines/level2/xher2.cc +++ b/src/routines/level2/xher2.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xher2.h" +#include "routines/level2/xher2.hpp" #include diff --git a/include/internal/routines/level2/xher2.h b/src/routines/level2/xher2.hpp similarity index 98% rename from include/internal/routines/level2/xher2.h rename to src/routines/level2/xher2.hpp index 9a7610f1..8c53c047 100644 --- a/include/internal/routines/level2/xher2.h +++ b/src/routines/level2/xher2.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XHER2_H_ #define CLBLAST_ROUTINES_XHER2_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xhpmv.cc b/src/routines/level2/xhpmv.cc index 92686dbe..e6f82b34 100644 --- a/src/routines/level2/xhpmv.cc +++ b/src/routines/level2/xhpmv.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xhpmv.h" +#include "routines/level2/xhpmv.hpp" #include #include diff --git a/include/internal/routines/level2/xhpmv.h b/src/routines/level2/xhpmv.hpp similarity index 97% rename from include/internal/routines/level2/xhpmv.h rename to src/routines/level2/xhpmv.hpp index a1d5595a..b11192f9 100644 --- a/include/internal/routines/level2/xhpmv.h +++ b/src/routines/level2/xhpmv.hpp @@ -16,7 +16,7 @@ #ifndef CLBLAST_ROUTINES_XHPMV_H_ #define CLBLAST_ROUTINES_XHPMV_H_ -#include "internal/routines/level2/xgemv.h" +#include "routines/level2/xgemv.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xhpr.cc b/src/routines/level2/xhpr.cc index 4b31ad09..225ebfe5 100644 --- a/src/routines/level2/xhpr.cc +++ b/src/routines/level2/xhpr.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xhpr.h" +#include "routines/level2/xhpr.hpp" #include diff --git a/include/internal/routines/level2/xhpr.h b/src/routines/level2/xhpr.hpp similarity index 97% rename from include/internal/routines/level2/xhpr.h rename to src/routines/level2/xhpr.hpp index 6554d74c..37801c68 100644 --- a/include/internal/routines/level2/xhpr.h +++ b/src/routines/level2/xhpr.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XHPR_H_ #define CLBLAST_ROUTINES_XHPR_H_ -#include "internal/routines/level2/xher.h" +#include "routines/level2/xher.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xhpr2.cc b/src/routines/level2/xhpr2.cc index 9be24f43..85f9d3f9 100644 --- a/src/routines/level2/xhpr2.cc +++ b/src/routines/level2/xhpr2.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xhpr2.h" +#include "routines/level2/xhpr2.hpp" #include diff --git a/include/internal/routines/level2/xhpr2.h b/src/routines/level2/xhpr2.hpp similarity index 97% rename from include/internal/routines/level2/xhpr2.h rename to src/routines/level2/xhpr2.hpp index d95e7b61..d66dce55 100644 --- a/include/internal/routines/level2/xhpr2.h +++ b/src/routines/level2/xhpr2.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XHPR2_H_ #define CLBLAST_ROUTINES_XHPR2_H_ -#include "internal/routines/level2/xher2.h" +#include "routines/level2/xher2.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xsbmv.cc b/src/routines/level2/xsbmv.cc index 66ba74e8..28730899 100644 --- a/src/routines/level2/xsbmv.cc +++ b/src/routines/level2/xsbmv.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xsbmv.h" +#include "routines/level2/xsbmv.hpp" #include #include diff --git a/include/internal/routines/level2/xsbmv.h b/src/routines/level2/xsbmv.hpp similarity index 97% rename from include/internal/routines/level2/xsbmv.h rename to src/routines/level2/xsbmv.hpp index 4328e377..16c5e9a8 100644 --- a/include/internal/routines/level2/xsbmv.h +++ b/src/routines/level2/xsbmv.hpp @@ -16,7 +16,7 @@ #ifndef CLBLAST_ROUTINES_XSBMV_H_ #define CLBLAST_ROUTINES_XSBMV_H_ -#include "internal/routines/level2/xgemv.h" +#include "routines/level2/xgemv.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xspmv.cc b/src/routines/level2/xspmv.cc index 589a97d4..f6651012 100644 --- a/src/routines/level2/xspmv.cc +++ b/src/routines/level2/xspmv.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xspmv.h" +#include "routines/level2/xspmv.hpp" #include #include diff --git a/include/internal/routines/level2/xspmv.h b/src/routines/level2/xspmv.hpp similarity index 97% rename from include/internal/routines/level2/xspmv.h rename to src/routines/level2/xspmv.hpp index ca3e28b6..a0c69b85 100644 --- a/include/internal/routines/level2/xspmv.h +++ b/src/routines/level2/xspmv.hpp @@ -16,7 +16,7 @@ #ifndef CLBLAST_ROUTINES_XSPMV_H_ #define CLBLAST_ROUTINES_XSPMV_H_ -#include "internal/routines/level2/xgemv.h" +#include "routines/level2/xgemv.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xspr.cc b/src/routines/level2/xspr.cc index c556b920..a75fe9c3 100644 --- a/src/routines/level2/xspr.cc +++ b/src/routines/level2/xspr.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xspr.h" +#include "routines/level2/xspr.hpp" #include diff --git a/include/internal/routines/level2/xspr.h b/src/routines/level2/xspr.hpp similarity index 97% rename from include/internal/routines/level2/xspr.h rename to src/routines/level2/xspr.hpp index 7e91abc5..6468c736 100644 --- a/include/internal/routines/level2/xspr.h +++ b/src/routines/level2/xspr.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XSPR_H_ #define CLBLAST_ROUTINES_XSPR_H_ -#include "internal/routines/level2/xher.h" +#include "routines/level2/xher.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xspr2.cc b/src/routines/level2/xspr2.cc index c4ad5dc4..c39a2eb4 100644 --- a/src/routines/level2/xspr2.cc +++ b/src/routines/level2/xspr2.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xspr2.h" +#include "routines/level2/xspr2.hpp" #include diff --git a/include/internal/routines/level2/xspr2.h b/src/routines/level2/xspr2.hpp similarity index 97% rename from include/internal/routines/level2/xspr2.h rename to src/routines/level2/xspr2.hpp index a34be8e8..693c56a1 100644 --- a/include/internal/routines/level2/xspr2.h +++ b/src/routines/level2/xspr2.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XSPR2_H_ #define CLBLAST_ROUTINES_XSPR2_H_ -#include "internal/routines/level2/xher2.h" +#include "routines/level2/xher2.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xsymv.cc b/src/routines/level2/xsymv.cc index 2a404a8a..648d2a3e 100644 --- a/src/routines/level2/xsymv.cc +++ b/src/routines/level2/xsymv.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xsymv.h" +#include "routines/level2/xsymv.hpp" #include #include diff --git a/include/internal/routines/level2/xsymv.h b/src/routines/level2/xsymv.hpp similarity index 97% rename from include/internal/routines/level2/xsymv.h rename to src/routines/level2/xsymv.hpp index 98a0ce88..67815f2f 100644 --- a/include/internal/routines/level2/xsymv.h +++ b/src/routines/level2/xsymv.hpp @@ -16,7 +16,7 @@ #ifndef CLBLAST_ROUTINES_XSYMV_H_ #define CLBLAST_ROUTINES_XSYMV_H_ -#include "internal/routines/level2/xgemv.h" +#include "routines/level2/xgemv.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xsyr.cc b/src/routines/level2/xsyr.cc index 892517d7..758d8f8f 100644 --- a/src/routines/level2/xsyr.cc +++ b/src/routines/level2/xsyr.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xsyr.h" +#include "routines/level2/xsyr.hpp" #include diff --git a/include/internal/routines/level2/xsyr.h b/src/routines/level2/xsyr.hpp similarity index 97% rename from include/internal/routines/level2/xsyr.h rename to src/routines/level2/xsyr.hpp index f88498ae..20393454 100644 --- a/include/internal/routines/level2/xsyr.h +++ b/src/routines/level2/xsyr.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XSYR_H_ #define CLBLAST_ROUTINES_XSYR_H_ -#include "internal/routines/level2/xher.h" +#include "routines/level2/xher.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xsyr2.cc b/src/routines/level2/xsyr2.cc index e6dfd158..6f43b219 100644 --- a/src/routines/level2/xsyr2.cc +++ b/src/routines/level2/xsyr2.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xsyr2.h" +#include "routines/level2/xsyr2.hpp" #include diff --git a/include/internal/routines/level2/xsyr2.h b/src/routines/level2/xsyr2.hpp similarity index 97% rename from include/internal/routines/level2/xsyr2.h rename to src/routines/level2/xsyr2.hpp index d2d3143a..1a8dcbe8 100644 --- a/include/internal/routines/level2/xsyr2.h +++ b/src/routines/level2/xsyr2.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XSYR2_H_ #define CLBLAST_ROUTINES_XSYR2_H_ -#include "internal/routines/level2/xher2.h" +#include "routines/level2/xher2.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xtbmv.cc b/src/routines/level2/xtbmv.cc index 86e28dfb..e315c544 100644 --- a/src/routines/level2/xtbmv.cc +++ b/src/routines/level2/xtbmv.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xtbmv.h" +#include "routines/level2/xtbmv.hpp" #include #include diff --git a/include/internal/routines/level2/xtbmv.h b/src/routines/level2/xtbmv.hpp similarity index 97% rename from include/internal/routines/level2/xtbmv.h rename to src/routines/level2/xtbmv.hpp index 493a9853..389e9705 100644 --- a/include/internal/routines/level2/xtbmv.h +++ b/src/routines/level2/xtbmv.hpp @@ -16,7 +16,7 @@ #ifndef CLBLAST_ROUTINES_XTBMV_H_ #define CLBLAST_ROUTINES_XTBMV_H_ -#include "internal/routines/level2/xgemv.h" +#include "routines/level2/xgemv.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xtpmv.cc b/src/routines/level2/xtpmv.cc index 72445547..46811089 100644 --- a/src/routines/level2/xtpmv.cc +++ b/src/routines/level2/xtpmv.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xtpmv.h" +#include "routines/level2/xtpmv.hpp" #include #include diff --git a/include/internal/routines/level2/xtpmv.h b/src/routines/level2/xtpmv.hpp similarity index 97% rename from include/internal/routines/level2/xtpmv.h rename to src/routines/level2/xtpmv.hpp index ce5cae6f..0e8cf1d2 100644 --- a/include/internal/routines/level2/xtpmv.h +++ b/src/routines/level2/xtpmv.hpp @@ -16,7 +16,7 @@ #ifndef CLBLAST_ROUTINES_XTPMV_H_ #define CLBLAST_ROUTINES_XTPMV_H_ -#include "internal/routines/level2/xgemv.h" +#include "routines/level2/xgemv.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level2/xtrmv.cc b/src/routines/level2/xtrmv.cc index df6f85a3..d2f24252 100644 --- a/src/routines/level2/xtrmv.cc +++ b/src/routines/level2/xtrmv.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level2/xtrmv.h" +#include "routines/level2/xtrmv.hpp" #include #include diff --git a/include/internal/routines/level2/xtrmv.h b/src/routines/level2/xtrmv.hpp similarity index 97% rename from include/internal/routines/level2/xtrmv.h rename to src/routines/level2/xtrmv.hpp index 4407bad7..07dd7841 100644 --- a/include/internal/routines/level2/xtrmv.h +++ b/src/routines/level2/xtrmv.hpp @@ -16,7 +16,7 @@ #ifndef CLBLAST_ROUTINES_XTRMV_H_ #define CLBLAST_ROUTINES_XTRMV_H_ -#include "internal/routines/level2/xgemv.h" +#include "routines/level2/xgemv.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level3/xgemm.cc b/src/routines/level3/xgemm.cc index 8386ad09..9ea5559c 100644 --- a/src/routines/level3/xgemm.cc +++ b/src/routines/level3/xgemm.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level3/xgemm.h" +#include "routines/level3/xgemm.hpp" #include #include diff --git a/include/internal/routines/level3/xgemm.h b/src/routines/level3/xgemm.hpp similarity index 98% rename from include/internal/routines/level3/xgemm.h rename to src/routines/level3/xgemm.hpp index c0541eef..71723d78 100644 --- a/include/internal/routines/level3/xgemm.h +++ b/src/routines/level3/xgemm.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XGEMM_H_ #define CLBLAST_ROUTINES_XGEMM_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level3/xhemm.cc b/src/routines/level3/xhemm.cc index 8120c09c..9813503e 100644 --- a/src/routines/level3/xhemm.cc +++ b/src/routines/level3/xhemm.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level3/xhemm.h" +#include "routines/level3/xhemm.hpp" #include #include diff --git a/include/internal/routines/level3/xhemm.h b/src/routines/level3/xhemm.hpp similarity index 97% rename from include/internal/routines/level3/xhemm.h rename to src/routines/level3/xhemm.hpp index e0f35669..d79b42a1 100644 --- a/include/internal/routines/level3/xhemm.h +++ b/src/routines/level3/xhemm.hpp @@ -15,7 +15,7 @@ #ifndef CLBLAST_ROUTINES_XHEMM_H_ #define CLBLAST_ROUTINES_XHEMM_H_ -#include "internal/routines/level3/xgemm.h" +#include "routines/level3/xgemm.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level3/xher2k.cc b/src/routines/level3/xher2k.cc index bd0f83dd..bd7a053e 100644 --- a/src/routines/level3/xher2k.cc +++ b/src/routines/level3/xher2k.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level3/xher2k.h" +#include "routines/level3/xher2k.hpp" #include #include diff --git a/include/internal/routines/level3/xher2k.h b/src/routines/level3/xher2k.hpp similarity index 98% rename from include/internal/routines/level3/xher2k.h rename to src/routines/level3/xher2k.hpp index b7764e18..23996219 100644 --- a/include/internal/routines/level3/xher2k.h +++ b/src/routines/level3/xher2k.hpp @@ -16,7 +16,7 @@ #ifndef CLBLAST_ROUTINES_XHER2K_H_ #define CLBLAST_ROUTINES_XHER2K_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level3/xherk.cc b/src/routines/level3/xherk.cc index 6155734a..6ef7f21f 100644 --- a/src/routines/level3/xherk.cc +++ b/src/routines/level3/xherk.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level3/xherk.h" +#include "routines/level3/xherk.hpp" #include #include diff --git a/include/internal/routines/level3/xherk.h b/src/routines/level3/xherk.hpp similarity index 98% rename from include/internal/routines/level3/xherk.h rename to src/routines/level3/xherk.hpp index abcf4c1a..3f156a1b 100644 --- a/include/internal/routines/level3/xherk.h +++ b/src/routines/level3/xherk.hpp @@ -16,7 +16,7 @@ #ifndef CLBLAST_ROUTINES_XHERK_H_ #define CLBLAST_ROUTINES_XHERK_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level3/xsymm.cc b/src/routines/level3/xsymm.cc index c5e56617..04e4b718 100644 --- a/src/routines/level3/xsymm.cc +++ b/src/routines/level3/xsymm.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level3/xsymm.h" +#include "routines/level3/xsymm.hpp" #include #include diff --git a/include/internal/routines/level3/xsymm.h b/src/routines/level3/xsymm.hpp similarity index 98% rename from include/internal/routines/level3/xsymm.h rename to src/routines/level3/xsymm.hpp index 889abfb7..754dd7a0 100644 --- a/include/internal/routines/level3/xsymm.h +++ b/src/routines/level3/xsymm.hpp @@ -17,7 +17,7 @@ #ifndef CLBLAST_ROUTINES_XSYMM_H_ #define CLBLAST_ROUTINES_XSYMM_H_ -#include "internal/routines/level3/xgemm.h" +#include "routines/level3/xgemm.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level3/xsyr2k.cc b/src/routines/level3/xsyr2k.cc index f9655889..424d4d2d 100644 --- a/src/routines/level3/xsyr2k.cc +++ b/src/routines/level3/xsyr2k.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level3/xsyr2k.h" +#include "routines/level3/xsyr2k.hpp" #include #include diff --git a/include/internal/routines/level3/xsyr2k.h b/src/routines/level3/xsyr2k.hpp similarity index 98% rename from include/internal/routines/level3/xsyr2k.h rename to src/routines/level3/xsyr2k.hpp index f75c91e5..56185653 100644 --- a/include/internal/routines/level3/xsyr2k.h +++ b/src/routines/level3/xsyr2k.hpp @@ -16,7 +16,7 @@ #ifndef CLBLAST_ROUTINES_XSYR2K_H_ #define CLBLAST_ROUTINES_XSYR2K_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level3/xsyrk.cc b/src/routines/level3/xsyrk.cc index bceb6afd..f56c232b 100644 --- a/src/routines/level3/xsyrk.cc +++ b/src/routines/level3/xsyrk.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level3/xsyrk.h" +#include "routines/level3/xsyrk.hpp" #include #include diff --git a/include/internal/routines/level3/xsyrk.h b/src/routines/level3/xsyrk.hpp similarity index 98% rename from include/internal/routines/level3/xsyrk.h rename to src/routines/level3/xsyrk.hpp index 0710fa74..7c075c26 100644 --- a/include/internal/routines/level3/xsyrk.h +++ b/src/routines/level3/xsyrk.hpp @@ -18,7 +18,7 @@ #ifndef CLBLAST_ROUTINES_XSYRK_H_ #define CLBLAST_ROUTINES_XSYRK_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/level3/xtrmm.cc b/src/routines/level3/xtrmm.cc index 92dda9fb..74a82822 100644 --- a/src/routines/level3/xtrmm.cc +++ b/src/routines/level3/xtrmm.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/level3/xtrmm.h" +#include "routines/level3/xtrmm.hpp" #include #include diff --git a/include/internal/routines/level3/xtrmm.h b/src/routines/level3/xtrmm.hpp similarity index 97% rename from include/internal/routines/level3/xtrmm.h rename to src/routines/level3/xtrmm.hpp index e18ad17a..bb435592 100644 --- a/include/internal/routines/level3/xtrmm.h +++ b/src/routines/level3/xtrmm.hpp @@ -16,7 +16,7 @@ #ifndef CLBLAST_ROUTINES_XTRMM_H_ #define CLBLAST_ROUTINES_XTRMM_H_ -#include "internal/routines/level3/xgemm.h" +#include "routines/level3/xgemm.hpp" namespace clblast { // ================================================================================================= diff --git a/src/routines/levelx/xomatcopy.cc b/src/routines/levelx/xomatcopy.cc index 6e4bddb2..e8593301 100644 --- a/src/routines/levelx/xomatcopy.cc +++ b/src/routines/levelx/xomatcopy.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/routines/levelx/xomatcopy.h" +#include "routines/levelx/xomatcopy.hpp" #include #include diff --git a/include/internal/routines/levelx/xomatcopy.h b/src/routines/levelx/xomatcopy.hpp similarity index 98% rename from include/internal/routines/levelx/xomatcopy.h rename to src/routines/levelx/xomatcopy.hpp index d2acb50d..0e580230 100644 --- a/include/internal/routines/levelx/xomatcopy.h +++ b/src/routines/levelx/xomatcopy.hpp @@ -14,7 +14,7 @@ #ifndef CLBLAST_ROUTINES_XOMATCOPY_H_ #define CLBLAST_ROUTINES_XOMATCOPY_H_ -#include "internal/routine.h" +#include "routine.hpp" namespace clblast { // ================================================================================================= diff --git a/src/tuning/copy_fast.cc b/src/tuning/kernels/copy_fast.cc similarity index 98% rename from src/tuning/copy_fast.cc rename to src/tuning/kernels/copy_fast.cc index 09fdbaba..34269bc7 100644 --- a/src/tuning/copy_fast.cc +++ b/src/tuning/kernels/copy_fast.cc @@ -14,8 +14,8 @@ #include #include -#include "internal/utilities.h" -#include "internal/tuning.h" +#include "utilities.hpp" +#include "tuning/tuning.hpp" namespace clblast { // ================================================================================================= diff --git a/src/tuning/copy_pad.cc b/src/tuning/kernels/copy_pad.cc similarity index 98% rename from src/tuning/copy_pad.cc rename to src/tuning/kernels/copy_pad.cc index 7088b3bf..1e0dccd3 100644 --- a/src/tuning/copy_pad.cc +++ b/src/tuning/kernels/copy_pad.cc @@ -14,8 +14,8 @@ #include #include -#include "internal/utilities.h" -#include "internal/tuning.h" +#include "utilities.hpp" +#include "tuning/tuning.hpp" namespace clblast { // ================================================================================================= diff --git a/src/tuning/transpose_fast.cc b/src/tuning/kernels/transpose_fast.cc similarity index 98% rename from src/tuning/transpose_fast.cc rename to src/tuning/kernels/transpose_fast.cc index 3b0bdeb5..7ac19cb6 100644 --- a/src/tuning/transpose_fast.cc +++ b/src/tuning/kernels/transpose_fast.cc @@ -14,8 +14,8 @@ #include #include -#include "internal/utilities.h" -#include "internal/tuning.h" +#include "utilities.hpp" +#include "tuning/tuning.hpp" namespace clblast { // ================================================================================================= diff --git a/src/tuning/transpose_pad.cc b/src/tuning/kernels/transpose_pad.cc similarity index 98% rename from src/tuning/transpose_pad.cc rename to src/tuning/kernels/transpose_pad.cc index b9ab3ffa..63274415 100644 --- a/src/tuning/transpose_pad.cc +++ b/src/tuning/kernels/transpose_pad.cc @@ -14,8 +14,8 @@ #include #include -#include "internal/utilities.h" -#include "internal/tuning.h" +#include "utilities.hpp" +#include "tuning/tuning.hpp" namespace clblast { // ================================================================================================= diff --git a/src/tuning/xaxpy.cc b/src/tuning/kernels/xaxpy.cc similarity index 98% rename from src/tuning/xaxpy.cc rename to src/tuning/kernels/xaxpy.cc index d27cb73d..88d12c1f 100644 --- a/src/tuning/xaxpy.cc +++ b/src/tuning/kernels/xaxpy.cc @@ -14,8 +14,8 @@ #include #include -#include "internal/utilities.h" -#include "internal/tuning.h" +#include "utilities.hpp" +#include "tuning/tuning.hpp" namespace clblast { // ================================================================================================= diff --git a/src/tuning/xdot.cc b/src/tuning/kernels/xdot.cc similarity index 99% rename from src/tuning/xdot.cc rename to src/tuning/kernels/xdot.cc index 5f30296c..1581e13f 100644 --- a/src/tuning/xdot.cc +++ b/src/tuning/kernels/xdot.cc @@ -15,8 +15,8 @@ #include #include -#include "internal/utilities.h" -#include "internal/tuning.h" +#include "utilities.hpp" +#include "tuning/tuning.hpp" namespace clblast { // ================================================================================================= diff --git a/src/tuning/xgemm.cc b/src/tuning/kernels/xgemm.cc similarity index 99% rename from src/tuning/xgemm.cc rename to src/tuning/kernels/xgemm.cc index d309b830..4b1efdef 100644 --- a/src/tuning/xgemm.cc +++ b/src/tuning/kernels/xgemm.cc @@ -14,8 +14,8 @@ #include #include -#include "internal/utilities.h" -#include "internal/tuning.h" +#include "utilities.hpp" +#include "tuning/tuning.hpp" namespace clblast { // ================================================================================================= diff --git a/src/tuning/xgemv.cc b/src/tuning/kernels/xgemv.cc similarity index 99% rename from src/tuning/xgemv.cc rename to src/tuning/kernels/xgemv.cc index 6587dcf4..d42155ae 100644 --- a/src/tuning/xgemv.cc +++ b/src/tuning/kernels/xgemv.cc @@ -17,8 +17,8 @@ #include #include -#include "internal/utilities.h" -#include "internal/tuning.h" +#include "utilities.hpp" +#include "tuning/tuning.hpp" namespace clblast { // ================================================================================================= diff --git a/src/tuning/xger.cc b/src/tuning/kernels/xger.cc similarity index 98% rename from src/tuning/xger.cc rename to src/tuning/kernels/xger.cc index 4be80c86..d2590c53 100644 --- a/src/tuning/xger.cc +++ b/src/tuning/kernels/xger.cc @@ -14,8 +14,8 @@ #include #include -#include "internal/utilities.h" -#include "internal/tuning.h" +#include "utilities.hpp" +#include "tuning/tuning.hpp" namespace clblast { // ================================================================================================= diff --git a/include/internal/tuning.h b/src/tuning/tuning.hpp similarity index 99% rename from include/internal/tuning.h rename to src/tuning/tuning.hpp index a44f79d6..19df5f9a 100644 --- a/include/internal/tuning.h +++ b/src/tuning/tuning.hpp @@ -20,7 +20,7 @@ #include -#include "internal/utilities.h" +#include "utilities.hpp" namespace clblast { // ================================================================================================= diff --git a/src/utilities.cc b/src/utilities.cc index 30b09a5f..e3a1fb75 100644 --- a/src/utilities.cc +++ b/src/utilities.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "internal/utilities.h" +#include "utilities.hpp" #include #include diff --git a/include/internal/utilities.h b/src/utilities.hpp similarity index 99% rename from include/internal/utilities.h rename to src/utilities.hpp index 7092bcdd..9a2b9ffc 100644 --- a/include/internal/utilities.h +++ b/src/utilities.hpp @@ -23,7 +23,7 @@ #include "clblast.h" #include "clblast_half.h" -#include "internal/clpp11.h" +#include "clpp11.hpp" namespace clblast { // ================================================================================================= diff --git a/test/correctness/routines/level1/xamax.cc b/test/correctness/routines/level1/xamax.cc index 21400a40..607637e8 100644 --- a/test/correctness/routines/level1/xamax.cc +++ b/test/correctness/routines/level1/xamax.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level1/xamax.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level1/xamax.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level1/xasum.cc b/test/correctness/routines/level1/xasum.cc index f48d1d4b..e22e42a6 100644 --- a/test/correctness/routines/level1/xasum.cc +++ b/test/correctness/routines/level1/xasum.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level1/xasum.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level1/xasum.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level1/xaxpy.cc b/test/correctness/routines/level1/xaxpy.cc index 85649a04..064172fa 100644 --- a/test/correctness/routines/level1/xaxpy.cc +++ b/test/correctness/routines/level1/xaxpy.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level1/xaxpy.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level1/xaxpy.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level1/xcopy.cc b/test/correctness/routines/level1/xcopy.cc index b89baabf..e6f2581b 100644 --- a/test/correctness/routines/level1/xcopy.cc +++ b/test/correctness/routines/level1/xcopy.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level1/xcopy.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level1/xcopy.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level1/xdot.cc b/test/correctness/routines/level1/xdot.cc index 3a353e2e..080250cb 100644 --- a/test/correctness/routines/level1/xdot.cc +++ b/test/correctness/routines/level1/xdot.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level1/xdot.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level1/xdot.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level1/xdotc.cc b/test/correctness/routines/level1/xdotc.cc index 195b0847..2a7bbeca 100644 --- a/test/correctness/routines/level1/xdotc.cc +++ b/test/correctness/routines/level1/xdotc.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level1/xdotc.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level1/xdotc.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level1/xdotu.cc b/test/correctness/routines/level1/xdotu.cc index 7a501052..1047d021 100644 --- a/test/correctness/routines/level1/xdotu.cc +++ b/test/correctness/routines/level1/xdotu.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level1/xdotu.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level1/xdotu.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level1/xnrm2.cc b/test/correctness/routines/level1/xnrm2.cc index 02ea57cb..142fa7ba 100644 --- a/test/correctness/routines/level1/xnrm2.cc +++ b/test/correctness/routines/level1/xnrm2.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level1/xnrm2.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level1/xnrm2.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level1/xrot.cc b/test/correctness/routines/level1/xrot.cc index 8ffcd6af..5af358eb 100644 --- a/test/correctness/routines/level1/xrot.cc +++ b/test/correctness/routines/level1/xrot.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level1/xrot.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level1/xrot.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level1/xrotg.cc b/test/correctness/routines/level1/xrotg.cc index c8480673..ad23a554 100644 --- a/test/correctness/routines/level1/xrotg.cc +++ b/test/correctness/routines/level1/xrotg.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level1/xrotg.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level1/xrotg.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level1/xrotm.cc b/test/correctness/routines/level1/xrotm.cc index 196e0de9..4f7e8f15 100644 --- a/test/correctness/routines/level1/xrotm.cc +++ b/test/correctness/routines/level1/xrotm.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level1/xrotm.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level1/xrotm.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level1/xrotmg.cc b/test/correctness/routines/level1/xrotmg.cc index e4dd712b..ca89bc12 100644 --- a/test/correctness/routines/level1/xrotmg.cc +++ b/test/correctness/routines/level1/xrotmg.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level1/xrotmg.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level1/xrotmg.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level1/xscal.cc b/test/correctness/routines/level1/xscal.cc index a3de54b0..939524be 100644 --- a/test/correctness/routines/level1/xscal.cc +++ b/test/correctness/routines/level1/xscal.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level1/xscal.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level1/xscal.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level1/xswap.cc b/test/correctness/routines/level1/xswap.cc index dab60669..446f3d65 100644 --- a/test/correctness/routines/level1/xswap.cc +++ b/test/correctness/routines/level1/xswap.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level1/xswap.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level1/xswap.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xgbmv.cc b/test/correctness/routines/level2/xgbmv.cc index f2e69225..8c49bc65 100644 --- a/test/correctness/routines/level2/xgbmv.cc +++ b/test/correctness/routines/level2/xgbmv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xgbmv.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xgbmv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xgemv.cc b/test/correctness/routines/level2/xgemv.cc index 5b67f0ad..902ae777 100644 --- a/test/correctness/routines/level2/xgemv.cc +++ b/test/correctness/routines/level2/xgemv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xgemv.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xgemv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xger.cc b/test/correctness/routines/level2/xger.cc index 05c782db..ce61bbcb 100644 --- a/test/correctness/routines/level2/xger.cc +++ b/test/correctness/routines/level2/xger.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xger.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xger.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xgerc.cc b/test/correctness/routines/level2/xgerc.cc index 6fd80f9f..b747f20d 100644 --- a/test/correctness/routines/level2/xgerc.cc +++ b/test/correctness/routines/level2/xgerc.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xgerc.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xgerc.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xgeru.cc b/test/correctness/routines/level2/xgeru.cc index 84b88c42..f80c1e2b 100644 --- a/test/correctness/routines/level2/xgeru.cc +++ b/test/correctness/routines/level2/xgeru.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xgeru.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xgeru.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xhbmv.cc b/test/correctness/routines/level2/xhbmv.cc index 020c5dc3..a4885c01 100644 --- a/test/correctness/routines/level2/xhbmv.cc +++ b/test/correctness/routines/level2/xhbmv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xhbmv.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xhbmv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xhemv.cc b/test/correctness/routines/level2/xhemv.cc index fcd4e68f..4318ffee 100644 --- a/test/correctness/routines/level2/xhemv.cc +++ b/test/correctness/routines/level2/xhemv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xhemv.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xhemv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xher.cc b/test/correctness/routines/level2/xher.cc index 0420a9e8..fe37bd76 100644 --- a/test/correctness/routines/level2/xher.cc +++ b/test/correctness/routines/level2/xher.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xher.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xher.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xher2.cc b/test/correctness/routines/level2/xher2.cc index 36d7db94..0b4af4d0 100644 --- a/test/correctness/routines/level2/xher2.cc +++ b/test/correctness/routines/level2/xher2.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xher2.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xher2.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xhpmv.cc b/test/correctness/routines/level2/xhpmv.cc index df7121eb..dd77df71 100644 --- a/test/correctness/routines/level2/xhpmv.cc +++ b/test/correctness/routines/level2/xhpmv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xhpmv.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xhpmv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xhpr.cc b/test/correctness/routines/level2/xhpr.cc index c13802ea..5a3f615f 100644 --- a/test/correctness/routines/level2/xhpr.cc +++ b/test/correctness/routines/level2/xhpr.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xhpr.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xhpr.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xhpr2.cc b/test/correctness/routines/level2/xhpr2.cc index 7c62c255..8218b444 100644 --- a/test/correctness/routines/level2/xhpr2.cc +++ b/test/correctness/routines/level2/xhpr2.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xhpr2.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xhpr2.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xsbmv.cc b/test/correctness/routines/level2/xsbmv.cc index a0af3c25..7918cb21 100644 --- a/test/correctness/routines/level2/xsbmv.cc +++ b/test/correctness/routines/level2/xsbmv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xsbmv.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xsbmv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xspmv.cc b/test/correctness/routines/level2/xspmv.cc index 39ded21b..78210660 100644 --- a/test/correctness/routines/level2/xspmv.cc +++ b/test/correctness/routines/level2/xspmv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xspmv.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xspmv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xspr.cc b/test/correctness/routines/level2/xspr.cc index 2e807a1e..d05adf34 100644 --- a/test/correctness/routines/level2/xspr.cc +++ b/test/correctness/routines/level2/xspr.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xspr.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xspr.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xspr2.cc b/test/correctness/routines/level2/xspr2.cc index a009bc70..caa46a09 100644 --- a/test/correctness/routines/level2/xspr2.cc +++ b/test/correctness/routines/level2/xspr2.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xspr2.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xspr2.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xsymv.cc b/test/correctness/routines/level2/xsymv.cc index 0a0cb002..978a5f8a 100644 --- a/test/correctness/routines/level2/xsymv.cc +++ b/test/correctness/routines/level2/xsymv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xsymv.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xsymv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xsyr.cc b/test/correctness/routines/level2/xsyr.cc index 4015a696..244dbfb4 100644 --- a/test/correctness/routines/level2/xsyr.cc +++ b/test/correctness/routines/level2/xsyr.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xsyr.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xsyr.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xsyr2.cc b/test/correctness/routines/level2/xsyr2.cc index 4bf57a87..422e67ad 100644 --- a/test/correctness/routines/level2/xsyr2.cc +++ b/test/correctness/routines/level2/xsyr2.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xsyr2.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xsyr2.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xtbmv.cc b/test/correctness/routines/level2/xtbmv.cc index 78b05518..491708ec 100644 --- a/test/correctness/routines/level2/xtbmv.cc +++ b/test/correctness/routines/level2/xtbmv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xtbmv.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xtbmv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xtbsv.cc b/test/correctness/routines/level2/xtbsv.cc index 0026502a..12b5dca5 100644 --- a/test/correctness/routines/level2/xtbsv.cc +++ b/test/correctness/routines/level2/xtbsv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xtbsv.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xtbsv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xtpmv.cc b/test/correctness/routines/level2/xtpmv.cc index 00078c6c..b89f0adc 100644 --- a/test/correctness/routines/level2/xtpmv.cc +++ b/test/correctness/routines/level2/xtpmv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xtpmv.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xtpmv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xtpsv.cc b/test/correctness/routines/level2/xtpsv.cc index f0ff939e..6e6e7c85 100644 --- a/test/correctness/routines/level2/xtpsv.cc +++ b/test/correctness/routines/level2/xtpsv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xtpsv.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xtpsv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xtrmv.cc b/test/correctness/routines/level2/xtrmv.cc index 22138806..819f5cad 100644 --- a/test/correctness/routines/level2/xtrmv.cc +++ b/test/correctness/routines/level2/xtrmv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xtrmv.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xtrmv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level2/xtrsv.cc b/test/correctness/routines/level2/xtrsv.cc index 0bd71fac..78e33807 100644 --- a/test/correctness/routines/level2/xtrsv.cc +++ b/test/correctness/routines/level2/xtrsv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level2/xtrsv.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level2/xtrsv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level3/xgemm.cc b/test/correctness/routines/level3/xgemm.cc index 869463ee..54d41719 100644 --- a/test/correctness/routines/level3/xgemm.cc +++ b/test/correctness/routines/level3/xgemm.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level3/xgemm.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level3/xgemm.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level3/xhemm.cc b/test/correctness/routines/level3/xhemm.cc index 8261fd31..76c970a7 100644 --- a/test/correctness/routines/level3/xhemm.cc +++ b/test/correctness/routines/level3/xhemm.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level3/xhemm.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level3/xhemm.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level3/xher2k.cc b/test/correctness/routines/level3/xher2k.cc index 381071c8..c653265e 100644 --- a/test/correctness/routines/level3/xher2k.cc +++ b/test/correctness/routines/level3/xher2k.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level3/xher2k.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level3/xher2k.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level3/xherk.cc b/test/correctness/routines/level3/xherk.cc index a5efb263..09ea9e4d 100644 --- a/test/correctness/routines/level3/xherk.cc +++ b/test/correctness/routines/level3/xherk.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level3/xherk.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level3/xherk.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level3/xsymm.cc b/test/correctness/routines/level3/xsymm.cc index 9005f6e6..3cb3515a 100644 --- a/test/correctness/routines/level3/xsymm.cc +++ b/test/correctness/routines/level3/xsymm.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level3/xsymm.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level3/xsymm.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level3/xsyr2k.cc b/test/correctness/routines/level3/xsyr2k.cc index 2d131f21..617af04d 100644 --- a/test/correctness/routines/level3/xsyr2k.cc +++ b/test/correctness/routines/level3/xsyr2k.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level3/xsyr2k.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level3/xsyr2k.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level3/xsyrk.cc b/test/correctness/routines/level3/xsyrk.cc index 32e19ed6..2014b8d0 100644 --- a/test/correctness/routines/level3/xsyrk.cc +++ b/test/correctness/routines/level3/xsyrk.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level3/xsyrk.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level3/xsyrk.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level3/xtrmm.cc b/test/correctness/routines/level3/xtrmm.cc index 3eb89829..32640d52 100644 --- a/test/correctness/routines/level3/xtrmm.cc +++ b/test/correctness/routines/level3/xtrmm.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level3/xtrmm.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level3/xtrmm.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/level3/xtrsm.cc b/test/correctness/routines/level3/xtrsm.cc index f3637e2e..6119bd17 100644 --- a/test/correctness/routines/level3/xtrsm.cc +++ b/test/correctness/routines/level3/xtrsm.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/level3/xtrsm.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/level3/xtrsm.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/routines/levelx/xomatcopy.cc b/test/correctness/routines/levelx/xomatcopy.cc index 43021bc9..e034bc18 100644 --- a/test/correctness/routines/levelx/xomatcopy.cc +++ b/test/correctness/routines/levelx/xomatcopy.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "correctness/testblas.h" -#include "routines/levelx/xomatcopy.h" +#include "test/correctness/testblas.hpp" +#include "test/routines/levelx/xomatcopy.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/correctness/testblas.cc b/test/correctness/testblas.cc index 9f842d91..cec8bafa 100644 --- a/test/correctness/testblas.cc +++ b/test/correctness/testblas.cc @@ -14,7 +14,7 @@ #include #include -#include "correctness/testblas.h" +#include "test/correctness/testblas.hpp" namespace clblast { // ================================================================================================= diff --git a/test/correctness/testblas.h b/test/correctness/testblas.hpp similarity index 99% rename from test/correctness/testblas.h rename to test/correctness/testblas.hpp index e849466a..d01cd06c 100644 --- a/test/correctness/testblas.h +++ b/test/correctness/testblas.hpp @@ -21,7 +21,7 @@ #include #include -#include "correctness/tester.h" +#include "test/correctness/tester.hpp" namespace clblast { // ================================================================================================= diff --git a/test/correctness/tester.cc b/test/correctness/tester.cc index 68c02da6..92e2c1b8 100644 --- a/test/correctness/tester.cc +++ b/test/correctness/tester.cc @@ -11,13 +11,13 @@ // // ================================================================================================= -#include "correctness/tester.h" - #include #include #include #include +#include "test/correctness/tester.hpp" + namespace clblast { // ================================================================================================= diff --git a/test/correctness/tester.h b/test/correctness/tester.hpp similarity index 99% rename from test/correctness/tester.h rename to test/correctness/tester.hpp index 0defacec..5e5db6a1 100644 --- a/test/correctness/tester.h +++ b/test/correctness/tester.hpp @@ -28,7 +28,7 @@ #endif #include "clblast.h" -#include "internal/utilities.h" +#include "utilities.hpp" namespace clblast { // ================================================================================================= diff --git a/test/performance/client.cc b/test/performance/client.cc index 4c0c79a6..d0068f8b 100644 --- a/test/performance/client.cc +++ b/test/performance/client.cc @@ -11,7 +11,7 @@ // // ================================================================================================= -#include "performance/client.h" +#include "test/performance/client.hpp" #include #include diff --git a/test/performance/client.h b/test/performance/client.hpp similarity index 99% rename from test/performance/client.h rename to test/performance/client.hpp index 493a7aed..5ff2aec7 100644 --- a/test/performance/client.h +++ b/test/performance/client.hpp @@ -31,7 +31,7 @@ #endif #include "clblast.h" -#include "internal/utilities.h" +#include "utilities.hpp" namespace clblast { // ================================================================================================= diff --git a/test/performance/routines/level1/xamax.cc b/test/performance/routines/level1/xamax.cc index 4af1f1c0..450678e0 100644 --- a/test/performance/routines/level1/xamax.cc +++ b/test/performance/routines/level1/xamax.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level1/xamax.h" +#include "test/performance/client.hpp" +#include "test/routines/level1/xamax.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level1/xasum.cc b/test/performance/routines/level1/xasum.cc index 8e098890..c21102f5 100644 --- a/test/performance/routines/level1/xasum.cc +++ b/test/performance/routines/level1/xasum.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level1/xasum.h" +#include "test/performance/client.hpp" +#include "test/routines/level1/xasum.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level1/xaxpy.cc b/test/performance/routines/level1/xaxpy.cc index b48c290d..e1c4935e 100644 --- a/test/performance/routines/level1/xaxpy.cc +++ b/test/performance/routines/level1/xaxpy.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level1/xaxpy.h" +#include "test/performance/client.hpp" +#include "test/routines/level1/xaxpy.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level1/xcopy.cc b/test/performance/routines/level1/xcopy.cc index b7c60f0f..ea3531a0 100644 --- a/test/performance/routines/level1/xcopy.cc +++ b/test/performance/routines/level1/xcopy.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level1/xcopy.h" +#include "test/performance/client.hpp" +#include "test/routines/level1/xcopy.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level1/xdot.cc b/test/performance/routines/level1/xdot.cc index 3edf2590..09fe9258 100644 --- a/test/performance/routines/level1/xdot.cc +++ b/test/performance/routines/level1/xdot.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level1/xdot.h" +#include "test/performance/client.hpp" +#include "test/routines/level1/xdot.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level1/xdotc.cc b/test/performance/routines/level1/xdotc.cc index 5f36b80e..6e716ebb 100644 --- a/test/performance/routines/level1/xdotc.cc +++ b/test/performance/routines/level1/xdotc.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level1/xdotc.h" +#include "test/performance/client.hpp" +#include "test/routines/level1/xdotc.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level1/xdotu.cc b/test/performance/routines/level1/xdotu.cc index f19f751b..d011d558 100644 --- a/test/performance/routines/level1/xdotu.cc +++ b/test/performance/routines/level1/xdotu.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level1/xdotu.h" +#include "test/performance/client.hpp" +#include "test/routines/level1/xdotu.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level1/xnrm2.cc b/test/performance/routines/level1/xnrm2.cc index f167df95..1d6e177d 100644 --- a/test/performance/routines/level1/xnrm2.cc +++ b/test/performance/routines/level1/xnrm2.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level1/xnrm2.h" +#include "test/performance/client.hpp" +#include "test/routines/level1/xnrm2.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level1/xrot.cc b/test/performance/routines/level1/xrot.cc index 3ff59ace..4b543f1b 100644 --- a/test/performance/routines/level1/xrot.cc +++ b/test/performance/routines/level1/xrot.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level1/xrot.h" +#include "test/performance/client.hpp" +#include "test/routines/level1/xrot.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level1/xrotg.cc b/test/performance/routines/level1/xrotg.cc index 0320c314..e52704b0 100644 --- a/test/performance/routines/level1/xrotg.cc +++ b/test/performance/routines/level1/xrotg.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level1/xrotg.h" +#include "test/performance/client.hpp" +#include "test/routines/level1/xrotg.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level1/xrotm.cc b/test/performance/routines/level1/xrotm.cc index 7af94d0f..83ee1d9d 100644 --- a/test/performance/routines/level1/xrotm.cc +++ b/test/performance/routines/level1/xrotm.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level1/xrotm.h" +#include "test/performance/client.hpp" +#include "test/routines/level1/xrotm.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level1/xrotmg.cc b/test/performance/routines/level1/xrotmg.cc index a326347b..ee1539d9 100644 --- a/test/performance/routines/level1/xrotmg.cc +++ b/test/performance/routines/level1/xrotmg.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level1/xrotmg.h" +#include "test/performance/client.hpp" +#include "test/routines/level1/xrotmg.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level1/xscal.cc b/test/performance/routines/level1/xscal.cc index 35e21ba8..adb83a90 100644 --- a/test/performance/routines/level1/xscal.cc +++ b/test/performance/routines/level1/xscal.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level1/xscal.h" +#include "test/performance/client.hpp" +#include "test/routines/level1/xscal.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level1/xswap.cc b/test/performance/routines/level1/xswap.cc index 4791d4c3..7f591d19 100644 --- a/test/performance/routines/level1/xswap.cc +++ b/test/performance/routines/level1/xswap.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level1/xswap.h" +#include "test/performance/client.hpp" +#include "test/routines/level1/xswap.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xgbmv.cc b/test/performance/routines/level2/xgbmv.cc index be4056de..6aa72ded 100644 --- a/test/performance/routines/level2/xgbmv.cc +++ b/test/performance/routines/level2/xgbmv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xgbmv.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xgbmv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xgemv.cc b/test/performance/routines/level2/xgemv.cc index 50e6225a..fdcef95d 100644 --- a/test/performance/routines/level2/xgemv.cc +++ b/test/performance/routines/level2/xgemv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xgemv.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xgemv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xger.cc b/test/performance/routines/level2/xger.cc index b1b5a268..c4f3699d 100644 --- a/test/performance/routines/level2/xger.cc +++ b/test/performance/routines/level2/xger.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xger.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xger.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xgerc.cc b/test/performance/routines/level2/xgerc.cc index acd0fab7..f855dc11 100644 --- a/test/performance/routines/level2/xgerc.cc +++ b/test/performance/routines/level2/xgerc.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xgerc.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xgerc.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xgeru.cc b/test/performance/routines/level2/xgeru.cc index a5973777..2bf885e3 100644 --- a/test/performance/routines/level2/xgeru.cc +++ b/test/performance/routines/level2/xgeru.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xgeru.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xgeru.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xhbmv.cc b/test/performance/routines/level2/xhbmv.cc index 28b71045..b7f3b9ad 100644 --- a/test/performance/routines/level2/xhbmv.cc +++ b/test/performance/routines/level2/xhbmv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xhbmv.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xhbmv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xhemv.cc b/test/performance/routines/level2/xhemv.cc index 622854a7..e1168083 100644 --- a/test/performance/routines/level2/xhemv.cc +++ b/test/performance/routines/level2/xhemv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xhemv.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xhemv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xher.cc b/test/performance/routines/level2/xher.cc index 613d7766..0d1bc1dd 100644 --- a/test/performance/routines/level2/xher.cc +++ b/test/performance/routines/level2/xher.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xher.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xher.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xher2.cc b/test/performance/routines/level2/xher2.cc index c335d3be..3d98c838 100644 --- a/test/performance/routines/level2/xher2.cc +++ b/test/performance/routines/level2/xher2.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xher2.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xher2.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xhpmv.cc b/test/performance/routines/level2/xhpmv.cc index 1e726569..c3bc3d9c 100644 --- a/test/performance/routines/level2/xhpmv.cc +++ b/test/performance/routines/level2/xhpmv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xhpmv.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xhpmv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xhpr.cc b/test/performance/routines/level2/xhpr.cc index 000b69af..afc65b25 100644 --- a/test/performance/routines/level2/xhpr.cc +++ b/test/performance/routines/level2/xhpr.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xhpr.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xhpr.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xhpr2.cc b/test/performance/routines/level2/xhpr2.cc index 19bafc46..c543dc90 100644 --- a/test/performance/routines/level2/xhpr2.cc +++ b/test/performance/routines/level2/xhpr2.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xhpr2.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xhpr2.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xsbmv.cc b/test/performance/routines/level2/xsbmv.cc index 5fb6e8c0..32899a74 100644 --- a/test/performance/routines/level2/xsbmv.cc +++ b/test/performance/routines/level2/xsbmv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xsbmv.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xsbmv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xspmv.cc b/test/performance/routines/level2/xspmv.cc index e0ee2075..0b0d2409 100644 --- a/test/performance/routines/level2/xspmv.cc +++ b/test/performance/routines/level2/xspmv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xspmv.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xspmv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xspr.cc b/test/performance/routines/level2/xspr.cc index 19651679..9c1c80a0 100644 --- a/test/performance/routines/level2/xspr.cc +++ b/test/performance/routines/level2/xspr.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xspr.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xspr.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xspr2.cc b/test/performance/routines/level2/xspr2.cc index 8745c004..117e9c2f 100644 --- a/test/performance/routines/level2/xspr2.cc +++ b/test/performance/routines/level2/xspr2.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xspr2.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xspr2.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xsymv.cc b/test/performance/routines/level2/xsymv.cc index 42de1ed5..60db1ae9 100644 --- a/test/performance/routines/level2/xsymv.cc +++ b/test/performance/routines/level2/xsymv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xsymv.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xsymv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xsyr.cc b/test/performance/routines/level2/xsyr.cc index 310bfb5e..d9ecd38a 100644 --- a/test/performance/routines/level2/xsyr.cc +++ b/test/performance/routines/level2/xsyr.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xsyr.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xsyr.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xsyr2.cc b/test/performance/routines/level2/xsyr2.cc index bbeed3db..24e0a517 100644 --- a/test/performance/routines/level2/xsyr2.cc +++ b/test/performance/routines/level2/xsyr2.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xsyr2.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xsyr2.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xtbmv.cc b/test/performance/routines/level2/xtbmv.cc index 24eec61f..ed9d26a8 100644 --- a/test/performance/routines/level2/xtbmv.cc +++ b/test/performance/routines/level2/xtbmv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xtbmv.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xtbmv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xtbsv.cc b/test/performance/routines/level2/xtbsv.cc index 4dcd9a06..f0b80330 100644 --- a/test/performance/routines/level2/xtbsv.cc +++ b/test/performance/routines/level2/xtbsv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xtbsv.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xtbsv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xtpmv.cc b/test/performance/routines/level2/xtpmv.cc index 2f2487f8..c5801205 100644 --- a/test/performance/routines/level2/xtpmv.cc +++ b/test/performance/routines/level2/xtpmv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xtpmv.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xtpmv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xtpsv.cc b/test/performance/routines/level2/xtpsv.cc index a3e3f7f1..db956c9d 100644 --- a/test/performance/routines/level2/xtpsv.cc +++ b/test/performance/routines/level2/xtpsv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xtpsv.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xtpsv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xtrmv.cc b/test/performance/routines/level2/xtrmv.cc index 3f23afd1..629c773c 100644 --- a/test/performance/routines/level2/xtrmv.cc +++ b/test/performance/routines/level2/xtrmv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xtrmv.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xtrmv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level2/xtrsv.cc b/test/performance/routines/level2/xtrsv.cc index e8c65b0f..d6c2968c 100644 --- a/test/performance/routines/level2/xtrsv.cc +++ b/test/performance/routines/level2/xtrsv.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level2/xtrsv.h" +#include "test/performance/client.hpp" +#include "test/routines/level2/xtrsv.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level3/xgemm.cc b/test/performance/routines/level3/xgemm.cc index 8e48dc3a..3f68096e 100644 --- a/test/performance/routines/level3/xgemm.cc +++ b/test/performance/routines/level3/xgemm.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level3/xgemm.h" +#include "test/performance/client.hpp" +#include "test/routines/level3/xgemm.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level3/xhemm.cc b/test/performance/routines/level3/xhemm.cc index 87650b9e..ff6d0f71 100644 --- a/test/performance/routines/level3/xhemm.cc +++ b/test/performance/routines/level3/xhemm.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level3/xhemm.h" +#include "test/performance/client.hpp" +#include "test/routines/level3/xhemm.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level3/xher2k.cc b/test/performance/routines/level3/xher2k.cc index 06894816..9636959e 100644 --- a/test/performance/routines/level3/xher2k.cc +++ b/test/performance/routines/level3/xher2k.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level3/xher2k.h" +#include "test/performance/client.hpp" +#include "test/routines/level3/xher2k.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level3/xherk.cc b/test/performance/routines/level3/xherk.cc index d6f38fb2..d51400f0 100644 --- a/test/performance/routines/level3/xherk.cc +++ b/test/performance/routines/level3/xherk.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level3/xherk.h" +#include "test/performance/client.hpp" +#include "test/routines/level3/xherk.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level3/xsymm.cc b/test/performance/routines/level3/xsymm.cc index 7eac5537..38c3dc9b 100644 --- a/test/performance/routines/level3/xsymm.cc +++ b/test/performance/routines/level3/xsymm.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level3/xsymm.h" +#include "test/performance/client.hpp" +#include "test/routines/level3/xsymm.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level3/xsyr2k.cc b/test/performance/routines/level3/xsyr2k.cc index 49d00f34..5360e297 100644 --- a/test/performance/routines/level3/xsyr2k.cc +++ b/test/performance/routines/level3/xsyr2k.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level3/xsyr2k.h" +#include "test/performance/client.hpp" +#include "test/routines/level3/xsyr2k.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level3/xsyrk.cc b/test/performance/routines/level3/xsyrk.cc index ad0a06b4..30612f99 100644 --- a/test/performance/routines/level3/xsyrk.cc +++ b/test/performance/routines/level3/xsyrk.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level3/xsyrk.h" +#include "test/performance/client.hpp" +#include "test/routines/level3/xsyrk.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level3/xtrmm.cc b/test/performance/routines/level3/xtrmm.cc index 92526844..264a34e7 100644 --- a/test/performance/routines/level3/xtrmm.cc +++ b/test/performance/routines/level3/xtrmm.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level3/xtrmm.h" +#include "test/performance/client.hpp" +#include "test/routines/level3/xtrmm.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/level3/xtrsm.cc b/test/performance/routines/level3/xtrsm.cc index 08e4b4a9..80c46d91 100644 --- a/test/performance/routines/level3/xtrsm.cc +++ b/test/performance/routines/level3/xtrsm.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/level3/xtrsm.h" +#include "test/performance/client.hpp" +#include "test/routines/level3/xtrsm.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/performance/routines/levelx/xomatcopy.cc b/test/performance/routines/levelx/xomatcopy.cc index 851f6ee1..0bd5773e 100644 --- a/test/performance/routines/levelx/xomatcopy.cc +++ b/test/performance/routines/levelx/xomatcopy.cc @@ -9,8 +9,8 @@ // // ================================================================================================= -#include "performance/client.h" -#include "routines/levelx/xomatcopy.h" +#include "test/performance/client.hpp" +#include "test/routines/levelx/xomatcopy.hpp" // Shortcuts to the clblast namespace using float2 = clblast::float2; diff --git a/test/routines/level1/xamax.h b/test/routines/level1/xamax.hpp similarity index 98% rename from test/routines/level1/xamax.h rename to test/routines/level1/xamax.hpp index 12b031bc..4423845e 100644 --- a/test/routines/level1/xamax.h +++ b/test/routines/level1/xamax.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level1/xasum.h b/test/routines/level1/xasum.hpp similarity index 98% rename from test/routines/level1/xasum.h rename to test/routines/level1/xasum.hpp index eb83817b..b1f02dcd 100644 --- a/test/routines/level1/xasum.h +++ b/test/routines/level1/xasum.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level1/xaxpy.h b/test/routines/level1/xaxpy.hpp similarity index 98% rename from test/routines/level1/xaxpy.h rename to test/routines/level1/xaxpy.hpp index c241da91..c276a42e 100644 --- a/test/routines/level1/xaxpy.h +++ b/test/routines/level1/xaxpy.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level1/xcopy.h b/test/routines/level1/xcopy.hpp similarity index 98% rename from test/routines/level1/xcopy.h rename to test/routines/level1/xcopy.hpp index a1ff06ce..a96bb9ae 100644 --- a/test/routines/level1/xcopy.h +++ b/test/routines/level1/xcopy.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level1/xdot.h b/test/routines/level1/xdot.hpp similarity index 98% rename from test/routines/level1/xdot.h rename to test/routines/level1/xdot.hpp index 0bbc93d5..f6cf2809 100644 --- a/test/routines/level1/xdot.h +++ b/test/routines/level1/xdot.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level1/xdotc.h b/test/routines/level1/xdotc.hpp similarity index 98% rename from test/routines/level1/xdotc.h rename to test/routines/level1/xdotc.hpp index e1cc1854..2b00d04b 100644 --- a/test/routines/level1/xdotc.h +++ b/test/routines/level1/xdotc.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level1/xdotu.h b/test/routines/level1/xdotu.hpp similarity index 98% rename from test/routines/level1/xdotu.h rename to test/routines/level1/xdotu.hpp index 558257cc..31a867e0 100644 --- a/test/routines/level1/xdotu.h +++ b/test/routines/level1/xdotu.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level1/xnrm2.h b/test/routines/level1/xnrm2.hpp similarity index 98% rename from test/routines/level1/xnrm2.h rename to test/routines/level1/xnrm2.hpp index 19074ca2..62d649e3 100644 --- a/test/routines/level1/xnrm2.h +++ b/test/routines/level1/xnrm2.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level1/xscal.h b/test/routines/level1/xscal.hpp similarity index 98% rename from test/routines/level1/xscal.h rename to test/routines/level1/xscal.hpp index 84d14ac7..79926890 100644 --- a/test/routines/level1/xscal.h +++ b/test/routines/level1/xscal.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level1/xswap.h b/test/routines/level1/xswap.hpp similarity index 98% rename from test/routines/level1/xswap.h rename to test/routines/level1/xswap.hpp index e870b602..8f7e4cfe 100644 --- a/test/routines/level1/xswap.h +++ b/test/routines/level1/xswap.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xgbmv.h b/test/routines/level2/xgbmv.hpp similarity index 98% rename from test/routines/level2/xgbmv.h rename to test/routines/level2/xgbmv.hpp index c777ff73..5a907077 100644 --- a/test/routines/level2/xgbmv.h +++ b/test/routines/level2/xgbmv.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xgemv.h b/test/routines/level2/xgemv.hpp similarity index 98% rename from test/routines/level2/xgemv.h rename to test/routines/level2/xgemv.hpp index f8a7e1d0..1499b2d2 100644 --- a/test/routines/level2/xgemv.h +++ b/test/routines/level2/xgemv.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xger.h b/test/routines/level2/xger.hpp similarity index 98% rename from test/routines/level2/xger.h rename to test/routines/level2/xger.hpp index e0d1fe49..5cbed505 100644 --- a/test/routines/level2/xger.h +++ b/test/routines/level2/xger.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xgerc.h b/test/routines/level2/xgerc.hpp similarity index 98% rename from test/routines/level2/xgerc.h rename to test/routines/level2/xgerc.hpp index 7449146b..d50092cb 100644 --- a/test/routines/level2/xgerc.h +++ b/test/routines/level2/xgerc.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xgeru.h b/test/routines/level2/xgeru.hpp similarity index 98% rename from test/routines/level2/xgeru.h rename to test/routines/level2/xgeru.hpp index 07837657..9c823b73 100644 --- a/test/routines/level2/xgeru.h +++ b/test/routines/level2/xgeru.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xhbmv.h b/test/routines/level2/xhbmv.hpp similarity index 98% rename from test/routines/level2/xhbmv.h rename to test/routines/level2/xhbmv.hpp index 73194975..01cb3f51 100644 --- a/test/routines/level2/xhbmv.h +++ b/test/routines/level2/xhbmv.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xhemv.h b/test/routines/level2/xhemv.hpp similarity index 98% rename from test/routines/level2/xhemv.h rename to test/routines/level2/xhemv.hpp index aabbf14a..dadd3975 100644 --- a/test/routines/level2/xhemv.h +++ b/test/routines/level2/xhemv.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xher.h b/test/routines/level2/xher.hpp similarity index 98% rename from test/routines/level2/xher.h rename to test/routines/level2/xher.hpp index 1294832c..b21c0a9b 100644 --- a/test/routines/level2/xher.h +++ b/test/routines/level2/xher.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xher2.h b/test/routines/level2/xher2.hpp similarity index 98% rename from test/routines/level2/xher2.h rename to test/routines/level2/xher2.hpp index 5e90174d..070f823c 100644 --- a/test/routines/level2/xher2.h +++ b/test/routines/level2/xher2.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xhpmv.h b/test/routines/level2/xhpmv.hpp similarity index 98% rename from test/routines/level2/xhpmv.h rename to test/routines/level2/xhpmv.hpp index 8face6b6..d7f9634e 100644 --- a/test/routines/level2/xhpmv.h +++ b/test/routines/level2/xhpmv.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xhpr.h b/test/routines/level2/xhpr.hpp similarity index 98% rename from test/routines/level2/xhpr.h rename to test/routines/level2/xhpr.hpp index 63cab31f..8f44a68d 100644 --- a/test/routines/level2/xhpr.h +++ b/test/routines/level2/xhpr.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xhpr2.h b/test/routines/level2/xhpr2.hpp similarity index 98% rename from test/routines/level2/xhpr2.h rename to test/routines/level2/xhpr2.hpp index 64d205a0..666a8dfc 100644 --- a/test/routines/level2/xhpr2.h +++ b/test/routines/level2/xhpr2.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xsbmv.h b/test/routines/level2/xsbmv.hpp similarity index 98% rename from test/routines/level2/xsbmv.h rename to test/routines/level2/xsbmv.hpp index 3f1446c8..fd5dd68e 100644 --- a/test/routines/level2/xsbmv.h +++ b/test/routines/level2/xsbmv.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xspmv.h b/test/routines/level2/xspmv.hpp similarity index 98% rename from test/routines/level2/xspmv.h rename to test/routines/level2/xspmv.hpp index 2add3cdd..63286248 100644 --- a/test/routines/level2/xspmv.h +++ b/test/routines/level2/xspmv.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xspr.h b/test/routines/level2/xspr.hpp similarity index 98% rename from test/routines/level2/xspr.h rename to test/routines/level2/xspr.hpp index ad21bdf6..f9dead53 100644 --- a/test/routines/level2/xspr.h +++ b/test/routines/level2/xspr.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xspr2.h b/test/routines/level2/xspr2.hpp similarity index 98% rename from test/routines/level2/xspr2.h rename to test/routines/level2/xspr2.hpp index c55e8181..a2f22098 100644 --- a/test/routines/level2/xspr2.h +++ b/test/routines/level2/xspr2.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xsymv.h b/test/routines/level2/xsymv.hpp similarity index 98% rename from test/routines/level2/xsymv.h rename to test/routines/level2/xsymv.hpp index b6583a24..0d3ca632 100644 --- a/test/routines/level2/xsymv.h +++ b/test/routines/level2/xsymv.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xsyr.h b/test/routines/level2/xsyr.hpp similarity index 98% rename from test/routines/level2/xsyr.h rename to test/routines/level2/xsyr.hpp index f3929588..15ad9595 100644 --- a/test/routines/level2/xsyr.h +++ b/test/routines/level2/xsyr.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xsyr2.h b/test/routines/level2/xsyr2.hpp similarity index 98% rename from test/routines/level2/xsyr2.h rename to test/routines/level2/xsyr2.hpp index 8cdb6a14..a9a61a1f 100644 --- a/test/routines/level2/xsyr2.h +++ b/test/routines/level2/xsyr2.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xtbmv.h b/test/routines/level2/xtbmv.hpp similarity index 98% rename from test/routines/level2/xtbmv.h rename to test/routines/level2/xtbmv.hpp index 9c4131ec..54e7fe18 100644 --- a/test/routines/level2/xtbmv.h +++ b/test/routines/level2/xtbmv.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xtpmv.h b/test/routines/level2/xtpmv.hpp similarity index 98% rename from test/routines/level2/xtpmv.h rename to test/routines/level2/xtpmv.hpp index 58249227..9776c4de 100644 --- a/test/routines/level2/xtpmv.h +++ b/test/routines/level2/xtpmv.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level2/xtrmv.h b/test/routines/level2/xtrmv.hpp similarity index 98% rename from test/routines/level2/xtrmv.h rename to test/routines/level2/xtrmv.hpp index 635a1319..18300e50 100644 --- a/test/routines/level2/xtrmv.h +++ b/test/routines/level2/xtrmv.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level3/xgemm.h b/test/routines/level3/xgemm.hpp similarity index 98% rename from test/routines/level3/xgemm.h rename to test/routines/level3/xgemm.hpp index 842dae93..5f9bea81 100644 --- a/test/routines/level3/xgemm.h +++ b/test/routines/level3/xgemm.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level3/xhemm.h b/test/routines/level3/xhemm.hpp similarity index 98% rename from test/routines/level3/xhemm.h rename to test/routines/level3/xhemm.hpp index 106b99ff..8c44be25 100644 --- a/test/routines/level3/xhemm.h +++ b/test/routines/level3/xhemm.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level3/xher2k.h b/test/routines/level3/xher2k.hpp similarity index 98% rename from test/routines/level3/xher2k.h rename to test/routines/level3/xher2k.hpp index e2f4448f..fd20bbb5 100644 --- a/test/routines/level3/xher2k.h +++ b/test/routines/level3/xher2k.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level3/xherk.h b/test/routines/level3/xherk.hpp similarity index 98% rename from test/routines/level3/xherk.h rename to test/routines/level3/xherk.hpp index 43d7cfcd..12990d39 100644 --- a/test/routines/level3/xherk.h +++ b/test/routines/level3/xherk.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level3/xsymm.h b/test/routines/level3/xsymm.hpp similarity index 98% rename from test/routines/level3/xsymm.h rename to test/routines/level3/xsymm.hpp index c32b4cf7..f8e90927 100644 --- a/test/routines/level3/xsymm.h +++ b/test/routines/level3/xsymm.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level3/xsyr2k.h b/test/routines/level3/xsyr2k.hpp similarity index 98% rename from test/routines/level3/xsyr2k.h rename to test/routines/level3/xsyr2k.hpp index 57c3c203..4e4ba0b7 100644 --- a/test/routines/level3/xsyr2k.h +++ b/test/routines/level3/xsyr2k.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level3/xsyrk.h b/test/routines/level3/xsyrk.hpp similarity index 98% rename from test/routines/level3/xsyrk.h rename to test/routines/level3/xsyrk.hpp index 6c3a3786..f5509c88 100644 --- a/test/routines/level3/xsyrk.h +++ b/test/routines/level3/xsyrk.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/level3/xtrmm.h b/test/routines/level3/xtrmm.hpp similarity index 98% rename from test/routines/level3/xtrmm.h rename to test/routines/level3/xtrmm.hpp index 3eb63030..45e17e45 100644 --- a/test/routines/level3/xtrmm.h +++ b/test/routines/level3/xtrmm.hpp @@ -20,10 +20,10 @@ #include #ifdef CLBLAST_REF_CLBLAS - #include "wrapper_clblas.h" + #include "test/wrapper_clblas.hpp" #endif #ifdef CLBLAST_REF_CBLAS - #include "wrapper_cblas.h" + #include "test/wrapper_cblas.hpp" #endif namespace clblast { diff --git a/test/routines/levelx/xomatcopy.h b/test/routines/levelx/xomatcopy.hpp similarity index 100% rename from test/routines/levelx/xomatcopy.h rename to test/routines/levelx/xomatcopy.hpp diff --git a/test/wrapper_cblas.h b/test/wrapper_cblas.hpp similarity index 99% rename from test/wrapper_cblas.h rename to test/wrapper_cblas.hpp index bf59aa94..7bc674ab 100644 --- a/test/wrapper_cblas.h +++ b/test/wrapper_cblas.hpp @@ -20,7 +20,7 @@ extern "C" #include } -#include "internal/utilities.h" +#include "utilities.hpp" namespace clblast { diff --git a/test/wrapper_clblas.h b/test/wrapper_clblas.hpp similarity index 99% rename from test/wrapper_clblas.h rename to test/wrapper_clblas.hpp index 5115b3d9..3f33890a 100644 --- a/test/wrapper_clblas.h +++ b/test/wrapper_clblas.hpp @@ -17,7 +17,7 @@ #include -#include "internal/utilities.h" +#include "utilities.hpp" namespace clblast { From 61203453aaca4e47c05c598a673150522160ca87 Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Sun, 19 Jun 2016 13:55:49 +0200 Subject: [PATCH 9/9] Renamed all C++ source files to .cpp to match the .hpp extension better --- CHANGELOG | 1 + CMakeLists.txt | 46 +++++++++---------- README.md | 2 +- samples/{sgemm.cc => sgemm.cpp} | 0 scripts/generator/generator.py | 20 ++++---- src/{cache.cc => cache.cpp} | 0 src/{clblast.cc => clblast.cpp} | 0 src/{clblast_c.cc => clblast_c.cpp} | 0 src/database/{database.cc => database.cpp} | 0 src/{routine.cc => routine.cpp} | 0 src/routines/{common.cc => common.cpp} | 0 src/routines/level1/{xamax.cc => xamax.cpp} | 0 src/routines/level1/{xasum.cc => xasum.cpp} | 0 src/routines/level1/{xaxpy.cc => xaxpy.cpp} | 0 src/routines/level1/{xcopy.cc => xcopy.cpp} | 0 src/routines/level1/{xdot.cc => xdot.cpp} | 0 src/routines/level1/{xdotc.cc => xdotc.cpp} | 0 src/routines/level1/{xdotu.cc => xdotu.cpp} | 0 src/routines/level1/{xnrm2.cc => xnrm2.cpp} | 0 src/routines/level1/{xscal.cc => xscal.cpp} | 0 src/routines/level1/{xswap.cc => xswap.cpp} | 0 src/routines/level2/{xgbmv.cc => xgbmv.cpp} | 0 src/routines/level2/{xgemv.cc => xgemv.cpp} | 0 src/routines/level2/{xger.cc => xger.cpp} | 0 src/routines/level2/{xgerc.cc => xgerc.cpp} | 0 src/routines/level2/{xgeru.cc => xgeru.cpp} | 0 src/routines/level2/{xhbmv.cc => xhbmv.cpp} | 0 src/routines/level2/{xhemv.cc => xhemv.cpp} | 0 src/routines/level2/{xher.cc => xher.cpp} | 0 src/routines/level2/{xher2.cc => xher2.cpp} | 0 src/routines/level2/{xhpmv.cc => xhpmv.cpp} | 0 src/routines/level2/{xhpr.cc => xhpr.cpp} | 0 src/routines/level2/{xhpr2.cc => xhpr2.cpp} | 0 src/routines/level2/{xsbmv.cc => xsbmv.cpp} | 0 src/routines/level2/{xspmv.cc => xspmv.cpp} | 0 src/routines/level2/{xspr.cc => xspr.cpp} | 0 src/routines/level2/{xspr2.cc => xspr2.cpp} | 0 src/routines/level2/{xsymv.cc => xsymv.cpp} | 0 src/routines/level2/{xsyr.cc => xsyr.cpp} | 0 src/routines/level2/{xsyr2.cc => xsyr2.cpp} | 0 src/routines/level2/{xtbmv.cc => xtbmv.cpp} | 0 src/routines/level2/{xtpmv.cc => xtpmv.cpp} | 0 src/routines/level2/{xtrmv.cc => xtrmv.cpp} | 0 src/routines/level3/{xgemm.cc => xgemm.cpp} | 0 src/routines/level3/{xhemm.cc => xhemm.cpp} | 0 src/routines/level3/{xher2k.cc => xher2k.cpp} | 0 src/routines/level3/{xherk.cc => xherk.cpp} | 0 src/routines/level3/{xsymm.cc => xsymm.cpp} | 0 src/routines/level3/{xsyr2k.cc => xsyr2k.cpp} | 0 src/routines/level3/{xsyrk.cc => xsyrk.cpp} | 0 src/routines/level3/{xtrmm.cc => xtrmm.cpp} | 0 .../levelx/{xomatcopy.cc => xomatcopy.cpp} | 0 .../kernels/{copy_fast.cc => copy_fast.cpp} | 0 .../kernels/{copy_pad.cc => copy_pad.cpp} | 0 .../{transpose_fast.cc => transpose_fast.cpp} | 0 .../{transpose_pad.cc => transpose_pad.cpp} | 0 src/tuning/kernels/{xaxpy.cc => xaxpy.cpp} | 0 src/tuning/kernels/{xdot.cc => xdot.cpp} | 0 src/tuning/kernels/{xgemm.cc => xgemm.cpp} | 0 src/tuning/kernels/{xgemv.cc => xgemv.cpp} | 0 src/tuning/kernels/{xger.cc => xger.cpp} | 0 src/{utilities.cc => utilities.cpp} | 0 .../routines/level1/{xamax.cc => xamax.cpp} | 0 .../routines/level1/{xasum.cc => xasum.cpp} | 0 .../routines/level1/{xaxpy.cc => xaxpy.cpp} | 0 .../routines/level1/{xcopy.cc => xcopy.cpp} | 0 .../routines/level1/{xdot.cc => xdot.cpp} | 0 .../routines/level1/{xdotc.cc => xdotc.cpp} | 0 .../routines/level1/{xdotu.cc => xdotu.cpp} | 0 .../routines/level1/{xnrm2.cc => xnrm2.cpp} | 0 .../routines/level1/{xrot.cc => xrot.cpp} | 0 .../routines/level1/{xrotg.cc => xrotg.cpp} | 0 .../routines/level1/{xrotm.cc => xrotm.cpp} | 0 .../routines/level1/{xrotmg.cc => xrotmg.cpp} | 0 .../routines/level1/{xscal.cc => xscal.cpp} | 0 .../routines/level1/{xswap.cc => xswap.cpp} | 0 .../routines/level2/{xgbmv.cc => xgbmv.cpp} | 0 .../routines/level2/{xgemv.cc => xgemv.cpp} | 0 .../routines/level2/{xger.cc => xger.cpp} | 0 .../routines/level2/{xgerc.cc => xgerc.cpp} | 0 .../routines/level2/{xgeru.cc => xgeru.cpp} | 0 .../routines/level2/{xhbmv.cc => xhbmv.cpp} | 0 .../routines/level2/{xhemv.cc => xhemv.cpp} | 0 .../routines/level2/{xher.cc => xher.cpp} | 0 .../routines/level2/{xher2.cc => xher2.cpp} | 0 .../routines/level2/{xhpmv.cc => xhpmv.cpp} | 0 .../routines/level2/{xhpr.cc => xhpr.cpp} | 0 .../routines/level2/{xhpr2.cc => xhpr2.cpp} | 0 .../routines/level2/{xsbmv.cc => xsbmv.cpp} | 0 .../routines/level2/{xspmv.cc => xspmv.cpp} | 0 .../routines/level2/{xspr.cc => xspr.cpp} | 0 .../routines/level2/{xspr2.cc => xspr2.cpp} | 0 .../routines/level2/{xsymv.cc => xsymv.cpp} | 0 .../routines/level2/{xsyr.cc => xsyr.cpp} | 0 .../routines/level2/{xsyr2.cc => xsyr2.cpp} | 0 .../routines/level2/{xtbmv.cc => xtbmv.cpp} | 0 .../routines/level2/{xtbsv.cc => xtbsv.cpp} | 0 .../routines/level2/{xtpmv.cc => xtpmv.cpp} | 0 .../routines/level2/{xtpsv.cc => xtpsv.cpp} | 0 .../routines/level2/{xtrmv.cc => xtrmv.cpp} | 0 .../routines/level2/{xtrsv.cc => xtrsv.cpp} | 0 .../routines/level3/{xgemm.cc => xgemm.cpp} | 0 .../routines/level3/{xhemm.cc => xhemm.cpp} | 0 .../routines/level3/{xher2k.cc => xher2k.cpp} | 0 .../routines/level3/{xherk.cc => xherk.cpp} | 0 .../routines/level3/{xsymm.cc => xsymm.cpp} | 0 .../routines/level3/{xsyr2k.cc => xsyr2k.cpp} | 0 .../routines/level3/{xsyrk.cc => xsyrk.cpp} | 0 .../routines/level3/{xtrmm.cc => xtrmm.cpp} | 0 .../routines/level3/{xtrsm.cc => xtrsm.cpp} | 0 .../levelx/{xomatcopy.cc => xomatcopy.cpp} | 0 .../correctness/{testblas.cc => testblas.cpp} | 0 test/correctness/{tester.cc => tester.cpp} | 0 test/performance/{client.cc => client.cpp} | 0 .../routines/level1/{xamax.cc => xamax.cpp} | 0 .../routines/level1/{xasum.cc => xasum.cpp} | 0 .../routines/level1/{xaxpy.cc => xaxpy.cpp} | 0 .../routines/level1/{xcopy.cc => xcopy.cpp} | 0 .../routines/level1/{xdot.cc => xdot.cpp} | 0 .../routines/level1/{xdotc.cc => xdotc.cpp} | 0 .../routines/level1/{xdotu.cc => xdotu.cpp} | 0 .../routines/level1/{xnrm2.cc => xnrm2.cpp} | 0 .../routines/level1/{xrot.cc => xrot.cpp} | 0 .../routines/level1/{xrotg.cc => xrotg.cpp} | 0 .../routines/level1/{xrotm.cc => xrotm.cpp} | 0 .../routines/level1/{xrotmg.cc => xrotmg.cpp} | 0 .../routines/level1/{xscal.cc => xscal.cpp} | 0 .../routines/level1/{xswap.cc => xswap.cpp} | 0 .../routines/level2/{xgbmv.cc => xgbmv.cpp} | 0 .../routines/level2/{xgemv.cc => xgemv.cpp} | 0 .../routines/level2/{xger.cc => xger.cpp} | 0 .../routines/level2/{xgerc.cc => xgerc.cpp} | 0 .../routines/level2/{xgeru.cc => xgeru.cpp} | 0 .../routines/level2/{xhbmv.cc => xhbmv.cpp} | 0 .../routines/level2/{xhemv.cc => xhemv.cpp} | 0 .../routines/level2/{xher.cc => xher.cpp} | 0 .../routines/level2/{xher2.cc => xher2.cpp} | 0 .../routines/level2/{xhpmv.cc => xhpmv.cpp} | 0 .../routines/level2/{xhpr.cc => xhpr.cpp} | 0 .../routines/level2/{xhpr2.cc => xhpr2.cpp} | 0 .../routines/level2/{xsbmv.cc => xsbmv.cpp} | 0 .../routines/level2/{xspmv.cc => xspmv.cpp} | 0 .../routines/level2/{xspr.cc => xspr.cpp} | 0 .../routines/level2/{xspr2.cc => xspr2.cpp} | 0 .../routines/level2/{xsymv.cc => xsymv.cpp} | 0 .../routines/level2/{xsyr.cc => xsyr.cpp} | 0 .../routines/level2/{xsyr2.cc => xsyr2.cpp} | 0 .../routines/level2/{xtbmv.cc => xtbmv.cpp} | 0 .../routines/level2/{xtbsv.cc => xtbsv.cpp} | 0 .../routines/level2/{xtpmv.cc => xtpmv.cpp} | 0 .../routines/level2/{xtpsv.cc => xtpsv.cpp} | 0 .../routines/level2/{xtrmv.cc => xtrmv.cpp} | 0 .../routines/level2/{xtrsv.cc => xtrsv.cpp} | 0 .../routines/level3/{xgemm.cc => xgemm.cpp} | 0 .../routines/level3/{xhemm.cc => xhemm.cpp} | 0 .../routines/level3/{xher2k.cc => xher2k.cpp} | 0 .../routines/level3/{xherk.cc => xherk.cpp} | 0 .../routines/level3/{xsymm.cc => xsymm.cpp} | 0 .../routines/level3/{xsyr2k.cc => xsyr2k.cpp} | 0 .../routines/level3/{xsyrk.cc => xsyrk.cpp} | 0 .../routines/level3/{xtrmm.cc => xtrmm.cpp} | 0 .../routines/level3/{xtrsm.cc => xtrsm.cpp} | 0 .../levelx/{xomatcopy.cc => xomatcopy.cpp} | 0 163 files changed, 35 insertions(+), 34 deletions(-) rename samples/{sgemm.cc => sgemm.cpp} (100%) rename src/{cache.cc => cache.cpp} (100%) rename src/{clblast.cc => clblast.cpp} (100%) rename src/{clblast_c.cc => clblast_c.cpp} (100%) rename src/database/{database.cc => database.cpp} (100%) rename src/{routine.cc => routine.cpp} (100%) rename src/routines/{common.cc => common.cpp} (100%) rename src/routines/level1/{xamax.cc => xamax.cpp} (100%) rename src/routines/level1/{xasum.cc => xasum.cpp} (100%) rename src/routines/level1/{xaxpy.cc => xaxpy.cpp} (100%) rename src/routines/level1/{xcopy.cc => xcopy.cpp} (100%) rename src/routines/level1/{xdot.cc => xdot.cpp} (100%) rename src/routines/level1/{xdotc.cc => xdotc.cpp} (100%) rename src/routines/level1/{xdotu.cc => xdotu.cpp} (100%) rename src/routines/level1/{xnrm2.cc => xnrm2.cpp} (100%) rename src/routines/level1/{xscal.cc => xscal.cpp} (100%) rename src/routines/level1/{xswap.cc => xswap.cpp} (100%) rename src/routines/level2/{xgbmv.cc => xgbmv.cpp} (100%) rename src/routines/level2/{xgemv.cc => xgemv.cpp} (100%) rename src/routines/level2/{xger.cc => xger.cpp} (100%) rename src/routines/level2/{xgerc.cc => xgerc.cpp} (100%) rename src/routines/level2/{xgeru.cc => xgeru.cpp} (100%) rename src/routines/level2/{xhbmv.cc => xhbmv.cpp} (100%) rename src/routines/level2/{xhemv.cc => xhemv.cpp} (100%) rename src/routines/level2/{xher.cc => xher.cpp} (100%) rename src/routines/level2/{xher2.cc => xher2.cpp} (100%) rename src/routines/level2/{xhpmv.cc => xhpmv.cpp} (100%) rename src/routines/level2/{xhpr.cc => xhpr.cpp} (100%) rename src/routines/level2/{xhpr2.cc => xhpr2.cpp} (100%) rename src/routines/level2/{xsbmv.cc => xsbmv.cpp} (100%) rename src/routines/level2/{xspmv.cc => xspmv.cpp} (100%) rename src/routines/level2/{xspr.cc => xspr.cpp} (100%) rename src/routines/level2/{xspr2.cc => xspr2.cpp} (100%) rename src/routines/level2/{xsymv.cc => xsymv.cpp} (100%) rename src/routines/level2/{xsyr.cc => xsyr.cpp} (100%) rename src/routines/level2/{xsyr2.cc => xsyr2.cpp} (100%) rename src/routines/level2/{xtbmv.cc => xtbmv.cpp} (100%) rename src/routines/level2/{xtpmv.cc => xtpmv.cpp} (100%) rename src/routines/level2/{xtrmv.cc => xtrmv.cpp} (100%) rename src/routines/level3/{xgemm.cc => xgemm.cpp} (100%) rename src/routines/level3/{xhemm.cc => xhemm.cpp} (100%) rename src/routines/level3/{xher2k.cc => xher2k.cpp} (100%) rename src/routines/level3/{xherk.cc => xherk.cpp} (100%) rename src/routines/level3/{xsymm.cc => xsymm.cpp} (100%) rename src/routines/level3/{xsyr2k.cc => xsyr2k.cpp} (100%) rename src/routines/level3/{xsyrk.cc => xsyrk.cpp} (100%) rename src/routines/level3/{xtrmm.cc => xtrmm.cpp} (100%) rename src/routines/levelx/{xomatcopy.cc => xomatcopy.cpp} (100%) rename src/tuning/kernels/{copy_fast.cc => copy_fast.cpp} (100%) rename src/tuning/kernels/{copy_pad.cc => copy_pad.cpp} (100%) rename src/tuning/kernels/{transpose_fast.cc => transpose_fast.cpp} (100%) rename src/tuning/kernels/{transpose_pad.cc => transpose_pad.cpp} (100%) rename src/tuning/kernels/{xaxpy.cc => xaxpy.cpp} (100%) rename src/tuning/kernels/{xdot.cc => xdot.cpp} (100%) rename src/tuning/kernels/{xgemm.cc => xgemm.cpp} (100%) rename src/tuning/kernels/{xgemv.cc => xgemv.cpp} (100%) rename src/tuning/kernels/{xger.cc => xger.cpp} (100%) rename src/{utilities.cc => utilities.cpp} (100%) rename test/correctness/routines/level1/{xamax.cc => xamax.cpp} (100%) rename test/correctness/routines/level1/{xasum.cc => xasum.cpp} (100%) rename test/correctness/routines/level1/{xaxpy.cc => xaxpy.cpp} (100%) rename test/correctness/routines/level1/{xcopy.cc => xcopy.cpp} (100%) rename test/correctness/routines/level1/{xdot.cc => xdot.cpp} (100%) rename test/correctness/routines/level1/{xdotc.cc => xdotc.cpp} (100%) rename test/correctness/routines/level1/{xdotu.cc => xdotu.cpp} (100%) rename test/correctness/routines/level1/{xnrm2.cc => xnrm2.cpp} (100%) rename test/correctness/routines/level1/{xrot.cc => xrot.cpp} (100%) rename test/correctness/routines/level1/{xrotg.cc => xrotg.cpp} (100%) rename test/correctness/routines/level1/{xrotm.cc => xrotm.cpp} (100%) rename test/correctness/routines/level1/{xrotmg.cc => xrotmg.cpp} (100%) rename test/correctness/routines/level1/{xscal.cc => xscal.cpp} (100%) rename test/correctness/routines/level1/{xswap.cc => xswap.cpp} (100%) rename test/correctness/routines/level2/{xgbmv.cc => xgbmv.cpp} (100%) rename test/correctness/routines/level2/{xgemv.cc => xgemv.cpp} (100%) rename test/correctness/routines/level2/{xger.cc => xger.cpp} (100%) rename test/correctness/routines/level2/{xgerc.cc => xgerc.cpp} (100%) rename test/correctness/routines/level2/{xgeru.cc => xgeru.cpp} (100%) rename test/correctness/routines/level2/{xhbmv.cc => xhbmv.cpp} (100%) rename test/correctness/routines/level2/{xhemv.cc => xhemv.cpp} (100%) rename test/correctness/routines/level2/{xher.cc => xher.cpp} (100%) rename test/correctness/routines/level2/{xher2.cc => xher2.cpp} (100%) rename test/correctness/routines/level2/{xhpmv.cc => xhpmv.cpp} (100%) rename test/correctness/routines/level2/{xhpr.cc => xhpr.cpp} (100%) rename test/correctness/routines/level2/{xhpr2.cc => xhpr2.cpp} (100%) rename test/correctness/routines/level2/{xsbmv.cc => xsbmv.cpp} (100%) rename test/correctness/routines/level2/{xspmv.cc => xspmv.cpp} (100%) rename test/correctness/routines/level2/{xspr.cc => xspr.cpp} (100%) rename test/correctness/routines/level2/{xspr2.cc => xspr2.cpp} (100%) rename test/correctness/routines/level2/{xsymv.cc => xsymv.cpp} (100%) rename test/correctness/routines/level2/{xsyr.cc => xsyr.cpp} (100%) rename test/correctness/routines/level2/{xsyr2.cc => xsyr2.cpp} (100%) rename test/correctness/routines/level2/{xtbmv.cc => xtbmv.cpp} (100%) rename test/correctness/routines/level2/{xtbsv.cc => xtbsv.cpp} (100%) rename test/correctness/routines/level2/{xtpmv.cc => xtpmv.cpp} (100%) rename test/correctness/routines/level2/{xtpsv.cc => xtpsv.cpp} (100%) rename test/correctness/routines/level2/{xtrmv.cc => xtrmv.cpp} (100%) rename test/correctness/routines/level2/{xtrsv.cc => xtrsv.cpp} (100%) rename test/correctness/routines/level3/{xgemm.cc => xgemm.cpp} (100%) rename test/correctness/routines/level3/{xhemm.cc => xhemm.cpp} (100%) rename test/correctness/routines/level3/{xher2k.cc => xher2k.cpp} (100%) rename test/correctness/routines/level3/{xherk.cc => xherk.cpp} (100%) rename test/correctness/routines/level3/{xsymm.cc => xsymm.cpp} (100%) rename test/correctness/routines/level3/{xsyr2k.cc => xsyr2k.cpp} (100%) rename test/correctness/routines/level3/{xsyrk.cc => xsyrk.cpp} (100%) rename test/correctness/routines/level3/{xtrmm.cc => xtrmm.cpp} (100%) rename test/correctness/routines/level3/{xtrsm.cc => xtrsm.cpp} (100%) rename test/correctness/routines/levelx/{xomatcopy.cc => xomatcopy.cpp} (100%) rename test/correctness/{testblas.cc => testblas.cpp} (100%) rename test/correctness/{tester.cc => tester.cpp} (100%) rename test/performance/{client.cc => client.cpp} (100%) rename test/performance/routines/level1/{xamax.cc => xamax.cpp} (100%) rename test/performance/routines/level1/{xasum.cc => xasum.cpp} (100%) rename test/performance/routines/level1/{xaxpy.cc => xaxpy.cpp} (100%) rename test/performance/routines/level1/{xcopy.cc => xcopy.cpp} (100%) rename test/performance/routines/level1/{xdot.cc => xdot.cpp} (100%) rename test/performance/routines/level1/{xdotc.cc => xdotc.cpp} (100%) rename test/performance/routines/level1/{xdotu.cc => xdotu.cpp} (100%) rename test/performance/routines/level1/{xnrm2.cc => xnrm2.cpp} (100%) rename test/performance/routines/level1/{xrot.cc => xrot.cpp} (100%) rename test/performance/routines/level1/{xrotg.cc => xrotg.cpp} (100%) rename test/performance/routines/level1/{xrotm.cc => xrotm.cpp} (100%) rename test/performance/routines/level1/{xrotmg.cc => xrotmg.cpp} (100%) rename test/performance/routines/level1/{xscal.cc => xscal.cpp} (100%) rename test/performance/routines/level1/{xswap.cc => xswap.cpp} (100%) rename test/performance/routines/level2/{xgbmv.cc => xgbmv.cpp} (100%) rename test/performance/routines/level2/{xgemv.cc => xgemv.cpp} (100%) rename test/performance/routines/level2/{xger.cc => xger.cpp} (100%) rename test/performance/routines/level2/{xgerc.cc => xgerc.cpp} (100%) rename test/performance/routines/level2/{xgeru.cc => xgeru.cpp} (100%) rename test/performance/routines/level2/{xhbmv.cc => xhbmv.cpp} (100%) rename test/performance/routines/level2/{xhemv.cc => xhemv.cpp} (100%) rename test/performance/routines/level2/{xher.cc => xher.cpp} (100%) rename test/performance/routines/level2/{xher2.cc => xher2.cpp} (100%) rename test/performance/routines/level2/{xhpmv.cc => xhpmv.cpp} (100%) rename test/performance/routines/level2/{xhpr.cc => xhpr.cpp} (100%) rename test/performance/routines/level2/{xhpr2.cc => xhpr2.cpp} (100%) rename test/performance/routines/level2/{xsbmv.cc => xsbmv.cpp} (100%) rename test/performance/routines/level2/{xspmv.cc => xspmv.cpp} (100%) rename test/performance/routines/level2/{xspr.cc => xspr.cpp} (100%) rename test/performance/routines/level2/{xspr2.cc => xspr2.cpp} (100%) rename test/performance/routines/level2/{xsymv.cc => xsymv.cpp} (100%) rename test/performance/routines/level2/{xsyr.cc => xsyr.cpp} (100%) rename test/performance/routines/level2/{xsyr2.cc => xsyr2.cpp} (100%) rename test/performance/routines/level2/{xtbmv.cc => xtbmv.cpp} (100%) rename test/performance/routines/level2/{xtbsv.cc => xtbsv.cpp} (100%) rename test/performance/routines/level2/{xtpmv.cc => xtpmv.cpp} (100%) rename test/performance/routines/level2/{xtpsv.cc => xtpsv.cpp} (100%) rename test/performance/routines/level2/{xtrmv.cc => xtrmv.cpp} (100%) rename test/performance/routines/level2/{xtrsv.cc => xtrsv.cpp} (100%) rename test/performance/routines/level3/{xgemm.cc => xgemm.cpp} (100%) rename test/performance/routines/level3/{xhemm.cc => xhemm.cpp} (100%) rename test/performance/routines/level3/{xher2k.cc => xher2k.cpp} (100%) rename test/performance/routines/level3/{xherk.cc => xherk.cpp} (100%) rename test/performance/routines/level3/{xsymm.cc => xsymm.cpp} (100%) rename test/performance/routines/level3/{xsyr2k.cc => xsyr2k.cpp} (100%) rename test/performance/routines/level3/{xsyrk.cc => xsyrk.cpp} (100%) rename test/performance/routines/level3/{xtrmm.cc => xtrmm.cpp} (100%) rename test/performance/routines/level3/{xtrsm.cc => xtrsm.cpp} (100%) rename test/performance/routines/levelx/{xomatcopy.cc => xomatcopy.cpp} (100%) diff --git a/CHANGELOG b/CHANGELOG index e9063b91..fd5b3610 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ Development version (next release) - Made it possible to compile the performance tests (clients) separately from the correctness tests - Made a reference BLAS and head-to-head performance comparison optional in the clients - Increased the verbosity of the "-verbose" option in the correctness tests +- Refactored the host code for better compilation times and fewer lines of code - Improved the API documentation - Various minor fixes and enhancements - Added tuned parameters for various devices (see README) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ca56bd7..0df2b3bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,25 +141,25 @@ set(PRECISIONS 32 64 3232 6464) # Gathers all source-files set(SOURCES - src/database/database.cc - src/routines/common.cc - src/cache.cc - src/clblast.cc - src/clblast_c.cc - src/routine.cc - src/utilities.cc + src/database/database.cpp + src/routines/common.cpp + src/cache.cpp + src/clblast.cpp + src/clblast_c.cpp + src/routine.cpp + src/utilities.cpp ) foreach(ROUTINE ${LEVEL1_ROUTINES}) - set(SOURCES ${SOURCES} src/routines/level1/${ROUTINE}.cc) + set(SOURCES ${SOURCES} src/routines/level1/${ROUTINE}.cpp) endforeach() foreach(ROUTINE ${LEVEL2_ROUTINES}) - set(SOURCES ${SOURCES} src/routines/level2/${ROUTINE}.cc) + set(SOURCES ${SOURCES} src/routines/level2/${ROUTINE}.cpp) endforeach() foreach(ROUTINE ${LEVEL3_ROUTINES}) - set(SOURCES ${SOURCES} src/routines/level3/${ROUTINE}.cc) + set(SOURCES ${SOURCES} src/routines/level3/${ROUTINE}.cpp) endforeach() foreach(ROUTINE ${LEVELX_ROUTINES}) - set(SOURCES ${SOURCES} src/routines/levelx/${ROUTINE}.cc) + set(SOURCES ${SOURCES} src/routines/levelx/${ROUTINE}.cpp) endforeach() # Creates and links the library @@ -193,7 +193,7 @@ if(SAMPLES) # Adds sample programs (C++) foreach(SAMPLE ${SAMPLE_PROGRAMS_CPP}) - add_executable(clblast_sample_${SAMPLE} samples/${SAMPLE}.cc) + add_executable(clblast_sample_${SAMPLE} samples/${SAMPLE}.cpp) target_link_libraries(clblast_sample_${SAMPLE} clblast ${OPENCL_LIBRARIES}) install(TARGETS clblast_sample_${SAMPLE} DESTINATION bin) endforeach() @@ -218,7 +218,7 @@ if(TUNERS) # Adds tuning executables foreach(KERNEL ${KERNELS}) - add_executable(clblast_tuner_${KERNEL} src/tuning/kernels/${KERNEL}.cc) + add_executable(clblast_tuner_${KERNEL} src/tuning/kernels/${KERNEL}.cpp) target_link_libraries(clblast_tuner_${KERNEL} clblast ${CLTUNE_LIBRARIES} ${OPENCL_LIBRARIES}) install(TARGETS clblast_tuner_${KERNEL} DESTINATION bin) endforeach() @@ -275,24 +275,24 @@ endif() if(CLIENTS) # Creates the common performance-tests objects (requires CMake 2.8.8) - add_library(test_performance_common OBJECT test/performance/client.cc) + add_library(test_performance_common OBJECT test/performance/client.cpp) # Compiles the performance-tests foreach(ROUTINE ${LEVEL1_ROUTINES}) add_executable(clblast_client_${ROUTINE} $ - test/performance/routines/level1/${ROUTINE}.cc) + test/performance/routines/level1/${ROUTINE}.cpp) endforeach() foreach(ROUTINE ${LEVEL2_ROUTINES}) add_executable(clblast_client_${ROUTINE} $ - test/performance/routines/level2/${ROUTINE}.cc) + test/performance/routines/level2/${ROUTINE}.cpp) endforeach() foreach(ROUTINE ${LEVEL3_ROUTINES}) add_executable(clblast_client_${ROUTINE} $ - test/performance/routines/level3/${ROUTINE}.cc) + test/performance/routines/level3/${ROUTINE}.cpp) endforeach() foreach(ROUTINE ${LEVELX_ROUTINES}) add_executable(clblast_client_${ROUTINE} $ - test/performance/routines/levelx/${ROUTINE}.cc) + test/performance/routines/levelx/${ROUTINE}.cpp) endforeach() foreach(ROUTINE ${ROUTINES}) target_link_libraries(clblast_client_${ROUTINE} clblast ${REF_LIBRARIES} ${OPENCL_LIBRARIES}) @@ -310,24 +310,24 @@ if(TESTS) # Creates the common correctness-tests objects (requires CMake 2.8.8) add_library(test_correctness_common OBJECT - test/correctness/tester.cc test/correctness/testblas.cc) + test/correctness/tester.cpp test/correctness/testblas.cpp) # Compiles the correctness-tests foreach(ROUTINE ${LEVEL1_ROUTINES}) add_executable(clblast_test_${ROUTINE} $ - test/correctness/routines/level1/${ROUTINE}.cc) + test/correctness/routines/level1/${ROUTINE}.cpp) endforeach() foreach(ROUTINE ${LEVEL2_ROUTINES}) add_executable(clblast_test_${ROUTINE} $ - test/correctness/routines/level2/${ROUTINE}.cc) + test/correctness/routines/level2/${ROUTINE}.cpp) endforeach() foreach(ROUTINE ${LEVEL3_ROUTINES}) add_executable(clblast_test_${ROUTINE} $ - test/correctness/routines/level3/${ROUTINE}.cc) + test/correctness/routines/level3/${ROUTINE}.cpp) endforeach() foreach(ROUTINE ${LEVELX_ROUTINES}) add_executable(clblast_test_${ROUTINE} $ - test/correctness/routines/levelx/${ROUTINE}.cc) + test/correctness/routines/levelx/${ROUTINE}.cpp) endforeach() foreach(ROUTINE ${ROUTINES}) target_link_libraries(clblast_test_${ROUTINE} clblast ${REF_LIBRARIES} ${OPENCL_LIBRARIES}) diff --git a/README.md b/README.md index 26dfb149..5d2c0c9e 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ Note that CLBlast's tuners are based on the CLTune auto-tuning library, which ha Compiling with `-DTUNERS=ON` will generate a number of tuners, each named `clblast_tuner_xxxxx`, in which `xxxxx` corresponds to a `.opencl` kernel file as found in `src/kernels`. These kernels corresponds to routines (e.g. `xgemm`) or to common pre-processing or post-processing kernels (`copy` and `transpose`). Running such a tuner will test a number of parameter-value combinations on your device and report which one gave the best performance. Running `make alltuners` runs all tuners for all precisions in one go. You can set the default device and platform for `alltuners` by setting the `DEFAULT_DEVICE` and `DEFAULT_PLATFORM` environmental variables before running CMake. -The tuners output a JSON-file with the results. The best results need to be added to `include/internal/database/xxxxx.h` in the appropriate section. However, this can be done automatically based on the JSON-data using a Python script in `scripts/database/database.py`. If you want the found parameters to be included in future releases of CLBlast, please attach the JSON files to the corresponding issue on GitHub or [email the main author](http://www.cedricnugteren.nl). +The tuners output a JSON-file with the results. The best results need to be added to `include/internal/database/xxxxx.hpp` in the appropriate section. However, this can be done automatically based on the JSON-data using a Python script in `scripts/database/database.py`. If you want the found parameters to be included in future releases of CLBlast, please attach the JSON files to the corresponding issue on GitHub or [email the main author](http://www.cedricnugteren.nl). In summary, tuning the entire library for your device can be done as follows (starting from the root of the CLBlast folder): diff --git a/samples/sgemm.cc b/samples/sgemm.cpp similarity index 100% rename from samples/sgemm.cc rename to samples/sgemm.cpp diff --git a/scripts/generator/generator.py b/scripts/generator/generator.py index 1df4c8e6..cf01f79e 100644 --- a/scripts/generator/generator.py +++ b/scripts/generator/generator.py @@ -10,14 +10,14 @@ # This script automatically generates the bodies of the following files, creating the full CLBlast # API interface and implementation (C, C++, and reference BLAS wrappers): # clblast.h -# clblast.cc +# clblast.cpp # clblast_c.h -# clblast_c.cc +# clblast_c.cpp # wrapper_clblas.h # wrapper_cblas.h # It also generates the main functions for the correctness and performance tests as found in -# test/correctness/routines/levelX/xYYYY.cc -# test/performance/routines/levelX/xYYYY.cc +# test/correctness/routines/levelX/xYYYY.cpp +# test/performance/routines/levelX/xYYYY.cpp # It also produces the API documentation found in doc/clblast.md # # ================================================================================================== @@ -200,7 +200,7 @@ def clblast_h(routines): result += routine.RoutineHeaderCPP(12, " = nullptr")+";\n" return result -# The C++ API implementation (.cc) +# The C++ API implementation (.cpp) def clblast_cc(routines): result = "" for routine in routines: @@ -237,7 +237,7 @@ def clblast_c_h(routines): result += routine.RoutineHeaderC(flavour, 31, " PUBLIC_API")+";\n" return result -# The C API implementation (.cc) +# The C API implementation (.cpp) def clblast_c_cc(routines): result = "" for routine in routines: @@ -379,9 +379,9 @@ if len(sys.argv) != 2: path_clblast = sys.argv[1] files = [ path_clblast+"/include/clblast.h", - path_clblast+"/src/clblast.cc", + path_clblast+"/src/clblast.cpp", path_clblast+"/include/clblast_c.h", - path_clblast+"/src/clblast_c.cc", + path_clblast+"/src/clblast_c.cpp", path_clblast+"/test/wrapper_clblas.hpp", path_clblast+"/test/wrapper_cblas.hpp", ] @@ -433,7 +433,7 @@ for i in xrange(0,len(files)): for level in [1,2,3,4]: for routine in routines[level-1]: if routine.has_tests: - filename = path_clblast+"/test/correctness/routines/level"+levelnames[level-1]+"/x"+routine.name+".cc" + filename = path_clblast+"/test/correctness/routines/level"+levelnames[level-1]+"/x"+routine.name+".cpp" with open(filename, "w") as f: body = "" body += "#include \"test/correctness/testblas.hpp\"\n" @@ -459,7 +459,7 @@ for level in [1,2,3,4]: for level in [1,2,3,4]: for routine in routines[level-1]: if routine.has_tests: - filename = path_clblast+"/test/performance/routines/level"+levelnames[level-1]+"/x"+routine.name+".cc" + filename = path_clblast+"/test/performance/routines/level"+levelnames[level-1]+"/x"+routine.name+".cpp" with open(filename, "w") as f: body = "" body += "#include \"test/performance/client.hpp\"\n" diff --git a/src/cache.cc b/src/cache.cpp similarity index 100% rename from src/cache.cc rename to src/cache.cpp diff --git a/src/clblast.cc b/src/clblast.cpp similarity index 100% rename from src/clblast.cc rename to src/clblast.cpp diff --git a/src/clblast_c.cc b/src/clblast_c.cpp similarity index 100% rename from src/clblast_c.cc rename to src/clblast_c.cpp diff --git a/src/database/database.cc b/src/database/database.cpp similarity index 100% rename from src/database/database.cc rename to src/database/database.cpp diff --git a/src/routine.cc b/src/routine.cpp similarity index 100% rename from src/routine.cc rename to src/routine.cpp diff --git a/src/routines/common.cc b/src/routines/common.cpp similarity index 100% rename from src/routines/common.cc rename to src/routines/common.cpp diff --git a/src/routines/level1/xamax.cc b/src/routines/level1/xamax.cpp similarity index 100% rename from src/routines/level1/xamax.cc rename to src/routines/level1/xamax.cpp diff --git a/src/routines/level1/xasum.cc b/src/routines/level1/xasum.cpp similarity index 100% rename from src/routines/level1/xasum.cc rename to src/routines/level1/xasum.cpp diff --git a/src/routines/level1/xaxpy.cc b/src/routines/level1/xaxpy.cpp similarity index 100% rename from src/routines/level1/xaxpy.cc rename to src/routines/level1/xaxpy.cpp diff --git a/src/routines/level1/xcopy.cc b/src/routines/level1/xcopy.cpp similarity index 100% rename from src/routines/level1/xcopy.cc rename to src/routines/level1/xcopy.cpp diff --git a/src/routines/level1/xdot.cc b/src/routines/level1/xdot.cpp similarity index 100% rename from src/routines/level1/xdot.cc rename to src/routines/level1/xdot.cpp diff --git a/src/routines/level1/xdotc.cc b/src/routines/level1/xdotc.cpp similarity index 100% rename from src/routines/level1/xdotc.cc rename to src/routines/level1/xdotc.cpp diff --git a/src/routines/level1/xdotu.cc b/src/routines/level1/xdotu.cpp similarity index 100% rename from src/routines/level1/xdotu.cc rename to src/routines/level1/xdotu.cpp diff --git a/src/routines/level1/xnrm2.cc b/src/routines/level1/xnrm2.cpp similarity index 100% rename from src/routines/level1/xnrm2.cc rename to src/routines/level1/xnrm2.cpp diff --git a/src/routines/level1/xscal.cc b/src/routines/level1/xscal.cpp similarity index 100% rename from src/routines/level1/xscal.cc rename to src/routines/level1/xscal.cpp diff --git a/src/routines/level1/xswap.cc b/src/routines/level1/xswap.cpp similarity index 100% rename from src/routines/level1/xswap.cc rename to src/routines/level1/xswap.cpp diff --git a/src/routines/level2/xgbmv.cc b/src/routines/level2/xgbmv.cpp similarity index 100% rename from src/routines/level2/xgbmv.cc rename to src/routines/level2/xgbmv.cpp diff --git a/src/routines/level2/xgemv.cc b/src/routines/level2/xgemv.cpp similarity index 100% rename from src/routines/level2/xgemv.cc rename to src/routines/level2/xgemv.cpp diff --git a/src/routines/level2/xger.cc b/src/routines/level2/xger.cpp similarity index 100% rename from src/routines/level2/xger.cc rename to src/routines/level2/xger.cpp diff --git a/src/routines/level2/xgerc.cc b/src/routines/level2/xgerc.cpp similarity index 100% rename from src/routines/level2/xgerc.cc rename to src/routines/level2/xgerc.cpp diff --git a/src/routines/level2/xgeru.cc b/src/routines/level2/xgeru.cpp similarity index 100% rename from src/routines/level2/xgeru.cc rename to src/routines/level2/xgeru.cpp diff --git a/src/routines/level2/xhbmv.cc b/src/routines/level2/xhbmv.cpp similarity index 100% rename from src/routines/level2/xhbmv.cc rename to src/routines/level2/xhbmv.cpp diff --git a/src/routines/level2/xhemv.cc b/src/routines/level2/xhemv.cpp similarity index 100% rename from src/routines/level2/xhemv.cc rename to src/routines/level2/xhemv.cpp diff --git a/src/routines/level2/xher.cc b/src/routines/level2/xher.cpp similarity index 100% rename from src/routines/level2/xher.cc rename to src/routines/level2/xher.cpp diff --git a/src/routines/level2/xher2.cc b/src/routines/level2/xher2.cpp similarity index 100% rename from src/routines/level2/xher2.cc rename to src/routines/level2/xher2.cpp diff --git a/src/routines/level2/xhpmv.cc b/src/routines/level2/xhpmv.cpp similarity index 100% rename from src/routines/level2/xhpmv.cc rename to src/routines/level2/xhpmv.cpp diff --git a/src/routines/level2/xhpr.cc b/src/routines/level2/xhpr.cpp similarity index 100% rename from src/routines/level2/xhpr.cc rename to src/routines/level2/xhpr.cpp diff --git a/src/routines/level2/xhpr2.cc b/src/routines/level2/xhpr2.cpp similarity index 100% rename from src/routines/level2/xhpr2.cc rename to src/routines/level2/xhpr2.cpp diff --git a/src/routines/level2/xsbmv.cc b/src/routines/level2/xsbmv.cpp similarity index 100% rename from src/routines/level2/xsbmv.cc rename to src/routines/level2/xsbmv.cpp diff --git a/src/routines/level2/xspmv.cc b/src/routines/level2/xspmv.cpp similarity index 100% rename from src/routines/level2/xspmv.cc rename to src/routines/level2/xspmv.cpp diff --git a/src/routines/level2/xspr.cc b/src/routines/level2/xspr.cpp similarity index 100% rename from src/routines/level2/xspr.cc rename to src/routines/level2/xspr.cpp diff --git a/src/routines/level2/xspr2.cc b/src/routines/level2/xspr2.cpp similarity index 100% rename from src/routines/level2/xspr2.cc rename to src/routines/level2/xspr2.cpp diff --git a/src/routines/level2/xsymv.cc b/src/routines/level2/xsymv.cpp similarity index 100% rename from src/routines/level2/xsymv.cc rename to src/routines/level2/xsymv.cpp diff --git a/src/routines/level2/xsyr.cc b/src/routines/level2/xsyr.cpp similarity index 100% rename from src/routines/level2/xsyr.cc rename to src/routines/level2/xsyr.cpp diff --git a/src/routines/level2/xsyr2.cc b/src/routines/level2/xsyr2.cpp similarity index 100% rename from src/routines/level2/xsyr2.cc rename to src/routines/level2/xsyr2.cpp diff --git a/src/routines/level2/xtbmv.cc b/src/routines/level2/xtbmv.cpp similarity index 100% rename from src/routines/level2/xtbmv.cc rename to src/routines/level2/xtbmv.cpp diff --git a/src/routines/level2/xtpmv.cc b/src/routines/level2/xtpmv.cpp similarity index 100% rename from src/routines/level2/xtpmv.cc rename to src/routines/level2/xtpmv.cpp diff --git a/src/routines/level2/xtrmv.cc b/src/routines/level2/xtrmv.cpp similarity index 100% rename from src/routines/level2/xtrmv.cc rename to src/routines/level2/xtrmv.cpp diff --git a/src/routines/level3/xgemm.cc b/src/routines/level3/xgemm.cpp similarity index 100% rename from src/routines/level3/xgemm.cc rename to src/routines/level3/xgemm.cpp diff --git a/src/routines/level3/xhemm.cc b/src/routines/level3/xhemm.cpp similarity index 100% rename from src/routines/level3/xhemm.cc rename to src/routines/level3/xhemm.cpp diff --git a/src/routines/level3/xher2k.cc b/src/routines/level3/xher2k.cpp similarity index 100% rename from src/routines/level3/xher2k.cc rename to src/routines/level3/xher2k.cpp diff --git a/src/routines/level3/xherk.cc b/src/routines/level3/xherk.cpp similarity index 100% rename from src/routines/level3/xherk.cc rename to src/routines/level3/xherk.cpp diff --git a/src/routines/level3/xsymm.cc b/src/routines/level3/xsymm.cpp similarity index 100% rename from src/routines/level3/xsymm.cc rename to src/routines/level3/xsymm.cpp diff --git a/src/routines/level3/xsyr2k.cc b/src/routines/level3/xsyr2k.cpp similarity index 100% rename from src/routines/level3/xsyr2k.cc rename to src/routines/level3/xsyr2k.cpp diff --git a/src/routines/level3/xsyrk.cc b/src/routines/level3/xsyrk.cpp similarity index 100% rename from src/routines/level3/xsyrk.cc rename to src/routines/level3/xsyrk.cpp diff --git a/src/routines/level3/xtrmm.cc b/src/routines/level3/xtrmm.cpp similarity index 100% rename from src/routines/level3/xtrmm.cc rename to src/routines/level3/xtrmm.cpp diff --git a/src/routines/levelx/xomatcopy.cc b/src/routines/levelx/xomatcopy.cpp similarity index 100% rename from src/routines/levelx/xomatcopy.cc rename to src/routines/levelx/xomatcopy.cpp diff --git a/src/tuning/kernels/copy_fast.cc b/src/tuning/kernels/copy_fast.cpp similarity index 100% rename from src/tuning/kernels/copy_fast.cc rename to src/tuning/kernels/copy_fast.cpp diff --git a/src/tuning/kernels/copy_pad.cc b/src/tuning/kernels/copy_pad.cpp similarity index 100% rename from src/tuning/kernels/copy_pad.cc rename to src/tuning/kernels/copy_pad.cpp diff --git a/src/tuning/kernels/transpose_fast.cc b/src/tuning/kernels/transpose_fast.cpp similarity index 100% rename from src/tuning/kernels/transpose_fast.cc rename to src/tuning/kernels/transpose_fast.cpp diff --git a/src/tuning/kernels/transpose_pad.cc b/src/tuning/kernels/transpose_pad.cpp similarity index 100% rename from src/tuning/kernels/transpose_pad.cc rename to src/tuning/kernels/transpose_pad.cpp diff --git a/src/tuning/kernels/xaxpy.cc b/src/tuning/kernels/xaxpy.cpp similarity index 100% rename from src/tuning/kernels/xaxpy.cc rename to src/tuning/kernels/xaxpy.cpp diff --git a/src/tuning/kernels/xdot.cc b/src/tuning/kernels/xdot.cpp similarity index 100% rename from src/tuning/kernels/xdot.cc rename to src/tuning/kernels/xdot.cpp diff --git a/src/tuning/kernels/xgemm.cc b/src/tuning/kernels/xgemm.cpp similarity index 100% rename from src/tuning/kernels/xgemm.cc rename to src/tuning/kernels/xgemm.cpp diff --git a/src/tuning/kernels/xgemv.cc b/src/tuning/kernels/xgemv.cpp similarity index 100% rename from src/tuning/kernels/xgemv.cc rename to src/tuning/kernels/xgemv.cpp diff --git a/src/tuning/kernels/xger.cc b/src/tuning/kernels/xger.cpp similarity index 100% rename from src/tuning/kernels/xger.cc rename to src/tuning/kernels/xger.cpp diff --git a/src/utilities.cc b/src/utilities.cpp similarity index 100% rename from src/utilities.cc rename to src/utilities.cpp diff --git a/test/correctness/routines/level1/xamax.cc b/test/correctness/routines/level1/xamax.cpp similarity index 100% rename from test/correctness/routines/level1/xamax.cc rename to test/correctness/routines/level1/xamax.cpp diff --git a/test/correctness/routines/level1/xasum.cc b/test/correctness/routines/level1/xasum.cpp similarity index 100% rename from test/correctness/routines/level1/xasum.cc rename to test/correctness/routines/level1/xasum.cpp diff --git a/test/correctness/routines/level1/xaxpy.cc b/test/correctness/routines/level1/xaxpy.cpp similarity index 100% rename from test/correctness/routines/level1/xaxpy.cc rename to test/correctness/routines/level1/xaxpy.cpp diff --git a/test/correctness/routines/level1/xcopy.cc b/test/correctness/routines/level1/xcopy.cpp similarity index 100% rename from test/correctness/routines/level1/xcopy.cc rename to test/correctness/routines/level1/xcopy.cpp diff --git a/test/correctness/routines/level1/xdot.cc b/test/correctness/routines/level1/xdot.cpp similarity index 100% rename from test/correctness/routines/level1/xdot.cc rename to test/correctness/routines/level1/xdot.cpp diff --git a/test/correctness/routines/level1/xdotc.cc b/test/correctness/routines/level1/xdotc.cpp similarity index 100% rename from test/correctness/routines/level1/xdotc.cc rename to test/correctness/routines/level1/xdotc.cpp diff --git a/test/correctness/routines/level1/xdotu.cc b/test/correctness/routines/level1/xdotu.cpp similarity index 100% rename from test/correctness/routines/level1/xdotu.cc rename to test/correctness/routines/level1/xdotu.cpp diff --git a/test/correctness/routines/level1/xnrm2.cc b/test/correctness/routines/level1/xnrm2.cpp similarity index 100% rename from test/correctness/routines/level1/xnrm2.cc rename to test/correctness/routines/level1/xnrm2.cpp diff --git a/test/correctness/routines/level1/xrot.cc b/test/correctness/routines/level1/xrot.cpp similarity index 100% rename from test/correctness/routines/level1/xrot.cc rename to test/correctness/routines/level1/xrot.cpp diff --git a/test/correctness/routines/level1/xrotg.cc b/test/correctness/routines/level1/xrotg.cpp similarity index 100% rename from test/correctness/routines/level1/xrotg.cc rename to test/correctness/routines/level1/xrotg.cpp diff --git a/test/correctness/routines/level1/xrotm.cc b/test/correctness/routines/level1/xrotm.cpp similarity index 100% rename from test/correctness/routines/level1/xrotm.cc rename to test/correctness/routines/level1/xrotm.cpp diff --git a/test/correctness/routines/level1/xrotmg.cc b/test/correctness/routines/level1/xrotmg.cpp similarity index 100% rename from test/correctness/routines/level1/xrotmg.cc rename to test/correctness/routines/level1/xrotmg.cpp diff --git a/test/correctness/routines/level1/xscal.cc b/test/correctness/routines/level1/xscal.cpp similarity index 100% rename from test/correctness/routines/level1/xscal.cc rename to test/correctness/routines/level1/xscal.cpp diff --git a/test/correctness/routines/level1/xswap.cc b/test/correctness/routines/level1/xswap.cpp similarity index 100% rename from test/correctness/routines/level1/xswap.cc rename to test/correctness/routines/level1/xswap.cpp diff --git a/test/correctness/routines/level2/xgbmv.cc b/test/correctness/routines/level2/xgbmv.cpp similarity index 100% rename from test/correctness/routines/level2/xgbmv.cc rename to test/correctness/routines/level2/xgbmv.cpp diff --git a/test/correctness/routines/level2/xgemv.cc b/test/correctness/routines/level2/xgemv.cpp similarity index 100% rename from test/correctness/routines/level2/xgemv.cc rename to test/correctness/routines/level2/xgemv.cpp diff --git a/test/correctness/routines/level2/xger.cc b/test/correctness/routines/level2/xger.cpp similarity index 100% rename from test/correctness/routines/level2/xger.cc rename to test/correctness/routines/level2/xger.cpp diff --git a/test/correctness/routines/level2/xgerc.cc b/test/correctness/routines/level2/xgerc.cpp similarity index 100% rename from test/correctness/routines/level2/xgerc.cc rename to test/correctness/routines/level2/xgerc.cpp diff --git a/test/correctness/routines/level2/xgeru.cc b/test/correctness/routines/level2/xgeru.cpp similarity index 100% rename from test/correctness/routines/level2/xgeru.cc rename to test/correctness/routines/level2/xgeru.cpp diff --git a/test/correctness/routines/level2/xhbmv.cc b/test/correctness/routines/level2/xhbmv.cpp similarity index 100% rename from test/correctness/routines/level2/xhbmv.cc rename to test/correctness/routines/level2/xhbmv.cpp diff --git a/test/correctness/routines/level2/xhemv.cc b/test/correctness/routines/level2/xhemv.cpp similarity index 100% rename from test/correctness/routines/level2/xhemv.cc rename to test/correctness/routines/level2/xhemv.cpp diff --git a/test/correctness/routines/level2/xher.cc b/test/correctness/routines/level2/xher.cpp similarity index 100% rename from test/correctness/routines/level2/xher.cc rename to test/correctness/routines/level2/xher.cpp diff --git a/test/correctness/routines/level2/xher2.cc b/test/correctness/routines/level2/xher2.cpp similarity index 100% rename from test/correctness/routines/level2/xher2.cc rename to test/correctness/routines/level2/xher2.cpp diff --git a/test/correctness/routines/level2/xhpmv.cc b/test/correctness/routines/level2/xhpmv.cpp similarity index 100% rename from test/correctness/routines/level2/xhpmv.cc rename to test/correctness/routines/level2/xhpmv.cpp diff --git a/test/correctness/routines/level2/xhpr.cc b/test/correctness/routines/level2/xhpr.cpp similarity index 100% rename from test/correctness/routines/level2/xhpr.cc rename to test/correctness/routines/level2/xhpr.cpp diff --git a/test/correctness/routines/level2/xhpr2.cc b/test/correctness/routines/level2/xhpr2.cpp similarity index 100% rename from test/correctness/routines/level2/xhpr2.cc rename to test/correctness/routines/level2/xhpr2.cpp diff --git a/test/correctness/routines/level2/xsbmv.cc b/test/correctness/routines/level2/xsbmv.cpp similarity index 100% rename from test/correctness/routines/level2/xsbmv.cc rename to test/correctness/routines/level2/xsbmv.cpp diff --git a/test/correctness/routines/level2/xspmv.cc b/test/correctness/routines/level2/xspmv.cpp similarity index 100% rename from test/correctness/routines/level2/xspmv.cc rename to test/correctness/routines/level2/xspmv.cpp diff --git a/test/correctness/routines/level2/xspr.cc b/test/correctness/routines/level2/xspr.cpp similarity index 100% rename from test/correctness/routines/level2/xspr.cc rename to test/correctness/routines/level2/xspr.cpp diff --git a/test/correctness/routines/level2/xspr2.cc b/test/correctness/routines/level2/xspr2.cpp similarity index 100% rename from test/correctness/routines/level2/xspr2.cc rename to test/correctness/routines/level2/xspr2.cpp diff --git a/test/correctness/routines/level2/xsymv.cc b/test/correctness/routines/level2/xsymv.cpp similarity index 100% rename from test/correctness/routines/level2/xsymv.cc rename to test/correctness/routines/level2/xsymv.cpp diff --git a/test/correctness/routines/level2/xsyr.cc b/test/correctness/routines/level2/xsyr.cpp similarity index 100% rename from test/correctness/routines/level2/xsyr.cc rename to test/correctness/routines/level2/xsyr.cpp diff --git a/test/correctness/routines/level2/xsyr2.cc b/test/correctness/routines/level2/xsyr2.cpp similarity index 100% rename from test/correctness/routines/level2/xsyr2.cc rename to test/correctness/routines/level2/xsyr2.cpp diff --git a/test/correctness/routines/level2/xtbmv.cc b/test/correctness/routines/level2/xtbmv.cpp similarity index 100% rename from test/correctness/routines/level2/xtbmv.cc rename to test/correctness/routines/level2/xtbmv.cpp diff --git a/test/correctness/routines/level2/xtbsv.cc b/test/correctness/routines/level2/xtbsv.cpp similarity index 100% rename from test/correctness/routines/level2/xtbsv.cc rename to test/correctness/routines/level2/xtbsv.cpp diff --git a/test/correctness/routines/level2/xtpmv.cc b/test/correctness/routines/level2/xtpmv.cpp similarity index 100% rename from test/correctness/routines/level2/xtpmv.cc rename to test/correctness/routines/level2/xtpmv.cpp diff --git a/test/correctness/routines/level2/xtpsv.cc b/test/correctness/routines/level2/xtpsv.cpp similarity index 100% rename from test/correctness/routines/level2/xtpsv.cc rename to test/correctness/routines/level2/xtpsv.cpp diff --git a/test/correctness/routines/level2/xtrmv.cc b/test/correctness/routines/level2/xtrmv.cpp similarity index 100% rename from test/correctness/routines/level2/xtrmv.cc rename to test/correctness/routines/level2/xtrmv.cpp diff --git a/test/correctness/routines/level2/xtrsv.cc b/test/correctness/routines/level2/xtrsv.cpp similarity index 100% rename from test/correctness/routines/level2/xtrsv.cc rename to test/correctness/routines/level2/xtrsv.cpp diff --git a/test/correctness/routines/level3/xgemm.cc b/test/correctness/routines/level3/xgemm.cpp similarity index 100% rename from test/correctness/routines/level3/xgemm.cc rename to test/correctness/routines/level3/xgemm.cpp diff --git a/test/correctness/routines/level3/xhemm.cc b/test/correctness/routines/level3/xhemm.cpp similarity index 100% rename from test/correctness/routines/level3/xhemm.cc rename to test/correctness/routines/level3/xhemm.cpp diff --git a/test/correctness/routines/level3/xher2k.cc b/test/correctness/routines/level3/xher2k.cpp similarity index 100% rename from test/correctness/routines/level3/xher2k.cc rename to test/correctness/routines/level3/xher2k.cpp diff --git a/test/correctness/routines/level3/xherk.cc b/test/correctness/routines/level3/xherk.cpp similarity index 100% rename from test/correctness/routines/level3/xherk.cc rename to test/correctness/routines/level3/xherk.cpp diff --git a/test/correctness/routines/level3/xsymm.cc b/test/correctness/routines/level3/xsymm.cpp similarity index 100% rename from test/correctness/routines/level3/xsymm.cc rename to test/correctness/routines/level3/xsymm.cpp diff --git a/test/correctness/routines/level3/xsyr2k.cc b/test/correctness/routines/level3/xsyr2k.cpp similarity index 100% rename from test/correctness/routines/level3/xsyr2k.cc rename to test/correctness/routines/level3/xsyr2k.cpp diff --git a/test/correctness/routines/level3/xsyrk.cc b/test/correctness/routines/level3/xsyrk.cpp similarity index 100% rename from test/correctness/routines/level3/xsyrk.cc rename to test/correctness/routines/level3/xsyrk.cpp diff --git a/test/correctness/routines/level3/xtrmm.cc b/test/correctness/routines/level3/xtrmm.cpp similarity index 100% rename from test/correctness/routines/level3/xtrmm.cc rename to test/correctness/routines/level3/xtrmm.cpp diff --git a/test/correctness/routines/level3/xtrsm.cc b/test/correctness/routines/level3/xtrsm.cpp similarity index 100% rename from test/correctness/routines/level3/xtrsm.cc rename to test/correctness/routines/level3/xtrsm.cpp diff --git a/test/correctness/routines/levelx/xomatcopy.cc b/test/correctness/routines/levelx/xomatcopy.cpp similarity index 100% rename from test/correctness/routines/levelx/xomatcopy.cc rename to test/correctness/routines/levelx/xomatcopy.cpp diff --git a/test/correctness/testblas.cc b/test/correctness/testblas.cpp similarity index 100% rename from test/correctness/testblas.cc rename to test/correctness/testblas.cpp diff --git a/test/correctness/tester.cc b/test/correctness/tester.cpp similarity index 100% rename from test/correctness/tester.cc rename to test/correctness/tester.cpp diff --git a/test/performance/client.cc b/test/performance/client.cpp similarity index 100% rename from test/performance/client.cc rename to test/performance/client.cpp diff --git a/test/performance/routines/level1/xamax.cc b/test/performance/routines/level1/xamax.cpp similarity index 100% rename from test/performance/routines/level1/xamax.cc rename to test/performance/routines/level1/xamax.cpp diff --git a/test/performance/routines/level1/xasum.cc b/test/performance/routines/level1/xasum.cpp similarity index 100% rename from test/performance/routines/level1/xasum.cc rename to test/performance/routines/level1/xasum.cpp diff --git a/test/performance/routines/level1/xaxpy.cc b/test/performance/routines/level1/xaxpy.cpp similarity index 100% rename from test/performance/routines/level1/xaxpy.cc rename to test/performance/routines/level1/xaxpy.cpp diff --git a/test/performance/routines/level1/xcopy.cc b/test/performance/routines/level1/xcopy.cpp similarity index 100% rename from test/performance/routines/level1/xcopy.cc rename to test/performance/routines/level1/xcopy.cpp diff --git a/test/performance/routines/level1/xdot.cc b/test/performance/routines/level1/xdot.cpp similarity index 100% rename from test/performance/routines/level1/xdot.cc rename to test/performance/routines/level1/xdot.cpp diff --git a/test/performance/routines/level1/xdotc.cc b/test/performance/routines/level1/xdotc.cpp similarity index 100% rename from test/performance/routines/level1/xdotc.cc rename to test/performance/routines/level1/xdotc.cpp diff --git a/test/performance/routines/level1/xdotu.cc b/test/performance/routines/level1/xdotu.cpp similarity index 100% rename from test/performance/routines/level1/xdotu.cc rename to test/performance/routines/level1/xdotu.cpp diff --git a/test/performance/routines/level1/xnrm2.cc b/test/performance/routines/level1/xnrm2.cpp similarity index 100% rename from test/performance/routines/level1/xnrm2.cc rename to test/performance/routines/level1/xnrm2.cpp diff --git a/test/performance/routines/level1/xrot.cc b/test/performance/routines/level1/xrot.cpp similarity index 100% rename from test/performance/routines/level1/xrot.cc rename to test/performance/routines/level1/xrot.cpp diff --git a/test/performance/routines/level1/xrotg.cc b/test/performance/routines/level1/xrotg.cpp similarity index 100% rename from test/performance/routines/level1/xrotg.cc rename to test/performance/routines/level1/xrotg.cpp diff --git a/test/performance/routines/level1/xrotm.cc b/test/performance/routines/level1/xrotm.cpp similarity index 100% rename from test/performance/routines/level1/xrotm.cc rename to test/performance/routines/level1/xrotm.cpp diff --git a/test/performance/routines/level1/xrotmg.cc b/test/performance/routines/level1/xrotmg.cpp similarity index 100% rename from test/performance/routines/level1/xrotmg.cc rename to test/performance/routines/level1/xrotmg.cpp diff --git a/test/performance/routines/level1/xscal.cc b/test/performance/routines/level1/xscal.cpp similarity index 100% rename from test/performance/routines/level1/xscal.cc rename to test/performance/routines/level1/xscal.cpp diff --git a/test/performance/routines/level1/xswap.cc b/test/performance/routines/level1/xswap.cpp similarity index 100% rename from test/performance/routines/level1/xswap.cc rename to test/performance/routines/level1/xswap.cpp diff --git a/test/performance/routines/level2/xgbmv.cc b/test/performance/routines/level2/xgbmv.cpp similarity index 100% rename from test/performance/routines/level2/xgbmv.cc rename to test/performance/routines/level2/xgbmv.cpp diff --git a/test/performance/routines/level2/xgemv.cc b/test/performance/routines/level2/xgemv.cpp similarity index 100% rename from test/performance/routines/level2/xgemv.cc rename to test/performance/routines/level2/xgemv.cpp diff --git a/test/performance/routines/level2/xger.cc b/test/performance/routines/level2/xger.cpp similarity index 100% rename from test/performance/routines/level2/xger.cc rename to test/performance/routines/level2/xger.cpp diff --git a/test/performance/routines/level2/xgerc.cc b/test/performance/routines/level2/xgerc.cpp similarity index 100% rename from test/performance/routines/level2/xgerc.cc rename to test/performance/routines/level2/xgerc.cpp diff --git a/test/performance/routines/level2/xgeru.cc b/test/performance/routines/level2/xgeru.cpp similarity index 100% rename from test/performance/routines/level2/xgeru.cc rename to test/performance/routines/level2/xgeru.cpp diff --git a/test/performance/routines/level2/xhbmv.cc b/test/performance/routines/level2/xhbmv.cpp similarity index 100% rename from test/performance/routines/level2/xhbmv.cc rename to test/performance/routines/level2/xhbmv.cpp diff --git a/test/performance/routines/level2/xhemv.cc b/test/performance/routines/level2/xhemv.cpp similarity index 100% rename from test/performance/routines/level2/xhemv.cc rename to test/performance/routines/level2/xhemv.cpp diff --git a/test/performance/routines/level2/xher.cc b/test/performance/routines/level2/xher.cpp similarity index 100% rename from test/performance/routines/level2/xher.cc rename to test/performance/routines/level2/xher.cpp diff --git a/test/performance/routines/level2/xher2.cc b/test/performance/routines/level2/xher2.cpp similarity index 100% rename from test/performance/routines/level2/xher2.cc rename to test/performance/routines/level2/xher2.cpp diff --git a/test/performance/routines/level2/xhpmv.cc b/test/performance/routines/level2/xhpmv.cpp similarity index 100% rename from test/performance/routines/level2/xhpmv.cc rename to test/performance/routines/level2/xhpmv.cpp diff --git a/test/performance/routines/level2/xhpr.cc b/test/performance/routines/level2/xhpr.cpp similarity index 100% rename from test/performance/routines/level2/xhpr.cc rename to test/performance/routines/level2/xhpr.cpp diff --git a/test/performance/routines/level2/xhpr2.cc b/test/performance/routines/level2/xhpr2.cpp similarity index 100% rename from test/performance/routines/level2/xhpr2.cc rename to test/performance/routines/level2/xhpr2.cpp diff --git a/test/performance/routines/level2/xsbmv.cc b/test/performance/routines/level2/xsbmv.cpp similarity index 100% rename from test/performance/routines/level2/xsbmv.cc rename to test/performance/routines/level2/xsbmv.cpp diff --git a/test/performance/routines/level2/xspmv.cc b/test/performance/routines/level2/xspmv.cpp similarity index 100% rename from test/performance/routines/level2/xspmv.cc rename to test/performance/routines/level2/xspmv.cpp diff --git a/test/performance/routines/level2/xspr.cc b/test/performance/routines/level2/xspr.cpp similarity index 100% rename from test/performance/routines/level2/xspr.cc rename to test/performance/routines/level2/xspr.cpp diff --git a/test/performance/routines/level2/xspr2.cc b/test/performance/routines/level2/xspr2.cpp similarity index 100% rename from test/performance/routines/level2/xspr2.cc rename to test/performance/routines/level2/xspr2.cpp diff --git a/test/performance/routines/level2/xsymv.cc b/test/performance/routines/level2/xsymv.cpp similarity index 100% rename from test/performance/routines/level2/xsymv.cc rename to test/performance/routines/level2/xsymv.cpp diff --git a/test/performance/routines/level2/xsyr.cc b/test/performance/routines/level2/xsyr.cpp similarity index 100% rename from test/performance/routines/level2/xsyr.cc rename to test/performance/routines/level2/xsyr.cpp diff --git a/test/performance/routines/level2/xsyr2.cc b/test/performance/routines/level2/xsyr2.cpp similarity index 100% rename from test/performance/routines/level2/xsyr2.cc rename to test/performance/routines/level2/xsyr2.cpp diff --git a/test/performance/routines/level2/xtbmv.cc b/test/performance/routines/level2/xtbmv.cpp similarity index 100% rename from test/performance/routines/level2/xtbmv.cc rename to test/performance/routines/level2/xtbmv.cpp diff --git a/test/performance/routines/level2/xtbsv.cc b/test/performance/routines/level2/xtbsv.cpp similarity index 100% rename from test/performance/routines/level2/xtbsv.cc rename to test/performance/routines/level2/xtbsv.cpp diff --git a/test/performance/routines/level2/xtpmv.cc b/test/performance/routines/level2/xtpmv.cpp similarity index 100% rename from test/performance/routines/level2/xtpmv.cc rename to test/performance/routines/level2/xtpmv.cpp diff --git a/test/performance/routines/level2/xtpsv.cc b/test/performance/routines/level2/xtpsv.cpp similarity index 100% rename from test/performance/routines/level2/xtpsv.cc rename to test/performance/routines/level2/xtpsv.cpp diff --git a/test/performance/routines/level2/xtrmv.cc b/test/performance/routines/level2/xtrmv.cpp similarity index 100% rename from test/performance/routines/level2/xtrmv.cc rename to test/performance/routines/level2/xtrmv.cpp diff --git a/test/performance/routines/level2/xtrsv.cc b/test/performance/routines/level2/xtrsv.cpp similarity index 100% rename from test/performance/routines/level2/xtrsv.cc rename to test/performance/routines/level2/xtrsv.cpp diff --git a/test/performance/routines/level3/xgemm.cc b/test/performance/routines/level3/xgemm.cpp similarity index 100% rename from test/performance/routines/level3/xgemm.cc rename to test/performance/routines/level3/xgemm.cpp diff --git a/test/performance/routines/level3/xhemm.cc b/test/performance/routines/level3/xhemm.cpp similarity index 100% rename from test/performance/routines/level3/xhemm.cc rename to test/performance/routines/level3/xhemm.cpp diff --git a/test/performance/routines/level3/xher2k.cc b/test/performance/routines/level3/xher2k.cpp similarity index 100% rename from test/performance/routines/level3/xher2k.cc rename to test/performance/routines/level3/xher2k.cpp diff --git a/test/performance/routines/level3/xherk.cc b/test/performance/routines/level3/xherk.cpp similarity index 100% rename from test/performance/routines/level3/xherk.cc rename to test/performance/routines/level3/xherk.cpp diff --git a/test/performance/routines/level3/xsymm.cc b/test/performance/routines/level3/xsymm.cpp similarity index 100% rename from test/performance/routines/level3/xsymm.cc rename to test/performance/routines/level3/xsymm.cpp diff --git a/test/performance/routines/level3/xsyr2k.cc b/test/performance/routines/level3/xsyr2k.cpp similarity index 100% rename from test/performance/routines/level3/xsyr2k.cc rename to test/performance/routines/level3/xsyr2k.cpp diff --git a/test/performance/routines/level3/xsyrk.cc b/test/performance/routines/level3/xsyrk.cpp similarity index 100% rename from test/performance/routines/level3/xsyrk.cc rename to test/performance/routines/level3/xsyrk.cpp diff --git a/test/performance/routines/level3/xtrmm.cc b/test/performance/routines/level3/xtrmm.cpp similarity index 100% rename from test/performance/routines/level3/xtrmm.cc rename to test/performance/routines/level3/xtrmm.cpp diff --git a/test/performance/routines/level3/xtrsm.cc b/test/performance/routines/level3/xtrsm.cpp similarity index 100% rename from test/performance/routines/level3/xtrsm.cc rename to test/performance/routines/level3/xtrsm.cpp diff --git a/test/performance/routines/levelx/xomatcopy.cc b/test/performance/routines/levelx/xomatcopy.cpp similarity index 100% rename from test/performance/routines/levelx/xomatcopy.cc rename to test/performance/routines/levelx/xomatcopy.cpp