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/level1 | |
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/level1')
-rw-r--r-- | src/routines/level1/xamax.cc | 4 | ||||
-rw-r--r-- | src/routines/level1/xasum.cc | 4 | ||||
-rw-r--r-- | src/routines/level1/xaxpy.cc | 4 | ||||
-rw-r--r-- | src/routines/level1/xcopy.cc | 4 | ||||
-rw-r--r-- | src/routines/level1/xdot.cc | 6 | ||||
-rw-r--r-- | src/routines/level1/xnrm2.cc | 4 | ||||
-rw-r--r-- | src/routines/level1/xscal.cc | 2 | ||||
-rw-r--r-- | src/routines/level1/xswap.cc | 4 |
8 files changed, 16 insertions, 16 deletions
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<T>::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<T>::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<T>::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<T>::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<T>::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<T>::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<T>::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<T>::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 |