diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2023-05-07 20:02:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-07 20:02:52 +0200 |
commit | 3d0c227fa5004067d857c74f7963876b34ed4170 (patch) | |
tree | 3ff7c3766f1c2f13717ecc4a819da0815fa7cdb3 /src | |
parent | 1573f7d3040ddb6005e71bf4f770566f627236d2 (diff) |
AMAX/AMIN integer testing and bug fixes (#457)
* Fixed a bug in XAMAX/XMIN routines that caused the increment and offset to be included in the result
* Perform proper integer-output testing in XAMAX tests
* A few changes towards getting it ready for a PR
* Also fix compilation for clBLAS and cuBLAS references
* Fix a bug that would only use the real part of complex numbers in the amax/amin routines
* A few small fixes related to the AMAX tests
Diffstat (limited to 'src')
-rw-r--r-- | src/kernels/level1/xamax.opencl | 4 | ||||
-rw-r--r-- | src/utilities/utilities.hpp | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/kernels/level1/xamax.opencl b/src/kernels/level1/xamax.opencl index 06a6773b..7cbbd6b5 100644 --- a/src/kernels/level1/xamax.opencl +++ b/src/kernels/level1/xamax.opencl @@ -55,7 +55,7 @@ void Xamax(const int n, while (id < n) { const int x_index = id*x_inc + x_offset; #if PRECISION == 3232 || PRECISION == 6464 - singlereal x = xgm[x_index].x; + singlereal x = fabs(xgm[x_index].x) + fabs(xgm[x_index].y); #else singlereal x = xgm[x_index]; #endif @@ -70,7 +70,7 @@ void Xamax(const int n, #endif if (x > max) { max = x; - imax = id*x_inc + x_offset; + imax = id; } id += WGS1*num_groups; } diff --git a/src/utilities/utilities.hpp b/src/utilities/utilities.hpp index b66df118..3ed51dd6 100644 --- a/src/utilities/utilities.hpp +++ b/src/utilities/utilities.hpp @@ -133,6 +133,7 @@ constexpr auto kBufMatB = "B"; constexpr auto kBufMatC = "C"; constexpr auto kBufMatAP = "AP"; constexpr auto kBufScalar = "Scalar"; +constexpr auto kBufScalarUint = "ScalarUint"; // ================================================================================================= |