diff --git a/src/core/matpack/matpack_mdspan_cdata_t.h b/src/core/matpack/matpack_mdspan_cdata_t.h index 0e100cdc7b..b940942f7b 100644 --- a/src/core/matpack/matpack_mdspan_cdata_t.h +++ b/src/core/matpack/matpack_mdspan_cdata_t.h @@ -10,8 +10,6 @@ namespace matpack { template struct [[nodiscard]] cdata_t { - constexpr static bool matpack_magic_cdata = true; - constexpr static Size N = sizeof...(dims); constexpr static Size ndata = (dims * ...); @@ -346,10 +344,10 @@ struct tuple_element { }; } // namespace std -using Vector2 = matpack::cdata_t; -using Vector3 = matpack::cdata_t; -using Vector4 = matpack::cdata_t; -using Vector7 = matpack::cdata_t; -using Matrix33 = matpack::cdata_t; -using Matrix44 = matpack::cdata_t; +using Vector2 = matpack::cdata_t; +using Vector3 = matpack::cdata_t; +using Vector4 = matpack::cdata_t; +using Vector7 = matpack::cdata_t; +using Matrix33 = matpack::cdata_t; +using Matrix44 = matpack::cdata_t; using ComplexMatrix44 = matpack::cdata_t; diff --git a/src/core/matpack/matpack_mdspan_common_types.h b/src/core/matpack/matpack_mdspan_common_types.h index c555ac4cb5..ad3bd69c3e 100644 --- a/src/core/matpack/matpack_mdspan_common_types.h +++ b/src/core/matpack/matpack_mdspan_common_types.h @@ -105,7 +105,13 @@ template concept any_strided_view = any_strided_view_t>::value; template -concept any_cdata = std::remove_cvref_t::matpack_magic_cdata; +struct any_cdata_t : std::false_type {}; + +template +struct any_cdata_t> : std::true_type {}; + +template +concept any_cdata = any_cdata_t>::value; template struct any_grid_t : std::false_type {}; diff --git a/src/core/rtepack/rtepack_common.h b/src/core/rtepack/rtepack_common.h new file mode 100644 index 0000000000..7bd97f4815 --- /dev/null +++ b/src/core/rtepack/rtepack_common.h @@ -0,0 +1,21 @@ +#pragma once + +#include + +namespace rtepack { +struct propmat; +struct muelmat; +struct specmat; +struct stokvec; +} // namespace rtepack + +namespace matpack { +template <> +struct any_cdata_t : std::true_type {}; +template <> +struct any_cdata_t : std::true_type {}; +template <> +struct any_cdata_t : std::true_type {}; +template <> +struct any_cdata_t : std::true_type {}; +} // namespace matpack diff --git a/src/core/rtepack/rtepack_mueller_matrix.h b/src/core/rtepack/rtepack_mueller_matrix.h index 9c7a52119a..4b50689702 100644 --- a/src/core/rtepack/rtepack_mueller_matrix.h +++ b/src/core/rtepack/rtepack_mueller_matrix.h @@ -4,6 +4,8 @@ #include #include +#include "rtepack_common.h" + namespace rtepack { //! A 4x4 matrix of Numeric values to be used as a Mueller Matrix diff --git a/src/core/rtepack/rtepack_propagation_matrix.h b/src/core/rtepack/rtepack_propagation_matrix.h index e734a513cb..40491da03c 100644 --- a/src/core/rtepack/rtepack_propagation_matrix.h +++ b/src/core/rtepack/rtepack_propagation_matrix.h @@ -6,6 +6,8 @@ #include +#include "rtepack_common.h" + namespace rtepack { struct propmat final : Vector7 { constexpr propmat(Numeric a = 0.0, diff --git a/src/core/rtepack/rtepack_spectral_matrix.h b/src/core/rtepack/rtepack_spectral_matrix.h index f63299a4ed..a08ed04841 100644 --- a/src/core/rtepack/rtepack_spectral_matrix.h +++ b/src/core/rtepack/rtepack_spectral_matrix.h @@ -4,6 +4,8 @@ #include #include +#include "rtepack_common.h" + namespace rtepack { //! A 4x4 matrix of Complex values to be used as a Mueller Matrix diff --git a/src/core/rtepack/rtepack_stokes_vector.h b/src/core/rtepack/rtepack_stokes_vector.h index e5a43a4f4b..38a6cf04ac 100644 --- a/src/core/rtepack/rtepack_stokes_vector.h +++ b/src/core/rtepack/rtepack_stokes_vector.h @@ -7,6 +7,8 @@ #include +#include "rtepack_common.h" + namespace rtepack { struct stokvec final : Vector4 { [[nodiscard]] constexpr stokvec(Numeric i = 0.0,