diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2016-04-30 09:49:39 +0200 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2016-04-30 09:49:39 +0200 |
commit | e113ff0852d21ecb898b3b192145b70cad3f338a (patch) | |
tree | d380ab9a413394f4d3901c131d0c8a02ab80e025 /src/kernels/level1/xamax.opencl | |
parent | 2952390f27c07500bd2a24b5e6fdce5e282fc8dd (diff) |
Added non-aboslute minimum counter-part IxMIN of the BLAS routine IxAMAX
Diffstat (limited to 'src/kernels/level1/xamax.opencl')
-rw-r--r-- | src/kernels/level1/xamax.opencl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/kernels/level1/xamax.opencl b/src/kernels/level1/xamax.opencl index 58b75ce2..48d0eb5c 100644 --- a/src/kernels/level1/xamax.opencl +++ b/src/kernels/level1/xamax.opencl @@ -41,7 +41,7 @@ __kernel void Xamax(const int n, const int num_groups = get_num_groups(0); // Performs loading and the first steps of the reduction - #if defined(ROUTINE_MAX) // non-absolute version + #if defined(ROUTINE_MAX) || defined(ROUTINE_MIN) // non-absolute version singlereal max = SMALLEST; #else singlereal max = ZERO; @@ -55,7 +55,10 @@ __kernel void Xamax(const int n, #else singlereal x = xgm[x_index]; #endif - #if defined(ROUTINE_MAX) // non-absolute version + #if defined(ROUTINE_MAX) // non-absolute maximum version + // nothing special here + #elif defined(ROUTINE_MIN) // non-absolute minimum version + x = -x; #else x = fabs(x); #endif |