Skip to content

Commit

Permalink
GCCCCCCC
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Nov 23, 2023
1 parent 9b59014 commit 6f4288c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/math_approx/src/log_approx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ namespace log_detail
}

#if defined(__GNUC__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wstrict-aliasing" // these methods require some type-punning
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing" // these methods require some type-punning
#endif

/** approximation for log(Base, x) (32-bit) */
Expand Down Expand Up @@ -116,7 +116,7 @@ xsimd::batch<double> log (xsimd::batch<double> x)
#endif

#if defined(__GNUC__)
#pragma clang diagnostic pop // end ignore strict-aliasing
#pragma GCC diagnostic pop // end ignore strict-aliasing warnings
#endif

template <int order, typename T>
Expand Down
9 changes: 9 additions & 0 deletions include/math_approx/src/pow_approx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ namespace pow_detail
};
}

#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing" // these methods require some type-punning
#endif

/** approximation for pow(Base, x) (32-bit) */
template <typename Base, int order>
float pow (float x)
Expand Down Expand Up @@ -127,6 +132,10 @@ xsimd::batch<double> pow (xsimd::batch<double> x)
}
#endif

#if defined(__GNUC__)
#pragma GCC diagnostic pop // end ignore strict-aliasing warnings
#endif

template <int order, typename T>
T exp (T x)
{
Expand Down

0 comments on commit 6f4288c

Please sign in to comment.