diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-04-07 07:34:32 +0200 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-04-07 07:34:32 +0200 |
commit | ce369702d88a679d906677d9266a17cb72d78ff7 (patch) | |
tree | fbac130a5de190f476aeb7cf073169e5d4cdba90 /src/routines/level1/xaxpy.cpp | |
parent | ea0aeadc34cdc3e352aea537d5265dd447afa1f6 (diff) |
Added some missing const-ness
Diffstat (limited to 'src/routines/level1/xaxpy.cpp')
-rw-r--r-- | src/routines/level1/xaxpy.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/routines/level1/xaxpy.cpp b/src/routines/level1/xaxpy.cpp index 39f61ef4..310562a0 100644 --- a/src/routines/level1/xaxpy.cpp +++ b/src/routines/level1/xaxpy.cpp @@ -44,12 +44,12 @@ void Xaxpy<T>::DoAxpy(const size_t n, const T alpha, TestVectorY(n, y_buffer, y_offset, y_inc); // Determines whether or not the fast-version can be used - bool use_fast_kernel = (x_offset == 0) && (x_inc == 1) && - (y_offset == 0) && (y_inc == 1) && - IsMultiple(n, db_["WGS"]*db_["WPT"]*db_["VW"]); + const auto use_fast_kernel = (x_offset == 0) && (x_inc == 1) && + (y_offset == 0) && (y_inc == 1) && + IsMultiple(n, db_["WGS"]*db_["WPT"]*db_["VW"]); // If possible, run the fast-version of the kernel - auto kernel_name = (use_fast_kernel) ? "XaxpyFast" : "Xaxpy"; + const auto kernel_name = (use_fast_kernel) ? "XaxpyFast" : "Xaxpy"; // Retrieves the Xaxpy kernel from the compiled binary auto kernel = Kernel(program_, kernel_name); @@ -79,7 +79,7 @@ void Xaxpy<T>::DoAxpy(const size_t n, const T alpha, RunKernel(kernel, queue_, device_, global, local, event_); } else { - auto n_ceiled = Ceil(n, db_["WGS"]*db_["WPT"]); + const auto n_ceiled = Ceil(n, db_["WGS"]*db_["WPT"]); auto global = std::vector<size_t>{n_ceiled/db_["WPT"]}; auto local = std::vector<size_t>{db_["WGS"]}; RunKernel(kernel, queue_, device_, global, local, event_); |