ASL  0.1.7
Advanced Simulation Library
Public Member Functions | List of all members
cl::Memory Class Reference

Class interface for cl_mem. More...

#include <cl.hpp>

Inheritance diagram for cl::Memory:
Inheritance graph
[legend]
Collaboration diagram for cl::Memory:
Collaboration graph
[legend]

Public Member Functions

 Memory ()
 Default constructor - initializes to NULL. More...
 
__CL_EXPLICIT_CONSTRUCTORS Memory (const cl_mem &memory)
 Constructor from cl_mem - takes ownership. More...
 
Memoryoperator= (const cl_mem &rhs)
 Assignment operator from cl_mem - takes ownership. More...
 
 Memory (const Memory &mem)
 Copy constructor to forward copy to the superclass correctly. Required for MSVC. More...
 
Memoryoperator= (const Memory &mem)
 Copy assignment to forward copy to the superclass correctly. Required for MSVC. More...
 
template<typename T >
cl_int getInfo (cl_mem_info name, T *param) const
 Wrapper for clGetMemObjectInfo(). More...
 
template<cl_int name>
detail::param_traits< detail::cl_mem_info, name >::param_type getInfo (cl_int *err=NULL) const
 Wrapper for clGetMemObjectInfo() that returns by value. More...
 
- Public Member Functions inherited from cl::detail::Wrapper< cl_mem >
 Wrapper ()
 
 Wrapper (const cl_type &obj)
 
 Wrapper (const Wrapper< cl_type > &rhs)
 
 ~Wrapper ()
 
Wrapper< cl_type > & operator= (const Wrapper< cl_type > &rhs)
 
Wrapper< cl_type > & operator= (const cl_type &rhs)
 
cl_type operator() () const
 
cl_typeoperator() ()
 

Additional Inherited Members

- Public Types inherited from cl::detail::Wrapper< cl_mem >
typedef cl_mem cl_type
 
- Protected Member Functions inherited from cl::detail::Wrapper< cl_mem >
cl_int retain () const
 
cl_int release () const
 
- Protected Attributes inherited from cl::detail::Wrapper< cl_mem >
cl_type object_
 

Detailed Description

Class interface for cl_mem.

Note
Copies of these objects are shallow, meaning that the copy will refer to the same underlying cl_mem as the original. For details, see clRetainMemObject() and clReleaseMemObject().
See also
cl_mem

Definition at line 2893 of file cl.hpp.

Constructor & Destructor Documentation

◆ Memory() [1/3]

cl::Memory::Memory ( )
inline

Default constructor - initializes to NULL.

Definition at line 2897 of file cl.hpp.

◆ Memory() [2/3]

__CL_EXPLICIT_CONSTRUCTORS cl::Memory::Memory ( const cl_mem &  memory)
inline

Constructor from cl_mem - takes ownership.

This effectively transfers ownership of a refcount on the cl_mem into the new Memory object.

Definition at line 2904 of file cl.hpp.

◆ Memory() [3/3]

cl::Memory::Memory ( const Memory mem)
inline

Copy constructor to forward copy to the superclass correctly. Required for MSVC.

Definition at line 2920 of file cl.hpp.

Member Function Documentation

◆ getInfo() [1/2]

template<typename T >
cl_int cl::Memory::getInfo ( cl_mem_info  name,
T *  param 
) const
inline

Wrapper for clGetMemObjectInfo().

Definition at line 2949 of file cl.hpp.

◆ getInfo() [2/2]

template<cl_int name>
detail::param_traits<detail::cl_mem_info, name>::param_type cl::Memory::getInfo ( cl_int *  err = NULL) const
inline

Wrapper for clGetMemObjectInfo() that returns by value.

Definition at line 2959 of file cl.hpp.

◆ operator=() [1/2]

Memory& cl::Memory::operator= ( const cl_mem &  rhs)
inline

Assignment operator from cl_mem - takes ownership.

This effectively transfers ownership of a refcount on the rhs and calls clReleaseMemObject() on the value previously held by this instance.

Definition at line 2911 of file cl.hpp.

◆ operator=() [2/2]

Memory& cl::Memory::operator= ( const Memory mem)
inline

Copy assignment to forward copy to the superclass correctly. Required for MSVC.

Definition at line 2925 of file cl.hpp.


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