mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Add RAII for cl_objects
- add removeVirtualEvent to cmdQueue fixture - add const keyword in event functions Change-Id: I11354eb8fceb15ae2c58bddd327863a15aab6393
This commit is contained in:
committed by
sys_ocldev
parent
9f6eab0689
commit
a7b46ccdbd
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user