summaryrefslogtreecommitdiff
path: root/src/kernels/level1/xamax.opencl
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernels/level1/xamax.opencl')
-rw-r--r--src/kernels/level1/xamax.opencl4
1 files changed, 2 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;
}