Update Kokkos library in LAMMPS to v4.4.0

This commit is contained in:
Stan Moore
2024-09-11 09:20:36 -06:00
parent 16b19c71c1
commit a44955dd2e
254 changed files with 14227 additions and 9881 deletions

View File

@ -65,14 +65,18 @@ inline void host_check_all_reductions(const DataType (&args)[n]) {
template <typename Abi, typename DataType>
inline void host_check_reductions() {
constexpr size_t n = 11;
if constexpr (is_type_v<Kokkos::Experimental::simd<DataType, Abi>>) {
constexpr size_t n = 16;
if constexpr (std::is_signed_v<DataType>) {
DataType const args[n] = {1, 2, -1, 10, 0, 1, -2, 10, 0, 1, -2};
host_check_all_reductions<Abi>(args);
} else {
DataType const args[n] = {1, 2, 1, 10, 0, 1, 2, 10, 0, 1, 2};
host_check_all_reductions<Abi>(args);
if constexpr (std::is_signed_v<DataType>) {
DataType const args[n] = {1, 2, -1, 10, 0, 1, -2, 10,
0, 1, -2, -15, 5, 17, -22, 20};
host_check_all_reductions<Abi>(args);
} else {
DataType const args[n] = {1, 2, 1, 10, 0, 1, 2, 10,
0, 1, 2, 15, 5, 17, 22, 20};
host_check_all_reductions<Abi>(args);
}
}
}
@ -135,14 +139,18 @@ KOKKOS_INLINE_FUNCTION void device_check_all_reductions(
template <typename Abi, typename DataType>
KOKKOS_INLINE_FUNCTION void device_check_reductions() {
constexpr size_t n = 11;
if constexpr (is_type_v<Kokkos::Experimental::simd<DataType, Abi>>) {
constexpr size_t n = 16;
if constexpr (std::is_signed_v<DataType>) {
DataType const args[n] = {1, 2, -1, 10, 0, 1, -2, 10, 0, 1, -2};
device_check_all_reductions<Abi>(args);
} else {
DataType const args[n] = {1, 2, 1, 10, 0, 1, 2, 10, 0, 1, 2};
device_check_all_reductions<Abi>(args);
if constexpr (std::is_signed_v<DataType>) {
DataType const args[n] = {1, 2, -1, 10, 0, 1, -2, 10,
0, 1, -2, -15, 5, 17, -22, 20};
device_check_all_reductions<Abi>(args);
} else {
DataType const args[n] = {1, 2, 1, 10, 0, 1, 2, 10,
0, 1, 2, 15, 5, 17, 22, 20};
device_check_all_reductions<Abi>(args);
}
}
}