From a9472ed9e6c7f2db194c6ace9419aa6e5c82aa45 Mon Sep 17 00:00:00 2001 From: Amit Sabne Date: Mon, 16 Dec 2024 07:44:30 -0800 Subject: [PATCH] [XLA] Start adding S1 and U1 as data types PiperOrigin-RevId: 706706372 --- ml_dtypes/include/intn.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ml_dtypes/include/intn.h b/ml_dtypes/include/intn.h index 5d0311f1..f939be09 100644 --- a/ml_dtypes/include/intn.h +++ b/ml_dtypes/include/intn.h @@ -241,7 +241,9 @@ struct intN { } }; +using int1 = intN<1, int8_t>; using int2 = intN<2, int8_t>; +using uint1 = intN<1, uint8_t>; using uint2 = intN<2, uint8_t>; using int4 = intN<4, int8_t>; using uint4 = intN<4, uint8_t>; @@ -294,7 +296,12 @@ struct intN_numeric_limits_base { } // namespace ml_dtypes namespace std { - +template <> +struct numeric_limits + : public ml_dtypes::internal::intN_numeric_limits_base {}; +template <> +struct numeric_limits + : public ml_dtypes::internal::intN_numeric_limits_base {}; template <> struct numeric_limits : public ml_dtypes::internal::intN_numeric_limits_base {};