Add RAII for cl_objects

- add removeVirtualEvent to cmdQueue fixture
- add const keyword in event functions

Change-Id: I11354eb8fceb15ae2c58bddd327863a15aab6393
This commit is contained in:
Kamil Diedrich
2019-02-06 08:49:35 +01:00
committed by sys_ocldev
parent 9f6eab0689
commit a7b46ccdbd
13 changed files with 160 additions and 177 deletions

View File

@@ -26,4 +26,9 @@ template <typename T>
static ReleaseableObjectPtr<T> clUniquePtr(T *object) {
return ReleaseableObjectPtr<T>{object};
}
template <class _Ty, class... _Types>
inline ReleaseableObjectPtr<_Ty> make_releaseable(_Types &&... _Args) {
return (ReleaseableObjectPtr<_Ty>(new _Ty(std::forward<_Types>(_Args)...)));
}
} // namespace OCLRT