Poplar and PopLibs
poplar::ResumableStreamCallback Class Reference

Expands StreamCallback API with functions that prevent further progress. More...

#include <StreamCallback.hpp>

Inheritance diagram for poplar::ResumableStreamCallback:
poplar::StreamCallback

Public Member Functions

void notify ()
 Schedules the callback task back to execution. More...
 
bool isAwaiting () const
 Returns whether the callback task is waiting to be notified.
 
- Public Member Functions inherited from poplar::StreamCallback
virtual Result prefetch (void *p)=0
 Callback function to fill the host buffer (host-to-device streams only). More...
 
virtual void fetch (void *)=0
 Callback function to fill the host buffer. More...
 

Protected Member Functions

void wait ()
 Calling this function will suspend the execution of the current callback. More...
 

Detailed Description

Expands StreamCallback API with functions that prevent further progress.

Useful when there are dependencies or conditions between callbacks that prevent progress within the callback function.

Member Function Documentation

◆ notify()

void poplar::ResumableStreamCallback::notify ( )

Schedules the callback task back to execution.

Continues execution from the last point where wait() was called.

◆ wait()

void poplar::ResumableStreamCallback::wait ( )
protected

Calling this function will suspend the execution of the current callback.

Should only be called from this.


The documentation for this class was generated from the following file: