Skip to content

Commit

Permalink
Update to latest libdivide
Browse files Browse the repository at this point in the history
  • Loading branch information
kimwalisch committed Jul 30, 2024
1 parent cae04cd commit 8615966
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions include/libdivide.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
#include <stdlib.h>
#endif

#ifdef __cplusplus
// Required for std::nullptr_t
#include <cstddef>
#endif

#if defined(LIBDIVIDE_SSE2)
#include <emmintrin.h>
#endif
Expand Down Expand Up @@ -3086,7 +3081,7 @@ struct NeonVecFor {
#define DISPATCHER_GEN(T, ALGO) \
libdivide_##ALGO##_t denom; \
LIBDIVIDE_INLINE dispatcher() {} \
explicit LIBDIVIDE_CONSTEXPR dispatcher(std::nullptr_t) : denom{} {} \
explicit LIBDIVIDE_CONSTEXPR dispatcher(decltype(nullptr)) : denom{} {} \
LIBDIVIDE_INLINE dispatcher(T d) : denom(libdivide_##ALGO##_gen(d)) {} \
LIBDIVIDE_INLINE T divide(T n) const { return libdivide_##ALGO##_do(n, &denom); } \
LIBDIVIDE_INLINE T recover() const { return libdivide_##ALGO##_recover(&denom); } \
Expand Down Expand Up @@ -3179,7 +3174,7 @@ class divider {
divider() {}

// constexpr zero-initialization to allow for use w/ static constinit
explicit LIBDIVIDE_CONSTEXPR divider(std::nullptr_t) : div(nullptr) {}
explicit LIBDIVIDE_CONSTEXPR divider(decltype(nullptr)) : div(nullptr) {}

// Constructor that takes the divisor as a parameter
LIBDIVIDE_INLINE divider(T d) : div(d) {}
Expand Down

0 comments on commit 8615966

Please sign in to comment.