mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-29 11:01:23 +00:00
nvidia/cuda/stream: Add synchronize function
This commit is contained in:
parent
4dac477500
commit
c0a108bf4a
2 changed files with 10 additions and 0 deletions
|
@ -64,3 +64,11 @@ nvidia::cuda::stream::~stream()
|
||||||
{
|
{
|
||||||
return _stream;
|
return _stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void nvidia::cuda::stream::synchronize()
|
||||||
|
{
|
||||||
|
D_LOG_DEBUG("Synchronizing... (Addr: 0x%" PRIuPTR ")", this);
|
||||||
|
if (auto res = _cuda->cuStreamSynchronize(_stream); res != ::nvidia::cuda::result::SUCCESS) {
|
||||||
|
throw ::nvidia::cuda::cuda_error(res);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -31,5 +31,7 @@ namespace nvidia::cuda {
|
||||||
stream(::nvidia::cuda::stream_flags flags = ::nvidia::cuda::stream_flags::DEFAULT, int32_t priority = 0);
|
stream(::nvidia::cuda::stream_flags flags = ::nvidia::cuda::stream_flags::DEFAULT, int32_t priority = 0);
|
||||||
|
|
||||||
::nvidia::cuda::stream_t get();
|
::nvidia::cuda::stream_t get();
|
||||||
|
|
||||||
|
void synchronize();
|
||||||
};
|
};
|
||||||
} // namespace nvidia::cuda
|
} // namespace nvidia::cuda
|
||||||
|
|
Loading…
Reference in a new issue