Skip to content

Commit

Permalink
Revert "fix infinite recursion crash on missing matrix_product overlo…
Browse files Browse the repository at this point in the history
…ads for transposed and scaled inputs kokkos#218"

This reverts commit 098f6ef.
  • Loading branch information
Mikołaj Zuzek committed Mar 8, 2023
1 parent b32be97 commit 17f8e60
Showing 1 changed file with 17 additions and 30 deletions.
47 changes: 17 additions & 30 deletions include/experimental/__p1673_bits/blas3_matrix_product.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,23 @@ constexpr bool extractConj(in_matrix_t A)
template <class Exec, class A_t, class B_t, class C_t, class = void>
struct is_custom_matrix_product_avail : std::false_type {};

template <class Exec, class A_t, class B_t, class C_t>
struct is_custom_matrix_product_avail<
Exec, A_t, B_t, C_t,
std::enable_if_t<
std::is_void_v<
decltype(
matrix_product
(std::declval<Exec>(),
std::declval<A_t>(),
std::declval<B_t>(),
std::declval<C_t>()))
>
&& !linalg::impl::is_inline_exec_v<Exec>
>
>
: std::true_type{};

template <class Exec, class A_t, class B_t, class E_t, class C_t, class = void>
struct is_custom_matrix_product_with_update_avail : std::false_type {};

Expand Down Expand Up @@ -2089,36 +2106,6 @@ void hermitian_matrix_right_product(
hermitian_matrix_right_product(std::experimental::linalg::impl::default_exec_t(), A, t, B, E, C);
}

template <class Exec, class A_t, class B_t, class C_t>
struct is_custom_matrix_product_avail<
Exec, A_t, B_t, C_t,
std::enable_if_t<
std::is_void_v<
decltype(
matrix_product(
std::declval<Exec>(),
std::declval<A_t>(),
std::declval<B_t>(),
std::declval<C_t>()))
>
&& !std::is_same_v< // see #218
decltype(
std::experimental::linalg::matrix_product(
std::declval<Exec>(),
std::declval<A_t>(),
std::declval<B_t>(),
std::declval<C_t>())),
decltype(
matrix_product(
std::declval<Exec>(),
std::declval<A_t>(),
std::declval<B_t>(),
std::declval<C_t>()))
>
&& !linalg::impl::is_inline_exec_v<Exec>
>
>
: std::true_type{};

} // end namespace linalg
} // end inline namespace __p1673_version_0
Expand Down

0 comments on commit 17f8e60

Please sign in to comment.