HAMR
The Heterogeneous Accelerator Memory Resource
hamr::stream Class Reference

A wrapper around technology specific streams. More...

#include <hamr_stream.h>

Public Member Functions

 stream ()
 constructs a default stream More...
 
 stream (const stream &)=default
 
 stream (stream &&)=default
 
streamoperator= (const stream &)=default
 
streamoperator= (stream &&)=default
 
int synchronize () const
 synchronize the stream More...
 
 operator bool () const
 evaluates true if a stream has been set More...
 
void print () const
 sends the value of the stream to std::cerr More...
 
size_t get_stream ()
 convert the technology specific stream to an integer More...
 

Detailed Description

A wrapper around technology specific streams.

Streams are used to enable and order concurrent operations on accelerator devices. The default stream used in hamr is a stream-per-thread where available. However, note that libraries built seperately will likely use the default blocking stream and if so explicit specification of the stream when calling into those libraries is necessary. Note that hamr passes stream correctly when interfacing with Python. In most cases the hamr API's requiring a ::stream can be passed the technology specific stream due to implicit conversion operators implemented here.

Constructor & Destructor Documentation

◆ stream()

hamr::stream::stream ( )
inline

constructs a default stream

Member Function Documentation

◆ get_stream()

size_t hamr::stream::get_stream ( )

convert the technology specific stream to an integer

◆ operator bool()

hamr::stream::operator bool ( ) const

evaluates true if a stream has been set

◆ print()

void hamr::stream::print ( ) const

sends the value of the stream to std::cerr

◆ synchronize()

int hamr::stream::synchronize ( ) const

synchronize the stream


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