Code quality: fixed compilation errors with CUDA

This commit is contained in:
Philippe Tillet
2015-08-20 21:24:41 -04:00
parent efdbf5f4a6
commit 33dac6b05a
15 changed files with 120 additions and 102 deletions

View File

@@ -100,7 +100,7 @@ template<class CLType, class CUType>
Handle<CLType, CUType>::~Handle()
{
#ifdef ISAAC_WITH_CUDA
if(has_ownership_ && cu_ && cu_.unique() && *cu_)
if(has_ownership_ && cu_.unique())
_delete(*cu_);
#endif
if(has_ownership_ && cl_ && cl_.unique() && *cl_)
@@ -122,6 +122,12 @@ CUType & Handle<CLType, CUType>::cu()
return *cu_;
}
template<class CLType, class CUType>
CUType const & Handle<CLType, CUType>::cu() const
{
return *cu_;
}
template class Handle<cl_mem, CUdeviceptr>;
template class Handle<cl_command_queue, CUstream>;
template class Handle<cl_context, CUcontext>;