Class CoprocessorSession¶
Defined in File Transport.hpp
Inheritance Relationships¶
Base Type¶
public catalyst::transport::TransportSession(Class TransportSession)
Class Documentation¶
-
class CoprocessorSession : public catalyst::transport::TransportSession¶
Coprocessor role: receives messages, process, and returns replies.
A coprocessor function comes in two conventions:
a host/cpu per-message function vs.
a device kernel launched once. Each backend overrides only the setter it supports; the other keeps the throwing default, so a mis-bind fails loudly at bind time.
Public Functions
-
inline virtual void set_coprocessor_fn(CoprocessorFn, void*)¶
Bind a per-message coprocessor function (CPU-style).
Call before start().
fnis invoked once per received message, receiving the message’s decoder_id so it can dispatch internally;ctxis passed back on every invocation and may be null.
-
inline virtual void set_coprocessor_launcher(CoprocessorLauncherFn, void*)¶
Bind a launch-once coprocessor function (GPU-style).
Call before start().
fnis invoked once (in start()) to launch a persistent engine on the session’s datapath;ctxmay be null.
-
inline virtual CoprocConvention coprocessor_fn_convention() const¶
Which of the two coprocessor function convention this backend takes.
Defaults to per-message.