Update Kokkos library in LAMMPS to v4.3.0

This commit is contained in:
Stan Gerald Moore
2024-04-05 08:20:57 -06:00
parent 2927471892
commit f382eac5c2
393 changed files with 13253 additions and 12499 deletions

View File

@ -31,7 +31,16 @@ class simd;
template <class T, class Abi>
class simd_mask;
struct element_aligned_tag {};
class simd_alignment_vector_aligned {};
template <typename... Flags>
struct simd_flags {};
inline constexpr simd_flags<> simd_flag_default{};
inline constexpr simd_flags<simd_alignment_vector_aligned> simd_flag_aligned{};
using element_aligned_tag = simd_flags<>;
using vector_aligned_tag = simd_flags<simd_alignment_vector_aligned>;
// class template declarations for const_where_expression and where_expression
@ -117,48 +126,6 @@ template <class T>
return const_where_expression(mask, value);
}
// fallback simd multiplication using generator constructor
// At the time of this writing, this fallback is only used
// to multiply vectors of 64-bit signed integers for the AVX2 backend
template <class T, class Abi>
[[nodiscard]] KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION simd<T, Abi> operator*(
simd<T, Abi> const& lhs, simd<T, Abi> const& rhs) {
return simd<T, Abi>([&](std::size_t i) { return lhs[i] * rhs[i]; });
}
// fallback simd shift using generator constructor
// At the time of this edit, only the fallback for shift vectors of
// 64-bit signed integers for the AVX2 backend is used
template <typename T, typename Abi,
typename = std::enable_if_t<std::is_integral_v<T>>>
[[nodiscard]] KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION simd<T, Abi> operator>>(
simd<T, Abi> const& lhs, int rhs) {
return simd<T, Abi>([&](std::size_t i) { return lhs[i] >> rhs; });
}
template <typename T, typename Abi,
typename = std::enable_if_t<std::is_integral_v<T>>>
[[nodiscard]] KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION simd<T, Abi> operator<<(
simd<T, Abi> const& lhs, int rhs) {
return simd<T, Abi>([&](std::size_t i) { return lhs[i] << rhs; });
}
template <typename T, typename Abi,
typename = std::enable_if_t<std::is_integral_v<T>>>
[[nodiscard]] KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION simd<T, Abi> operator>>(
simd<T, Abi> const& lhs, simd<T, Abi> const& rhs) {
return simd<T, Abi>([&](std::size_t i) { return lhs[i] >> rhs[i]; });
}
template <typename T, typename Abi,
typename = std::enable_if_t<std::is_integral_v<T>>>
[[nodiscard]] KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION simd<T, Abi> operator<<(
simd<T, Abi> const& lhs, simd<T, Abi> const& rhs) {
return simd<T, Abi>([&](std::size_t i) { return lhs[i] << rhs[i]; });
}
// The code below provides:
// operator@(simd<T, Abi>, Arithmetic)
// operator@(Arithmetic, simd<T, Abi>)