Caffe2 - C++ API
A deep learning, cross platform ML framework
Stream.h
1 #ifndef THCP_STREAM_INC
2 #define THCP_STREAM_INC
3 
4 #include <c10/cuda/CUDAStream.h>
5 #include <torch/csrc/python_headers.h>
6 #include <THC/THC.h>
7 
8 struct THCPStream {
9  PyObject_HEAD
10  uint64_t cdata;
11  at::cuda::CUDAStream cuda_stream;
12 };
13 extern PyObject *THCPStreamClass;
14 
15 void THCPStream_init(PyObject *module);
16 
17 inline bool THCPStream_Check(PyObject* obj) {
18  return THCPStreamClass && PyObject_IsInstance(obj, THCPStreamClass);
19 }
20 
21 #endif // THCP_STREAM_INC