Update Kokkos library in LAMMPS to v4.3.0
This commit is contained in:
@ -23,6 +23,8 @@
|
||||
#include <Kokkos_Bitset.hpp>
|
||||
#include <array>
|
||||
|
||||
#include <../../core/unit_test/tools/include/ToolTestingUtilities.hpp>
|
||||
|
||||
namespace Test {
|
||||
|
||||
namespace Impl {
|
||||
@ -155,7 +157,7 @@ void test_bitset() {
|
||||
|
||||
{
|
||||
unsigned ts = 100u;
|
||||
bitset_type b1;
|
||||
bitset_type b1(Kokkos::view_alloc("MyBitset"), 0);
|
||||
ASSERT_TRUE(b1.is_allocated());
|
||||
|
||||
b1 = bitset_type(ts);
|
||||
@ -165,6 +167,9 @@ void test_bitset() {
|
||||
ASSERT_TRUE(b1.is_allocated());
|
||||
ASSERT_TRUE(b2.is_allocated());
|
||||
ASSERT_TRUE(b3.is_allocated());
|
||||
|
||||
bitset_type b4;
|
||||
ASSERT_FALSE(b4.is_allocated());
|
||||
}
|
||||
|
||||
std::array<unsigned, 7> test_sizes = {
|
||||
@ -237,6 +242,24 @@ void test_bitset() {
|
||||
}
|
||||
|
||||
TEST(TEST_CATEGORY, bitset) { test_bitset<TEST_EXECSPACE>(); }
|
||||
|
||||
TEST(TEST_CATEGORY, bitset_default_constructor_no_alloc) {
|
||||
using namespace Kokkos::Test::Tools;
|
||||
listen_tool_events(Config::DisableAll(), Config::EnableAllocs());
|
||||
|
||||
auto success = validate_absence(
|
||||
[&]() {
|
||||
Kokkos::Bitset bs;
|
||||
EXPECT_FALSE(bs.is_allocated());
|
||||
},
|
||||
[&](AllocateDataEvent) {
|
||||
return MatchDiagnostic{true, {"Found alloc event"}};
|
||||
});
|
||||
ASSERT_TRUE(success);
|
||||
|
||||
listen_tool_events(Config::DisableAll());
|
||||
}
|
||||
|
||||
} // namespace Test
|
||||
|
||||
#endif // KOKKOS_TEST_BITSET_HPP
|
||||
|
||||
Reference in New Issue
Block a user