diff options
author | Borislav Stanimirov <b.stanimirov@abv.bg> | 2023-06-16 21:23:53 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-16 21:23:53 +0300 |
commit | 9cbf50c041a525d781c7764f493a5443924e4e38 (patch) | |
tree | 73c6331d8f95335616f3a20f71a9ad259431c3b7 /tests/test-quantize-fns.cpp | |
parent | 3d0112261042b356621e93db3fa4c6798a5d098f (diff) |
build : fix and ignore MSVC warnings (#1889)
Diffstat (limited to 'tests/test-quantize-fns.cpp')
-rw-r--r-- | tests/test-quantize-fns.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/test-quantize-fns.cpp b/tests/test-quantize-fns.cpp index 728460b5..c40f1b29 100644 --- a/tests/test-quantize-fns.cpp +++ b/tests/test-quantize-fns.cpp @@ -9,12 +9,15 @@ #include <string> #include <vector> - -const float MAX_QUANTIZATION_REFERENCE_ERROR = 0.0001; -const float MAX_QUANTIZATION_TOTAL_ERROR = 0.002; -const float MAX_QUANTIZATION_TOTAL_ERROR_2BITS = 0.0075; -const float MAX_QUANTIZATION_TOTAL_ERROR_3BITS = 0.0040; -const float MAX_DOT_PRODUCT_ERROR = 0.02; +#if defined(_MSC_VER) +#pragma warning(disable: 4244 4267) // possible loss of data +#endif + +const float MAX_QUANTIZATION_REFERENCE_ERROR = 0.0001f; +const float MAX_QUANTIZATION_TOTAL_ERROR = 0.002f; +const float MAX_QUANTIZATION_TOTAL_ERROR_2BITS = 0.0075f; +const float MAX_QUANTIZATION_TOTAL_ERROR_3BITS = 0.0040f; +const float MAX_DOT_PRODUCT_ERROR = 0.02f; const char* RESULT_STR[] = {"ok", "FAILED"}; |