Skip to content

Commit

Permalink
Fix disable fp contractions warning on msvc (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuhancn authored Mar 18, 2024
1 parent 29391cc commit 36907bb
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/libm/sleefdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ extern const double Sleef_rempitabdp[];

#if defined(_MSC_VER) && !defined (__clang__)
#pragma fp_contract (off)
#endif

#else
#pragma STDC FP_CONTRACT OFF
#endif

#define MLA mla
#define C2V(x) (x)
Expand Down
4 changes: 2 additions & 2 deletions src/libm/sleefinline_header.h.org
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

#if defined(_MSC_VER) && !defined (__clang__)
#pragma fp_contract (off)
#endif

#else
#pragma STDC FP_CONTRACT OFF
#endif

#ifndef SLEEF_FP_ILOGB0
#define SLEEF_FP_ILOGB0 ((int)0x80000000)
Expand Down
4 changes: 2 additions & 2 deletions src/libm/sleefsimddp.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ extern const double Sleef_rempitabdp[];

#if defined(_MSC_VER) && !defined (__clang__)
#pragma fp_contract (off)
#endif

#else
#pragma STDC FP_CONTRACT OFF
#endif

// Intel

Expand Down
4 changes: 2 additions & 2 deletions src/libm/sleefsimdsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ extern const float Sleef_rempitabsp[];

#if defined(_MSC_VER) && !defined (__clang__)
#pragma fp_contract (off)
#endif

#else
#pragma STDC FP_CONTRACT OFF
#endif

// Intel

Expand Down
4 changes: 2 additions & 2 deletions src/libm/sleefsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ extern const float Sleef_rempitabsp[];

#if defined(_MSC_VER) && !defined (__clang__)
#pragma fp_contract (off)
#endif

#else
#pragma STDC FP_CONTRACT OFF
#endif

#define MLA mlaf
#define C2V(x) (x)
Expand Down
2 changes: 2 additions & 0 deletions src/quad/sleefquadinline_cuda_header.h.org
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#if defined(_MSC_VER) && !defined (__clang__)
#pragma fp_contract (off)
#else
#pragma STDC FP_CONTRACT OFF
#endif

__device__ const double Sleef_rempitabqp[] = {
Expand Down
4 changes: 2 additions & 2 deletions src/quad/sleefquadinline_header.h.org
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

#if defined(_MSC_VER) && !defined (__clang__)
#pragma fp_contract (off)
#endif

#else
#pragma STDC FP_CONTRACT OFF
#endif

#ifndef SLEEF_FP_ILOGB0
#define SLEEF_FP_ILOGB0 ((int)0x80000000)
Expand Down
4 changes: 2 additions & 2 deletions src/quad/sleefsimdqp.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ extern const double Sleef_rempitabqp[];

#if defined(_MSC_VER) && !defined (__clang__)
#pragma fp_contract (off)
#endif

#else
#pragma STDC FP_CONTRACT OFF
#endif

#ifdef ENABLE_PUREC_SCALAR
#define CONFIG 1
Expand Down

0 comments on commit 36907bb

Please sign in to comment.