|
kokkos-execution 0.0.1
|
Public Member Functions | |
| LetValueTest_scoped_allocation_Test ()=default | |
| ~LetValueTest_scoped_allocation_Test () override=default | |
| LetValueTest_scoped_allocation_Test (const LetValueTest_scoped_allocation_Test &)=delete | |
| LetValueTest_scoped_allocation_Test & | operator= (const LetValueTest_scoped_allocation_Test &)=delete |
| LetValueTest_scoped_allocation_Test (LetValueTest_scoped_allocation_Test &&) noexcept=delete | |
| LetValueTest_scoped_allocation_Test & | operator= (LetValueTest_scoped_allocation_Test &&) noexcept=delete |
| Public Member Functions inherited from Kokkos::utils::tests::scoped::ExecutionSpace< Exec > | |
| ExecutionSpace () | |
| ExecutionSpace & | operator= (const ExecutionSpace &)=delete |
| Public Member Functions inherited from Kokkos::utils::tests::scoped::callbacks::Manager | |
| Manager () | |
| ~Manager () | |
| Manager (const Manager &)=delete | |
| Manager & | operator= (const Manager &)=delete |
Private Member Functions | |
| void | TestBody () override |
Static Private Attributes | |
| static ::testing::TestInfo *const | test_info_ = ::testing::internal::MakeAndRegisterTestInfo( "LetValueTest", "scoped_allocation", nullptr, nullptr, ::testing::internal::CodeLocation(__FILE__, __LINE__), (::testing::internal::GetTypeId<LetValueTest>()), ::testing::internal::SuiteApiResolver< LetValueTest>::GetSetUpCaseOrSuite(__FILE__, __LINE__), ::testing::internal::SuiteApiResolver< LetValueTest>::GetTearDownCaseOrSuite(__FILE__, __LINE__), new ::testing::internal::TestFactoryImpl< LetValueTest_scoped_allocation_Test >) |
Additional Inherited Members | |
| Public Types inherited from Tests::ExecutionSpaceImpl::LetValueTest | |
| using | recorder_listener_t |
| using | variant_t = typename recorder_listener_t::event_variant_t |
| Public Types inherited from Tests::Utils::ContextTest< Kokkos::Execution::ExecutionSpaceContext, Exec > | |
| using | context_t |
| using | scheduler_t |
| using | schedule_sender_t |
| using | value_t |
| using | view_s_t |
| Public Attributes inherited from Kokkos::utils::tests::scoped::ExecutionSpace< Exec > | |
| Exec | exec |
| Static Public Attributes inherited from Tests::Utils::ContextTest< Kokkos::Execution::ExecutionSpaceContext, Exec > | |
| static constexpr bool | on_device |
stdexec::let_value to keep a "scratch" Kokkos view alive during the computations. Definition at line 51 of file test_let_value.cpp.
|
default |
References Kokkos::utils::callbacks::AAllocateDataEvent(), Kokkos::utils::callbacks::ADeallocateDataEvent(), Kokkos::utils::callbacks::AllocateDataEvent::alloc, Kokkos::utils::callbacks::DeallocateDataEvent::alloc, Kokkos::utils::callbacks::ContainsInOrder(), dispatch_label(), Kokkos::utils::tests::scoped::ExecutionSpace< Exec >::exec, Kokkos::Execution::ExecutionSpaceContext< Exec >::get_scheduler(), KOKKOS_EXECUTION_THREADS_THROWS_ON_SYNC_WAIT_ASSERT_AND_SKIP, MATCHER_FOR_BEGIN_FENCE, MATCHER_FOR_BEGIN_PFOR, MATCHER_FOR_RECORD_EVENT, MATCHER_FOR_WAIT_EVENT, Kokkos::utils::callbacks::AllocDescriptor::name, and Tests::Utils::record_sync_wait().
|
overridedefault |
|
delete |
|
deletenoexcept |
|
delete |
|
deletenoexcept |
|
overrideprivate |
Allocate a Kokkos view only when the sender is running, put it in the value channel.
Kokkos::View is nothrow movable, so the error channel is not added.
Use the scratch view to make some meaningful computation.
The operation state of stdexec::let_value stores the arguments in a decayed tuple and passes references to them when invoking the lambda.
The use count includes the views in the stdexec::let_value operation state and the stdexec::bulk closure.
There is also a copy in the Kokkos parallel region, but it is not included in the use count because of Kokkos::parallel_for uses Kokkos::Impl::construct_with_shared_allocation_tracking_disabled.
The use count includes the views in the stdexec::let_value operation state and the stdexec::bulk closure.
Check the result of the computation.
The implementation of stdexec::let_value uses a single variant to store the predecessor and successor operation states.
The predecessor operation state is still alive when the lambda is invoked to construct the successor sender. The predecessor operation state is destroyed only when the successor sender is connected and assigned to the variant.
The use count includes the views in the "run" stdexec::bulk closure and the "check" stdexec::let_value operation state.
The "run" stdexec::then lambda moved the view held by the "run" stdexec::let_value operation state, so it no longer contributes to the use count at this point.
The use count includes the views in the "check" stdexec::let_value operation state and the stdexec::bulk closure
There is also a copy in the Kokkos parallel region, but it is not included in the use count because of Kokkos::parallel_for uses Kokkos::Impl::construct_with_shared_allocation_tracking_disabled.
Definition at line 51 of file test_let_value.cpp.
|
staticprivate |
Definition at line 51 of file test_let_value.cpp.