Gromacs
2024.3
|
#include <gromacs/gpu_utils/oclraii.h>
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. | |
ClHandle & | operator= (const ClHandle &)=delete |
Deleted assignment operator. | |
ClHandle (const ClHandle &)=delete | |
Deleted copy constructor. | |
ClHandle & | operator= (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. | |