diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-06-26 21:38:04 +0200 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-06-26 21:38:04 +0200 |
commit | ce528a9d39a976760f84c194016f22fc493a5d57 (patch) | |
tree | dc0bd7d633f18ad3281bae9c68b48b9818b573e3 | |
parent | a823edb65ffadd21bb825b9e2184e09a06879c1d (diff) |
Fixed and suppresses several warnings for MSVC
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | test/routines/levelx/xaxpybatched.hpp | 2 | ||||
-rw-r--r-- | test/routines/levelx/xgemmbatched.hpp | 4 |
4 files changed, 5 insertions, 4 deletions
@@ -2,6 +2,7 @@ Development (next version) - Fixed a bug in the TRSM routine for alpha != 1 - Fixed a bug in the cache related to multi-device contexts (thanks to 'kpot') +- Fixed several warnings for MSVC and Clang - Performance reports are now external at https://cnugteren.github.io/clblast - Greatly improved compilation time of database.cpp - Various minor fixes and enhancements diff --git a/CMakeLists.txt b/CMakeLists.txt index 94d9cbc2..e549a63a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,7 +77,7 @@ endif(MSVC) # C++ compiler settings if(MSVC) set(FLAGS "/Ot") - set(FLAGS "${FLAGS} /wd4715") + set(FLAGS "${FLAGS} /wd4715 /D_CRT_SECURE_NO_WARNINGS") else() set(FLAGS "-std=c++11") if(VERBOSE) diff --git a/test/routines/levelx/xaxpybatched.hpp b/test/routines/levelx/xaxpybatched.hpp index 5385e86e..4a8fc564 100644 --- a/test/routines/levelx/xaxpybatched.hpp +++ b/test/routines/levelx/xaxpybatched.hpp @@ -62,7 +62,7 @@ class TestXaxpyBatched { for (auto batch = size_t{0}; batch < args.batch_count; ++batch) { args.x_offsets[batch] = batch * PerBatchSizeX(args) + args.x_offset; args.y_offsets[batch] = batch * PerBatchSizeY(args) + args.y_offset; - args.alphas[batch] = args.alpha + Constant<T>(batch); + args.alphas[batch] = args.alpha + Constant<T>(static_cast<double>(batch)); } } diff --git a/test/routines/levelx/xgemmbatched.hpp b/test/routines/levelx/xgemmbatched.hpp index ebfd8b19..56823e47 100644 --- a/test/routines/levelx/xgemmbatched.hpp +++ b/test/routines/levelx/xgemmbatched.hpp @@ -86,8 +86,8 @@ class TestXgemmBatched { args.a_offsets[batch] = batch * PerBatchSizeA(args) + args.a_offset; args.b_offsets[batch] = batch * PerBatchSizeB(args) + args.b_offset; args.c_offsets[batch] = batch * PerBatchSizeC(args) + args.c_offset; - args.alphas[batch] = args.alpha + Constant<T>(batch); - args.betas[batch] = args.beta + Constant<T>(batch); + args.alphas[batch] = args.alpha + Constant<T>(static_cast<double>(batch)); + args.betas[batch] = args.beta + Constant<T>(static_cast<double>(batch)); } } |