libtcspc C++ API
Streaming TCSPC and time tag data processing
Loading...
Searching...
No Matches
Branching processors

Description

Processors for splitting the processing graph.

Functions

template<typename BroadcastEventList, typename... Downstreams>
auto tcspc::broadcast (Downstreams... downstreams)
 Create a processor that broadcasts events to multiple downstream processors.
template<typename... Downstreams>
auto tcspc::broadcast_homogeneous (Downstreams... downstreams)
 Create a processor that broadcasts events to multiple downstream processors of the same type.
template<std::size_t N, typename Downstream>
auto tcspc::broadcast_homogeneous (std::array< Downstream, N > downstreams)
 Create a processor that broadcasts events to multiple downstream processors of the same type.
template<typename RoutedEventList, typename BroadcastEventList = type_list<>, typename Router, typename... Downstreams>
auto tcspc::route (Router router, Downstreams... downstreams)
 Create a processor that routes events to different downstreams.
template<typename RoutedEventList, typename Router, typename... Downstreams>
auto tcspc::route_homogeneous (Router router, Downstreams... downstreams)
 Create a processor that routes events to multiple downstreams of the same type.
template<typename RoutedEventList, typename Router, std::size_t N, typename Downstream>
auto tcspc::route_homogeneous (Router router, std::array< Downstream, N > downstreams)
 Create a processor that routes events to multiple downstreams of the same type.

Function Documentation

◆ broadcast()

template<typename BroadcastEventList, typename... Downstreams>
auto tcspc::broadcast ( Downstreams... downstreams)

Create a processor that broadcasts events to multiple downstream processors.

See also
tcspc::broadcast_homogeneous()
tcspc::route()
Template Parameters
BroadcastEventListevent types to handle
Downstreamsdownstream processor classes (usually deduced)
Parameters
downstreamsdownstream processors
Returns
processor
Events handled
  • Types in BroadcastEventList: broadcast to every downstream
  • Flush: broadcast to every downstream

◆ broadcast_homogeneous() [1/2]

template<typename... Downstreams>
auto tcspc::broadcast_homogeneous ( Downstreams... downstreams)

Create a processor that broadcasts events to multiple downstream processors of the same type.

See also
tcspc::broadcast()
tcspc::route_homogeneous()
Template Parameters
Downstreamsdownstream processor types (usually deduced; must be all equal)
Parameters
downstreamsdownstream processors
Returns
processor
Events handled
  • All types: broadcast to every downstream
  • Flush: broadcast to every downstream

◆ broadcast_homogeneous() [2/2]

template<std::size_t N, typename Downstream>
auto tcspc::broadcast_homogeneous ( std::array< Downstream, N > downstreams)

Create a processor that broadcasts events to multiple downstream processors of the same type.

See also
tcspc::broadcast()
tcspc::route_homogeneous()
Template Parameters
Nnumber of downstreams (usually deduced)
Downstreamdownstream processor type (usually deduced)
Parameters
downstreamsdownstream processors
Returns
processor
Events handled
  • All types: broadcast to every downstream
  • Flush: broadcast to every downstream

◆ route()

template<typename RoutedEventList, typename BroadcastEventList = type_list<>, typename Router, typename... Downstreams>
auto tcspc::route ( Router router,
Downstreams... downstreams )

Create a processor that routes events to different downstreams.

This processor forwards each event in RoutedEventList to a different downstream according to the provided router (see Routers), which maps events to downstream indices.

Events mapped to indices out of range are discarded.

All other events (which must be in BroadcastEventList) are broadcast to all downstreams.

See also
tcspc::route_homogeneous()
tcspc::broadcast()
Template Parameters
RoutedEventListevent types to route
BroadcastEventListevent types to broadcast
Routertype of router (usually deduced)
Downstreamsdownstream processor types (usually deduced)
Parameters
routerthe router
downstreamsdownstream processors
Returns
processor
Events handled
  • Types in RoutedEventList: invoke router; pass to downstream at the resulting index, or ignore if out of range
  • Types not in RoutedEventList but in BroadcastEventList: broadcast to every downstream
  • Flush: broadcast to every downstream

◆ route_homogeneous() [1/2]

template<typename RoutedEventList, typename Router, typename... Downstreams>
auto tcspc::route_homogeneous ( Router router,
Downstreams... downstreams )

Create a processor that routes events to multiple downstreams of the same type.

This processor forwards each event in RoutedEventList to a different downstream according to the provided router (see Routers), which maps events to downstream indices.

Events mapped to indices out of range are discarded.

All other events are broadcast to all downstreams.

See also
tcspc::route()
tcspc::broadcast_homogeneous()
Template Parameters
RoutedEventListevent types to route
Routertype of router (usually deduced)
Downstreamsdownstream processor types (usually deduced; must be all equal)
Parameters
routerthe router
downstreamsdownstream processors
Returns
processor
Events handled
  • Types in RoutedEventList: invoke router; pass to downstream at the resulting index, or ignore if out of range
  • Types not in RoutedEventList: broadcast to every downstream
  • Flush: broadcast to every downstream

◆ route_homogeneous() [2/2]

template<typename RoutedEventList, typename Router, std::size_t N, typename Downstream>
auto tcspc::route_homogeneous ( Router router,
std::array< Downstream, N > downstreams )

Create a processor that routes events to multiple downstreams of the same type.

This processor forwards each event in RoutedEventList to a different downstream according to the provided router (see Routers), which maps events to downstream indices.

Events mapped to indices out of range are discarded.

All other events are broadcast to all downstreams.

See also
tcspc::route()
tcspc::broadcast_homogeneous()
Template Parameters
RoutedEventListevent types to route
Routertype of router (usually deduced)
Nnumber of downstreams (usually deduced)
Downstreamdownstream processor type (usually deduced)
Parameters
routerthe router
downstreamsdownstream processors
Returns
processor
Events handled
  • Types in RoutedEventList: invoke router; pass to downstream at the resulting index, or ignore if out of range
  • Types not in RoutedEventList: broadcast to every downstream
  • Flush: broadcast to every downstream