kokkos-utils 0.0.1
 
Loading...
Searching...
No Matches
Kokkos::utils::tests::callbacks Namespace Reference

Namespaces

namespace  impl
 

Classes

struct  EventTest
 
struct  EventTest< BeginDeepCopyEvent >
 
struct  EventTest< CreateProfileSectionEvent >
 
struct  EventTest< EndDeepCopyEvent >
 
struct  EventTest< EventType >
 
struct  EventTest< PopRegionEvent >
 
struct  EventTest< ProfileEvent >
 
struct  EventTest< PushRegionEvent >
 
class  ManagerTest
 
struct  MyWorkload
 
class  RecorderListenerSingleEventTypeTest
 
class  RecorderListenerTest
 
struct  TesterListener
 Listener that stores the events it receives. More...
 

Typedefs

using EventTestTypes = typename impl::EventTestTypes<Kokkos::utils::callbacks::EventTypeList>::type
 Useful type for defining a typed test suite over all types in Kokkos::utils::callbacks::EventTypeList.
 
using event_in_profile_section_recorder_t = RecorderListener<EventInProfileSectionRegexMatcher, EventTypeList>
 Listener to record events that occur in a profile section.
 
using fence_finder_t = RecorderListener<EventRegexMatcher, BeginFenceEvent>
 Listener to record fence events.
 

Functions

 TEST (EventTest, BeginEvent)
 
 TEST (EventTest, EndEvent)
 
 TEST (EventTest, DataEvent)
 
 TEST (EventTest, ProfileSectionManipulationEvent)
 
 TEST (EventTest, NamedEvent)
 
 TEST (EventTest, name)
 
 TYPED_TEST_SUITE (EventTest, EventTestTypes)
 
 TYPED_TEST (EventTest, concept)
 
 TYPED_TEST (EventTest, traits)
 
 TYPED_TEST (EventTest, description)
 
 TYPED_TEST (EventTest, get_and_set_callback_from_and_in_eventset)
 
 TEST (ABeginParallelForEventWithName, CanDescribeItself)
 
 TEST (ContainsInOrderMatcher, CanDescribeItself)
 
 TEST (ContainsInOrderMatcher, Matches)
 
 TEST (Manager, singleton_traits)
 
 TEST_F (ManagerTest, dispatch_to_call_operators_of_single_listener)
 
 TEST_F (ManagerTest, dispatch_to_call_operators_of_multiple_listeners)
 
 TEST_F (ManagerTest, listener_from_lambda)
 
 TEST (EventRegexMatcher, traits)
 
 TEST (EventRegexMatcher, regex_matcher)
 
 TEST (EventInProfileSectionRegexMatcher, traits)
 
 TEST (EventInProfileSectionRegexMatcher, in_profile_section_matcher)
 
 TEST (AnyEventMatcher, traits)
 
 TEST (AnyEventMatcher, operator_parentheses)
 
 TEST (RecorderListener, traits)
 
 TYPED_TEST_SUITE (RecorderListenerSingleEventTypeTest, EventTestTypes)
 
 TYPED_TEST (RecorderListenerSingleEventTypeTest, record)
 
 TEST_F (RecorderListenerTest, recorded_events)
 
 TEST_F (RecorderListenerTest, record)
 
 TEST (FenceFinder, traits)
 
 TEST_F_WITH_CB_MGR (FenceFinderTest, recorded_events)
 

Typedef Documentation

◆ event_in_profile_section_recorder_t

◆ EventTestTypes

Useful type for defining a typed test suite over all types in Kokkos::utils::callbacks::EventTypeList.

Definition at line 21 of file Helpers.hpp.

◆ fence_finder_t

Function Documentation

◆ TEST() [1/18]

Kokkos::utils::tests::callbacks::TEST ( ABeginParallelForEventWithName ,
CanDescribeItself  )
Test
Check that Kokkos::utils::tests::callbacks::ABeginParallelForEventWithName can describe itself.

Definition at line 25 of file test_Helpers.cpp.

◆ TEST() [2/18]

Kokkos::utils::tests::callbacks::TEST ( AnyEventMatcher ,
operator_parentheses  )
Test
Check the behavior of Kokkos::utils::callbacks::AnyEventMatcher.

Definition at line 97 of file test_Matchers.cpp.

◆ TEST() [3/18]

Kokkos::utils::tests::callbacks::TEST ( AnyEventMatcher ,
traits  )
Test
Check traits of Kokkos::utils::callbacks::AnyEventMatcher.

