diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2016-06-17 11:29:07 +0200 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2016-06-17 11:29:07 +0200 |
commit | afe8852eaae20fbdd3f38e9cac63a9162251d90b (patch) | |
tree | d34fe7dd2fe095a34bb4544cade644d52baa1f30 /src/routines/level2 | |
parent | 52ccaf5b25e14c9ce032315e5e96b1f27886d481 (diff) |
Moved the test-for-valid-buffers function from the Routine class to separate functions in a separate file
Diffstat (limited to 'src/routines/level2')
-rw-r--r-- | src/routines/level2/xgemv.cc | 8 | ||||
-rw-r--r-- | src/routines/level2/xger.cc | 6 | ||||
-rw-r--r-- | src/routines/level2/xher.cc | 6 | ||||
-rw-r--r-- | src/routines/level2/xher2.cc | 8 |
4 files changed, 14 insertions, 14 deletions
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<T>::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<T>::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<T,U>::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<T>::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) |