diff options
author | Ivan Shapovalov <intelfx@intelfx.name> | 2016-10-22 05:14:19 +0300 |
---|---|---|
committer | Ivan Shapovalov <intelfx@intelfx.name> | 2016-10-22 08:45:25 +0300 |
commit | b98af44fcf89b9946e1de438b1f5527e6bf28905 (patch) | |
tree | fbd5ec2ab1e418830b88e5de42279845911ea0da /src/routines/level1/xamax.hpp | |
parent | 5d03d48f7aaf38d3b28bad612638d2d9db8ebee0 (diff) |
treewide: use C++ exceptions properly
Since the codebase is designed around proper C++ idioms such as RAII, it
makes sense to only use C++ exceptions internally instead of mixing
exceptions and error codes. The exceptions are now caught at top level
to preserve compatibility with the existing error code-based API.
Note that we deliberately do not catch C++ runtime errors (such as
`std::bad_alloc`) nor logic errors (aka failed assertions) because no
actual handling can ever happen for such errors.
However, in the C interface we do catch _all_ exceptions (...) and
convert them into a wild-card error code.
Diffstat (limited to 'src/routines/level1/xamax.hpp')
-rw-r--r-- | src/routines/level1/xamax.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/routines/level1/xamax.hpp b/src/routines/level1/xamax.hpp index aa45a8e4..4d1e0082 100644 --- a/src/routines/level1/xamax.hpp +++ b/src/routines/level1/xamax.hpp @@ -28,9 +28,9 @@ class Xamax: public Routine { Xamax(Queue &queue, EventPointer event, const std::string &name = "AMAX"); // Templated-precision implementation of the routine - StatusCode DoAmax(const size_t n, - const Buffer<unsigned int> &imax_buffer, const size_t imax_offset, - const Buffer<T> &x_buffer, const size_t x_offset, const size_t x_inc); + void DoAmax(const size_t n, + const Buffer<unsigned int> &imax_buffer, const size_t imax_offset, + const Buffer<T> &x_buffer, const size_t x_offset, const size_t x_inc); }; // ================================================================================================= |