From bbe5dcf2251452432878d259b2b2f6e4fa9ce532 Mon Sep 17 00:00:00 2001 From: conrad Date: Fri, 11 Jul 2025 20:45:49 +1000 Subject: [PATCH] add is_blas_cx trait --- include/armadillo_bits/traits.hpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/include/armadillo_bits/traits.hpp b/include/armadillo_bits/traits.hpp index 3367e290..b560b6df 100644 --- a/include/armadillo_bits/traits.hpp +++ b/include/armadillo_bits/traits.hpp @@ -1046,8 +1046,27 @@ struct is_cx static constexpr bool no = true; }; +// template<> +template +struct is_cx< std::complex > + { + static constexpr bool value = true; + static constexpr bool yes = true; + static constexpr bool no = false; + }; + + + +template +struct is_blas_cx + { + static constexpr bool value = false; + static constexpr bool yes = false; + static constexpr bool no = true; + }; + template<> -struct is_cx< std::complex > +struct is_blas_cx< std::complex > { static constexpr bool value = true; static constexpr bool yes = true; @@ -1055,7 +1074,7 @@ struct is_cx< std::complex > }; template<> -struct is_cx< std::complex > +struct is_blas_cx< std::complex > { static constexpr bool value = true; static constexpr bool yes = true;