isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Stream.h
1 #pragma once
2 
3 #include <memory>
4 
5 #include "Event.h"
6 
7 namespace isce3 { namespace cuda { namespace core {
8 
10 class Stream {
11 public:
13  Stream();
14 
16  Stream(std::nullptr_t);
17 
19  explicit operator bool() const;
20 
22  cudaStream_t get() const { return *_stream; }
23 
25  void record_event(Event) const;
26 
28  Event record_event() const;
29 
31  void wait_event(Event) const;
32 
33 private:
34  std::shared_ptr<cudaStream_t> _stream;
35 };
36 
37 bool operator==(Stream, Stream);
38 
39 bool operator!=(Stream, Stream);
40 
42 void synchronize(Stream);
43 
49 bool query(Stream);
50 
51 }}}
Thin RAII wrapper around cudaEvent_t.
Definition: Event.h:8
Stream()
Create an asynchronous stream object on the current CUDA device.
Event record_event() const
Record an event to capture the contents of the stream.
void wait_event(Event) const
Wait for an event to complete.
Thin RAII wrapper around cudaStream_t.
Definition: Stream.h:10

Generated for ISCE3.0 by doxygen 1.8.5.