Project
Loading...
Searching...
No Matches
o2::framework::DispatchPolicy Struct Reference

#include <DispatchPolicy.h>

Public Types

enum struct  DispatchOp { AfterComputation , WhenReady }
 
using DeviceMatcher = std::function< bool(DeviceSpec const &device)>
 
using TriggerMatcher = std::function< bool(Output const &)>
 

Static Public Member Functions

static TriggerMatcher defaultDispatchPolicy ()
 
static std::vector< DispatchPolicycreateDefaultPolicies ()
 Helper to create the default configuration.
 

Public Attributes

std::string name
 Name of the policy itself.
 
DeviceMatcher deviceMatcher
 
DispatchOp action = DispatchOp::AfterComputation
 the action to be used for matched devices
 
TriggerMatcher triggerMatcher = defaultDispatchPolicy()
 matcher on specific output to trigger sending
 

Detailed Description

Policy to describe when to dispatch objects As for now we describe this policy per device, however it can be extended to match on specific outputs of the device.

Definition at line 29 of file DispatchPolicy.h.

Member Typedef Documentation

◆ DeviceMatcher

using o2::framework::DispatchPolicy::DeviceMatcher = std::function<bool(DeviceSpec const& device)>

Definition at line 41 of file DispatchPolicy.h.

◆ TriggerMatcher

using o2::framework::DispatchPolicy::TriggerMatcher = std::function<bool(Output const&)>

Definition at line 43 of file DispatchPolicy.h.

Member Enumeration Documentation

◆ DispatchOp

Action to take whenever an object in the output gets ready:

Enumerator
AfterComputation 

Dispatch objects when the calculation ends, this means the devices will send messages from all contextes in one bulk after computation

WhenReady 

Dispatch the object when it becomes ready, i.e. when it goes out of the scope of the user code and no changes to the object are possible

Definition at line 32 of file DispatchPolicy.h.

Member Function Documentation

◆ createDefaultPolicies()

std::vector< DispatchPolicy > o2::framework::DispatchPolicy::createDefaultPolicies ( )
static

Helper to create the default configuration.

By default the DispatchPolicy matches any Device and messages are sent after computation

Definition at line 24 of file DispatchPolicy.cxx.

◆ defaultDispatchPolicy()

DispatchPolicy::TriggerMatcher o2::framework::DispatchPolicy::defaultDispatchPolicy ( )
static

Definition at line 29 of file DispatchPolicy.cxx.

Member Data Documentation

◆ action

DispatchOp o2::framework::DispatchPolicy::action = DispatchOp::AfterComputation

the action to be used for matched devices

Definition at line 51 of file DispatchPolicy.h.

◆ deviceMatcher

DeviceMatcher o2::framework::DispatchPolicy::deviceMatcher

Callback to be used to understand if the policy should apply to the given device.

Definition at line 49 of file DispatchPolicy.h.

◆ name

std::string o2::framework::DispatchPolicy::name

Name of the policy itself.

Definition at line 46 of file DispatchPolicy.h.

◆ triggerMatcher

TriggerMatcher o2::framework::DispatchPolicy::triggerMatcher = defaultDispatchPolicy()

matcher on specific output to trigger sending

Definition at line 53 of file DispatchPolicy.h.


The documentation for this struct was generated from the following files: