Gromacs  2021.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::ClHandle< cl_type > Class Template Reference

#include <gromacs/gpu_utils/oclraii.h>


template<typename cl_type>
class gmx::ClHandle< cl_type >

Wrapper of OpenCL type cl_type to implement RAII.

Works by calling the releaser function associated with cl_type by OpenClTraits.

Simple copying and assignment are not supported, because there's no need for that, and would require OpenCL API calls for deep copies if they were needed. Move and move assignment are fine, however.

Public Member Functions

 ClHandle (cl_type handle)
 Constructor that takes an already created handle.
 ~ClHandle ()
 Destructor that calls the releaser associated with cl_type.
 ClHandle ()=delete
 Deleted default constructor.
ClHandleoperator= (const ClHandle &)=delete
 Deleted assignment operator.
 ClHandle (const ClHandle &)=delete
 Deleted copy constructor.
ClHandleoperator= (ClHandle &&) noexcept=default
 Default move assignment operator.
 ClHandle (ClHandle &&) noexcept=default
 Default copy constructor.
 operator cl_type () const
 Convenience conversion operator so the wrapper type can simply convert to the wrapped type.

The documentation for this class was generated from the following file: