Update Kokkos library in LAMMPS to v4.4.0
This commit is contained in:
@ -46,6 +46,44 @@ TEST_F(random_access_iterator_test, constructor) {
|
||||
EXPECT_TRUE(true);
|
||||
}
|
||||
|
||||
TEST_F(random_access_iterator_test, constructiblity) {
|
||||
auto first_d = KE::begin(m_dynamic_view);
|
||||
auto cfirst_d = KE::cbegin(m_dynamic_view);
|
||||
|
||||
static_assert(std::is_constructible_v<decltype(cfirst_d), decltype(first_d)>);
|
||||
static_assert(
|
||||
!std::is_constructible_v<decltype(first_d), decltype(cfirst_d)>);
|
||||
[[maybe_unused]] decltype(cfirst_d) tmp_cfirst_d(first_d);
|
||||
|
||||
auto first_s = KE::begin(m_static_view);
|
||||
auto cfirst_s = KE::cbegin(m_static_view);
|
||||
|
||||
static_assert(std::is_constructible_v<decltype(cfirst_s), decltype(first_s)>);
|
||||
static_assert(
|
||||
!std::is_constructible_v<decltype(first_s), decltype(cfirst_s)>);
|
||||
[[maybe_unused]] decltype(cfirst_s) tmp_cfirst_s(first_s);
|
||||
|
||||
auto first_st = KE::begin(m_strided_view);
|
||||
auto cfirst_st = KE::cbegin(m_strided_view);
|
||||
|
||||
static_assert(
|
||||
std::is_constructible_v<decltype(cfirst_st), decltype(first_st)>);
|
||||
static_assert(
|
||||
!std::is_constructible_v<decltype(first_st), decltype(cfirst_st)>);
|
||||
[[maybe_unused]] decltype(cfirst_st) tmp_cfirst_st(first_st);
|
||||
|
||||
// [FIXME] Better to have tests for the explicit specifier with an expression.
|
||||
// As soon as View converting constructors are re-implemented with a
|
||||
// conditional explicit, we may add those tests.
|
||||
static_assert(std::is_constructible_v<decltype(first_s), decltype(first_d)>);
|
||||
static_assert(std::is_constructible_v<decltype(first_st), decltype(first_d)>);
|
||||
static_assert(std::is_constructible_v<decltype(first_d), decltype(first_s)>);
|
||||
static_assert(std::is_constructible_v<decltype(first_st), decltype(first_s)>);
|
||||
static_assert(std::is_constructible_v<decltype(first_d), decltype(first_st)>);
|
||||
static_assert(std::is_constructible_v<decltype(first_s), decltype(first_st)>);
|
||||
EXPECT_TRUE(true);
|
||||
}
|
||||
|
||||
template <class IteratorType, class ValueType>
|
||||
void test_random_access_it_verify(IteratorType it, ValueType gold_value) {
|
||||
using view_t = Kokkos::View<typename IteratorType::value_type>;
|
||||
|
||||
Reference in New Issue
Block a user