Definition at line 90 of file test_Matchers.cpp.

◆ TEST() [4/18]

Kokkos::utils::tests::callbacks::TEST ( ContainsInOrderMatcher ,
CanDescribeItself  )
Test
Check that Kokkos::utils::tests::callbacks::ContainsInOrder can describe itself.

Definition at line 32 of file test_Helpers.cpp.

◆ TEST() [5/18]

Kokkos::utils::tests::callbacks::TEST ( ContainsInOrderMatcher ,
Matches  )
Test
Check that Kokkos::utils::tests::callbacks::ContainsInOrder matches as expected.

Definition at line 42 of file test_Helpers.cpp.

◆ TEST() [6/18]

Kokkos::utils::tests::callbacks::TEST ( EventInProfileSectionRegexMatcher ,
in_profile_section_matcher  )
Test
Check the behavior of Kokkos::utils::callbacks::EventInProfileSectionRegexMatcher.

Definition at line 68 of file test_Matchers.cpp.

◆ TEST() [7/18]

Kokkos::utils::tests::callbacks::TEST ( EventInProfileSectionRegexMatcher ,
traits  )

◆ TEST() [8/18]

Kokkos::utils::tests::callbacks::TEST ( EventRegexMatcher ,
regex_matcher  )
Test
Check that Kokkos::utils::callbacks::EventRegexMatcher works as expected.

Definition at line 49 of file test_Matchers.cpp.

◆ TEST() [9/18]

Kokkos::utils::tests::callbacks::TEST ( EventRegexMatcher ,
traits  )
Test
Check traits of Kokkos::utils::callbacks::EventRegexMatcher.

Definition at line 28 of file test_Matchers.cpp.

◆ TEST() [10/18]

Kokkos::utils::tests::callbacks::TEST ( EventTest ,
BeginEvent  )
Test
Check that Kokkos::utils::callbacks::BeginEvent appropriately constrains the begin event types.

Definition at line 28 of file test_Events.cpp.

◆ TEST() [11/18]

Kokkos::utils::tests::callbacks::TEST ( EventTest ,
DataEvent  )
Test
Check that Kokkos::utils::callbacks::DataEvent appropriately constrains the data event types.

Definition at line 56 of file test_Events.cpp.

◆ TEST() [12/18]

Kokkos::utils::tests::callbacks::TEST ( EventTest ,
EndEvent  )
Test
Check that Kokkos::utils::callbacks::EndEvent appropriately constrains the end event types.

Definition at line 41 of file test_Events.cpp.

◆ TEST() [13/18]

Kokkos::utils::tests::callbacks::TEST ( EventTest ,
name  )
Test
Check Kokkos::utils::callbacks::get_name.

Definition at line 98 of file test_Events.cpp.

◆ TEST() [14/18]

Kokkos::utils::tests::callbacks::TEST ( EventTest ,
NamedEvent  )
Test
Check that Kokkos::utils::callbacks::NamedEvent appropriately constrains the event types that have a name field.

Definition at line 84 of file test_Events.cpp.

◆ TEST() [15/18]

Kokkos::utils::tests::callbacks::TEST ( EventTest ,
ProfileSectionManipulationEvent  )
Test
Check that Kokkos::utils::callbacks::ProfileSectionManipulationEvent appropriately constrains the profile section manipulation event types.

Definition at line 68 of file test_Events.cpp.

◆ TEST() [16/18]

Kokkos::utils::tests::callbacks::TEST ( FenceFinder ,
traits  )
Test
Check traits of fence_finder_t.

Check that fence_finder_t is a listener for Kokkos::utils::callbacks::BeginFenceEvent.

Definition at line 171 of file test_RecorderListener.cpp.

◆ TEST() [17/18]

Kokkos::utils::tests::callbacks::TEST ( Manager ,
singleton_traits  )
Test
Check properties of Kokkos::utils::callbacks::Manager being a singleton class.

Definition at line 39 of file test_Manager.cpp.

◆ TEST() [18/18]

Kokkos::utils::tests::callbacks::TEST ( RecorderListener ,
traits  )
Test
Check traits of Kokkos::utils::callbacks::RecorderListener.

Check that event_in_profile_section_recorder_t is a listener for any event.

Definition at line 47 of file test_RecorderListener.cpp.

◆ TEST_F() [1/5]

Kokkos::utils::tests::callbacks::TEST_F ( ManagerTest ,
dispatch_to_call_operators_of_multiple_listeners  )
Test
Check the behavior of Kokkos::utils::callbacks::Manager with multiple listeners.

