summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2016-10-10 22:45:39 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2016-10-10 22:45:39 +0200
commit8a9d3cdf3733ed03093ec5c6e4a65549646a6c74 (patch)
tree60f815cc37a95a89368689ed883d70eb55ffdde7
parentf88c50522d6ff832a81f20384e9745ce8cef0625 (diff)
Added support for compiling the library, the client, and the samples under MSVC 2013
-rw-r--r--CHANGELOG1
-rw-r--r--README.md2
-rw-r--r--include/clblast_half.h5
-rw-r--r--src/utilities.hpp2
4 files changed, 8 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 87ecccce..34e1736b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -3,6 +3,7 @@ Development version (next release)
- Updated to version 8.0 of the CLCudaAPI C++11 OpenCL header
- Improved performance of GEMM kernels for small sizes by using a direct single-kernel implementation
- Fixed a bug in the tests and samples related to waiting for an invalid event
+- Added support for compilation under Visual Studio 2013 (MSVC++ 12.0)
- Added an option to set OpenCL compiler options through the env variable CLBLAST_BUILD_OPTIONS
- Added an option to run tuned kernels multiple times to average execution times
- Various minor fixes and enhancements
diff --git a/README.md b/README.md
index f53b4dda..a8e79c39 100644
--- a/README.md
+++ b/README.md
@@ -48,7 +48,7 @@ The pre-requisites for compilation of CLBlast are:
- Clang 3.3 or newer
- AppleClang 5.0 or newer
- ICC 14.0 or newer
- - MSVC (Visual Studio) 2015 or newer
+ - MSVC (Visual Studio) 2013 or newer
* An OpenCL 1.1 or newer library, for example:
- Apple OpenCL
- NVIDIA CUDA SDK
diff --git a/include/clblast_half.h b/include/clblast_half.h
index 269a520e..05d96f9f 100644
--- a/include/clblast_half.h
+++ b/include/clblast_half.h
@@ -25,6 +25,11 @@
#include <CL/opencl.h>
#endif
+// MSVC 2013 doesn't fully support C99
+#ifdef _MSC_VER
+ #define inline __inline
+#endif
+
// =================================================================================================
// Host data-type for half-precision floating-point (16-bit). This is based on the OpenCL type,
diff --git a/src/utilities.hpp b/src/utilities.hpp
index 02dda069..3074c65a 100644
--- a/src/utilities.hpp
+++ b/src/utilities.hpp
@@ -210,7 +210,7 @@ bool CheckArgument(const int argc, char *argv[], std::string &help, const std::s
// =================================================================================================
// Helper function to check for errors in the status code
-constexpr bool ErrorIn(const StatusCode s) { return (s != StatusCode::kSuccess); }
+inline bool ErrorIn(const StatusCode s) { return (s != StatusCode::kSuccess); }
// =================================================================================================