Skip to content

Class ILLIXR::switchboard::writer

template <typename specific_event>

ClassList > ILLIXR > switchboard > writer

A handle which can publish events to a topic.

  • #include <switchboard.hpp>

Public Functions

Type Name
ptr< specific_event > allocate (Args &&... args)
Like new /malloc but more efficient for this specific case.
void put (ptr< specific_event > && this_specific_event)
Publish ev to this topic.
writer (topic & topic_)

Public Functions Documentation

function allocate

Like new /malloc but more efficient for this specific case.

template<class... Args>
inline ptr < specific_event > ILLIXR::switchboard::writer::allocate (
    Args &&... args
) 

There is an optimization available which has not yet been implemented: switchboard can reuse memory from old events, like a slab allocator. Suppose module A publishes data for module B. B's deallocation through the destructor, and A's allocation through this method completes the cycle in a double-buffer (AKA swap-chain).


function put

Publish ev to this topic.

inline void ILLIXR::switchboard::writer::put (
    ptr < specific_event > && this_specific_event
) 


function writer

inline ILLIXR::switchboard::writer::writer (
    topic & topic_
) 


The documentation for this class was generated from the following file include/illixr/switchboard.hpp