There is one begin parallel for event.

There is one end parallel for event and its id matches the one of the begin parallel for event.

Definition at line 100 of file test_Manager.cpp.

◆ TEST_F() [2/5]

Kokkos::utils::tests::callbacks::TEST_F ( ManagerTest ,
dispatch_to_call_operators_of_single_listener  )
Test
Check the behavior of Kokkos::utils::callbacks::Manager with a single listener.

There is one begin parallel for event.

There is one end parallel for event and its id matches the one of the begin parallel for event.

There are at least two begin fence events.

Definition at line 67 of file test_Manager.cpp.

◆ TEST_F() [3/5]

Kokkos::utils::tests::callbacks::TEST_F ( ManagerTest ,
listener_from_lambda  )
Test
Check the behavior of Kokkos::utils::callbacks::Manager with a listener constructed from a lambda.

Definition at line 128 of file test_Manager.cpp.

◆ TEST_F() [4/5]

Kokkos::utils::tests::callbacks::TEST_F ( RecorderListenerTest ,
record  )
Test
Check the behavior of Kokkos::utils::callbacks::RecorderListener<MatcherType, EventTypes...>::record.

Shorter version using ::testing::FieldsAre and ::testing::_ matchers.

Definition at line 144 of file test_RecorderListener.cpp.

◆ TEST_F() [5/5]

Kokkos::utils::tests::callbacks::TEST_F ( RecorderListenerTest ,
recorded_events  )
Test
Check the behavior of Kokkos::utils::callbacks::RecorderListener.

Check the recorded events.

Definition at line 79 of file test_RecorderListener.cpp.

◆ TEST_F_WITH_CB_MGR()

Kokkos::utils::tests::callbacks::TEST_F_WITH_CB_MGR ( FenceFinderTest ,
recorded_events  )
Test
Check the behavior of fence_finder_t.

Check the recorded events.

Definition at line 183 of file test_RecorderListener.cpp.

◆ TYPED_TEST() [1/5]

Kokkos::utils::tests::callbacks::TYPED_TEST ( EventTest ,
concept  )
Test
Check that Kokkos::utils::callbacks::Event appropriately constrains all the event types.

Definition at line 188 of file test_Events.cpp.

◆ TYPED_TEST() [2/5]

Kokkos::utils::tests::callbacks::TYPED_TEST ( EventTest ,
description  )
Test
Check that the event description is as expected.

Definition at line 202 of file test_Events.cpp.

◆ TYPED_TEST() [3/5]

Kokkos::utils::tests::callbacks::TYPED_TEST ( EventTest ,
get_and_set_callback_from_and_in_eventset  )
Test
Check that Kokkos::utils::callbacks::get_callback_from_eventset and Kokkos::utils::callbacks::get_callback_setter work as expected.

Type of the callback function pointer for the event type for which the test is instantiated.

Retrieve the eventset with the callback function pointers already set within Kokkos.

Retrieve from the eventset the callback function pointer for the event type for which the test is instantiated.

Create a new function object that can act as a callback for the event type for which the test is instantiated. Note that the function object is created as a generic lambda with a templated call operator. This way, the compiler can instantiate a call operator with the appropriate arguments for the event type for which the test is instantiated.

Set the new callback in Kokkos (thus replacing the context callback).

Check that the callback was set in Kokkos as expected.

Reset the context callback in Kokkos.

Definition at line 211 of file test_Events.cpp.

◆ TYPED_TEST() [4/5]

Kokkos::utils::tests::callbacks::TYPED_TEST ( EventTest ,
traits  )
Test
Check that each event type is an aggregate, default constructible, and movable.

Definition at line 194 of file test_Events.cpp.

◆ TYPED_TEST() [5/5]

Kokkos::utils::tests::callbacks::TYPED_TEST ( RecorderListenerSingleEventTypeTest ,
record  )
Test
Ensure that Kokkos::utils::callbacks::RecorderListener can be used with any event type from Kokkos::utils::callbacks::EventTypeList.

Definition at line 64 of file test_RecorderListener.cpp.

◆ TYPED_TEST_SUITE() [1/2]

Kokkos::utils::tests::callbacks::TYPED_TEST_SUITE ( EventTest ,
EventTestTypes  )

◆ TYPED_TEST_SUITE() [2/2]

Kokkos::utils::tests::callbacks::TYPED_TEST_SUITE ( RecorderListenerSingleEventTypeTest ,
EventTestTypes  )