Update Kokkos library in LAMMPS to v3.7.0

This commit is contained in:
Stan Gerald Moore
2022-10-04 14:04:40 -06:00
parent dd072f7e08
commit f9f9e44f2d
653 changed files with 41432 additions and 33597 deletions

View File

@ -43,7 +43,6 @@
*/
#include <TestStdAlgorithmsCommon.hpp>
#include <std_algorithms/Kokkos_ModifyingOperations.hpp>
namespace Test {
namespace stdalgos {
@ -76,19 +75,19 @@ struct MyMovableType {
TEST(std_algorithms_mod_ops_test, move) {
MyMovableType a;
using move_t = decltype(KE::move(a));
using move_t = decltype(std::move(a));
static_assert(std::is_rvalue_reference<move_t>::value, "");
// move constr
MyMovableType b(KE::move(a));
EXPECT_TRUE(b.m_value == 11);
EXPECT_TRUE(a.m_value == -2);
MyMovableType b(std::move(a));
EXPECT_EQ(b.m_value, 11);
EXPECT_EQ(a.m_value, -2);
// move assign
MyMovableType c;
c = KE::move(b);
EXPECT_TRUE(c.m_value == 11);
EXPECT_TRUE(b.m_value == -4);
c = std::move(b);
EXPECT_EQ(c.m_value, 11);
EXPECT_EQ(b.m_value, -4);
}
template <class ViewType>
@ -98,9 +97,9 @@ struct StdAlgoModSeqOpsTestMove {
KOKKOS_INLINE_FUNCTION
void operator()(const int index) const {
typename ViewType::value_type a{11};
using move_t = decltype(KE::move(a));
using move_t = decltype(std::move(a));
static_assert(std::is_rvalue_reference<move_t>::value, "");
m_view(index) = KE::move(a);
m_view(index) = std::move(a);
}
StdAlgoModSeqOpsTestMove(ViewType view) : m_view(view) {}
@ -126,8 +125,8 @@ TEST(std_algorithms_mod_ops_test, swap) {
int a = 1;
int b = 2;
KE::swap(a, b);
EXPECT_TRUE(a == 2);
EXPECT_TRUE(b == 1);
EXPECT_EQ(a, 2);
EXPECT_EQ(b, 1);
}
{
@ -180,17 +179,17 @@ void test_iter_swap(ViewType view) {
using value_type = typename ViewType::value_type;
auto a_dc = create_deep_copyable_compatible_clone(view);
auto a_h = create_mirror_view_and_copy(Kokkos::HostSpace(), a_dc);
EXPECT_TRUE(view.extent(0) == 10);
EXPECT_TRUE(a_h(0) == value_type(3));
EXPECT_TRUE(a_h(1) == value_type(1));
EXPECT_TRUE(a_h(2) == value_type(2));
EXPECT_TRUE(a_h(3) == value_type(0));
EXPECT_TRUE(a_h(4) == value_type(6));
EXPECT_TRUE(a_h(5) == value_type(5));
EXPECT_TRUE(a_h(6) == value_type(4));
EXPECT_TRUE(a_h(7) == value_type(7));
EXPECT_TRUE(a_h(8) == value_type(8));
EXPECT_TRUE(a_h(9) == value_type(9));
EXPECT_EQ(view.extent_int(0), 10);
EXPECT_EQ(a_h(0), value_type(3));
EXPECT_EQ(a_h(1), value_type(1));
EXPECT_EQ(a_h(2), value_type(2));
EXPECT_EQ(a_h(3), value_type(0));
EXPECT_EQ(a_h(4), value_type(6));
EXPECT_EQ(a_h(5), value_type(5));
EXPECT_EQ(a_h(6), value_type(4));
EXPECT_EQ(a_h(7), value_type(7));
EXPECT_EQ(a_h(8), value_type(8));
EXPECT_EQ(a_h(9), value_type(9));
}
TEST(std_algorithms_mod_ops_test, iter_swap_static_view) {