Skip to content

Commit

Permalink
Overload Eigen::numext::signbit instead of template specializing it.
Browse files Browse the repository at this point in the history
This fixes an internal issue.

PiperOrigin-RevId: 713851691
  • Loading branch information
reedwm authored and The ml_dtypes Authors committed Jan 10, 2025
1 parent 3205923 commit adfb8e1
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion ml_dtypes/include/mxfloat.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ namespace Eigen {
namespace numext {

#define MXFLOAT_EIGEN_SIGNBIT_IMPL(Type) \
template <> \
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE Type signbit(const Type& x) { \
int8_t t = bit_cast<int8_t, Type>(x) << (8 - Type::kBits); \
return bit_cast<Type, int8_t>(t >> 7); \
Expand Down

0 comments on commit adfb8e1

Please sign in to comment.