|
LLVM OpenMP 22.0.0git
|
Class that asserts with set semantics, i.e., unordered. More...
#include "/work/as-worker-4/publish-doxygen-docs/llvm-project/openmp/tools/omptest/include/OmptAsserter.h"
Public Member Functions | |
| OmptEventAsserter () | |
| void | insert (omptest::OmptAssertEvent &&AE) override |
| Add the event to the set of events that the asserter should check for. | |
| virtual void | notifyImpl (omptest::OmptAssertEvent &&AE) override |
| Implements the asserter's logic. | |
| size_t | getRemainingEventCount () override |
| Get the number of currently remaining events, with: ObserveState::Always. | |
| omptest::AssertState | checkState () override |
| Determine and return the asserter's state. | |
| Public Member Functions inherited from omptest::OmptAsserter | |
| OmptAsserter () | |
| virtual | ~OmptAsserter ()=default |
| void | notify (omptest::OmptAssertEvent &&AE) override |
| Called from the CallbackHandler with a corresponding AssertEvent to which callback was handled. | |
| int | getNotificationCount () |
| Get the total number of received, effective notifications. | |
| int | getSuccessfulAssertionCount () |
| Get the total number of successful assertion checks. | |
| AssertMode | getOperationMode () |
| Get the asserter's current operationmode: e.g.: Strict or Relaxed. | |
| omptest::AssertState | getState () |
| Return the asserter's current state. | |
| std::shared_ptr< OmptEventGroupInterface > | getEventGroups () const |
| Accessor for the event group interface. | |
| std::shared_ptr< logging::Logger > | getLog () const |
| Accessor for the event group interface. | |
| bool | verifyEventGroups (const omptest::OmptAssertEvent &ExpectedEvent, const omptest::OmptAssertEvent &ObservedEvent) |
| Check the observed events' group association. | |
| void | setOperationMode (AssertMode Mode) |
| Set the asserter's mode of operation w.r.t. assertion. | |
| Public Member Functions inherited from omptest::OmptListener | |
| virtual | ~OmptListener ()=default |
| void | setActive (bool Enabled) |
| Control whether this asserter should be considered 'active'. | |
| bool | isActive () |
| Check if this asserter is considered 'active'. | |
| bool | isSuppressedEventType (omptest::internal::EventTy EvTy) |
| Check if the given event type is from the set of suppressed event types. | |
| void | permitEvent (omptest::internal::EventTy EvTy) |
| Remove the given event type to the set of suppressed events. | |
| void | suppressEvent (omptest::internal::EventTy EvTy) |
| Add the given event type to the set of suppressed events. | |
Public Attributes | |
| size_t | NumEvents {0} |
| std::vector< omptest::OmptAssertEvent > | Events {} |
| For now use vector (but do set semantics) | |
Additional Inherited Members | |
| Protected Attributes inherited from omptest::OmptAsserter | |
| omptest::AssertState | State {omptest::AssertState::Pass} |
| The asserter's current state. | |
| std::mutex | AssertMutex |
| Mutex to avoid data races w.r.t. event notifications and/or insertions. | |
| std::shared_ptr< OmptEventGroupInterface > | EventGroups {nullptr} |
| Pointer to the OmptEventGroupInterface. | |
| std::shared_ptr< logging::Logger > | Log {nullptr} |
| Pointer to the logging instance. | |
| AssertMode | OperationMode {AssertMode::Strict} |
| Operation mode during assertion / notification. | |
| int | NumNotifications {0} |
| The total number of effective notifications. | |
| int | NumSuccessfulAsserts {0} |
| The number of successful assertion checks. | |
Class that asserts with set semantics, i.e., unordered.
Definition at line 217 of file OmptAsserter.h.
|
inline |
Definition at line 218 of file OmptAsserter.h.
References Events, NumEvents, and omptest::OmptAsserter::OmptAsserter().
|
overridevirtual |
Determine and return the asserter's state.
Reimplemented from omptest::OmptAsserter.
Definition at line 418 of file OmptAsserter.cpp.
References omptest::Always, Events, omptest::Fail, getRemainingEventCount(), omptest::OmptAsserter::Log, and omptest::OmptAsserter::State.
|
overridevirtual |
Get the number of currently remaining events, with: ObserveState::Always.
Implements omptest::OmptAsserter.
Definition at line 411 of file OmptAsserter.cpp.
References Events.
Referenced by checkState(), and notifyImpl().
|
overridevirtual |
Add the event to the set of events that the asserter should check for.
Reimplemented from omptest::OmptAsserter.
Definition at line 353 of file OmptAsserter.cpp.
References omptest::OmptAsserter::AssertMutex, and Events.
|
overridevirtual |
Implements the asserter's logic.
Implements omptest::OmptAsserter.
Definition at line 358 of file OmptAsserter.cpp.
References omptest::Always, omptest::OmptAsserter::AssertMutex, Events, omptest::Fail, getRemainingEventCount(), i, omptest::OmptListener::isActive(), omptest::OmptListener::isSuppressedEventType(), omptest::OmptAsserter::Log, omptest::Never, NumEvents, omptest::OmptAsserter::NumNotifications, omptest::OmptAsserter::NumSuccessfulAsserts, omptest::OmptAsserter::OperationMode, omptest::OmptAsserter::State, omptest::Strict, and omptest::OmptAsserter::verifyEventGroups().
| std::vector<omptest::OmptAssertEvent> omptest::OmptEventAsserter::Events {} |
For now use vector (but do set semantics)
Definition at line 234 of file OmptAsserter.h.
Referenced by checkState(), getRemainingEventCount(), insert(), notifyImpl(), and OmptEventAsserter().
| size_t omptest::OmptEventAsserter::NumEvents {0} |
Definition at line 230 of file OmptAsserter.h.
Referenced by notifyImpl(), and OmptEventAsserter().