| 198 | } |
| 199 | |
| 200 | Stream::Stream() |
| 201 | : m_owns(true) |
| 202 | , m_size_inbytes(doComputeSizeInBytes()) |
| 203 | { |
| 204 | try |
| 205 | { |
| 206 | util::CheckThrow(cudaStreamCreateWithFlags(&m_handle, cudaStreamNonBlocking)); |
| 207 | incrementInstanceCount(); |
| 208 | GetAuxStream(); |
| 209 | util::CheckThrow(cudaEventCreateWithFlags(&m_event, cudaEventDisableTiming)); |
| 210 | } |
| 211 | catch (...) |
| 212 | { |
| 213 | destroy(); |
| 214 | throw; |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | Stream::Stream(IExternalStream &extStream) |
| 219 | : m_owns(false) |