OpenCL C++ Bindings
|
#include <opencl.hpp>
Classes | |
struct | rebind |
Public Types | |
typedef T | value_type |
typedef value_type * | pointer |
typedef const value_type * | const_pointer |
typedef value_type & | reference |
typedef const value_type & | const_reference |
typedef std::size_t | size_type |
typedef std::ptrdiff_t | difference_type |
Public Member Functions | |
SVMAllocator (cl::Context context) | |
SVMAllocator (const SVMAllocator &other) | |
template<typename U > | |
SVMAllocator (const SVMAllocator< U, SVMTrait > &other) | |
pointer | address (reference r) noexcept |
const_pointer | address (const_reference r) noexcept |
pointer | allocate (size_type size, typename cl::SVMAllocator< void, SVMTrait >::const_pointer=0, bool map=true) |
void | deallocate (pointer p, size_type) |
size_type | max_size () const noexcept |
template<class U , class... Args> | |
void | construct (U *p, Args &&... args) |
template<class U > | |
void | destroy (U *p) |
bool | operator== (SVMAllocator const &rhs) |
bool | operator!= (SVMAllocator const &a) |
STL-like allocator class for managing SVM objects provided for convenience.
Note that while this behaves like an allocator for the purposes of constructing vectors and similar objects, care must be taken when using with smart pointers. The allocator should not be used to construct a unique_ptr if we are using coarse-grained SVM mode because the coarse-grained management behaviour would behave incorrectly with respect to reference counting.
Instead the allocator embeds a Deleter which may be used with unique_ptr and is used with the allocate_shared and allocate_ptr supplied operations.
Definition at line 4064 of file opencl.hpp.
typedef const value_type* cl::SVMAllocator< T, SVMTrait >::const_pointer |
Definition at line 4071 of file opencl.hpp.
typedef const value_type& cl::SVMAllocator< T, SVMTrait >::const_reference |
Definition at line 4073 of file opencl.hpp.
typedef std::ptrdiff_t cl::SVMAllocator< T, SVMTrait >::difference_type |
Definition at line 4075 of file opencl.hpp.
typedef value_type* cl::SVMAllocator< T, SVMTrait >::pointer |
Definition at line 4070 of file opencl.hpp.
typedef value_type& cl::SVMAllocator< T, SVMTrait >::reference |
Definition at line 4072 of file opencl.hpp.
typedef std::size_t cl::SVMAllocator< T, SVMTrait >::size_type |
Definition at line 4074 of file opencl.hpp.
typedef T cl::SVMAllocator< T, SVMTrait >::value_type |
Definition at line 4069 of file opencl.hpp.
|
inline |
Definition at line 4086 of file opencl.hpp.
|
inlineexplicit |
Definition at line 4091 of file opencl.hpp.
|
inline |
Definition at line 4097 of file opencl.hpp.
|
inline |
Definition at line 4103 of file opencl.hpp.
|
inline |
Definition at line 4108 of file opencl.hpp.
|
inlinenoexcept |
Definition at line 4117 of file opencl.hpp.
|
inlinenoexcept |
Definition at line 4112 of file opencl.hpp.
|
inline |
Allocate an SVM pointer.
If the allocator is coarse-grained, this will take ownership to allow containers to correctly construct data in place.
Definition at line 4128 of file opencl.hpp.
|
inline |
Definition at line 4189 of file opencl.hpp.
|
inline |
Definition at line 4166 of file opencl.hpp.
|
inline |
Definition at line 4195 of file opencl.hpp.
|
inlinenoexcept |
Return the maximum possible allocation size. This is the minimum of the maximum sizes of all devices in the context.
Definition at line 4175 of file opencl.hpp.
|
inline |
Definition at line 4208 of file opencl.hpp.
|
inline |
Returns true if the contexts match.
Definition at line 4203 of file opencl.hpp.
|
friend |
Definition at line 4084 of file opencl.hpp.