summaryrefslogtreecommitdiff
path: root/src/routines/levelx/xaxpybatched.cpp
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2017-09-19 19:44:34 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2017-09-19 19:44:34 +0200
commitae1eeb4d1f13203ee412bc739f477570e6781090 (patch)
tree39d382f16667d4b1e9a8ce5f7d062f76e4408166 /src/routines/levelx/xaxpybatched.cpp
parent1d2ee29cb9207ce53d52de40b790628bee2ef4da (diff)
Fixed type conversion warnings under MSVC 2013
Diffstat (limited to 'src/routines/levelx/xaxpybatched.cpp')
-rw-r--r--src/routines/levelx/xaxpybatched.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/routines/levelx/xaxpybatched.cpp b/src/routines/levelx/xaxpybatched.cpp
index 6a4269be..0b755ccf 100644
--- a/src/routines/levelx/xaxpybatched.cpp
+++ b/src/routines/levelx/xaxpybatched.cpp
@@ -53,8 +53,12 @@ void XaxpyBatched<T>::DoAxpyBatched(const size_t n, const std::vector<T> &alphas
}
// Upload the arguments to the device
- std::vector<int> x_offsets_int(x_offsets.begin(), x_offsets.end());
- std::vector<int> y_offsets_int(y_offsets.begin(), y_offsets.end());
+ auto x_offsets_int = std::vector<int>(batch_count);
+ auto y_offsets_int = std::vector<int>(batch_count);
+ for (auto batch = size_t{ 0 }; batch < batch_count; ++batch) {
+ x_offsets_int[batch] = static_cast<int>(x_offsets[batch]);
+ y_offsets_int[batch] = static_cast<int>(y_offsets[batch]);
+ }
auto x_offsets_device = Buffer<int>(context_, BufferAccess::kReadOnly, batch_count);
auto y_offsets_device = Buffer<int>(context_, BufferAccess::kReadOnly, batch_count);
auto alphas_device = Buffer<T>(context_, BufferAccess::kReadOnly, batch_count);