Clover Git
OpenCL 1.1 software implementation
|
Sub-buffer. More...
#include <memobject.h>
Public Member Functions | |
SubBuffer (class Buffer *parent, size_t offset, size_t size, cl_mem_flags flags, cl_int *errcode_ret) | |
Constructor. | |
size_t | size () const |
Size. | |
Type | type () const |
Return that we are a Coal::MemObject::SubBuffer . | |
bool | allocate (DeviceInterface *device) |
Allocate the parent Coal::Buffer . | |
size_t | offset () const |
Offset in bytes. | |
class Buffer * | parent () const |
Parent Coal::Buffer . | |
Private Attributes | |
size_t | p_offset |
size_t | p_size |
class Buffer * | p_parent |
Sub-buffer.
Definition at line 164 of file memobject.h.
SubBuffer::SubBuffer | ( | class Buffer * | parent, |
size_t | offset, | ||
size_t | size, | ||
cl_mem_flags | flags, | ||
cl_int * | errcode_ret | ||
) |
Constructor.
parent | parent Coal::Buffer |
offset | offset in parent of the start of this sub-buffer |
size | size of the sub-buffer |
flags | memory flags (must be compatible with the parent's ones) |
errcode_ret | return code |
Definition at line 401 of file memobject.cpp.
References Coal::MemObject::flags(), and Coal::Buffer::size().
Referenced by type().
bool SubBuffer::allocate | ( | DeviceInterface * | device | ) | [virtual] |
Allocate the parent Coal::Buffer
.
Reimplemented from Coal::MemObject.
Definition at line 455 of file memobject.cpp.
References Coal::MemObject::allocate(), and p_parent.
size_t SubBuffer::offset | ( | ) | const |
Offset in bytes.
Definition at line 460 of file memobject.cpp.
References p_offset.
Referenced by Coal::CPUBuffer::CPUBuffer(), Coal::MemObject::host_ptr(), and Coal::MemObject::info().
Buffer * SubBuffer::parent | ( | ) | const |
Parent Coal::Buffer
.
Reimplemented from Coal::Object.
Definition at line 465 of file memobject.cpp.
References p_parent.
Referenced by Coal::CPUBuffer::CPUBuffer(), Coal::MemObject::host_ptr(), and Coal::MemObject::info().
size_t SubBuffer::size | ( | ) | const [virtual] |
MemObject::Type SubBuffer::type | ( | ) | const [virtual] |
Return that we are a Coal::MemObject::SubBuffer
.
Implements Coal::MemObject.
Definition at line 450 of file memobject.cpp.
References SubBuffer().
size_t Coal::SubBuffer::p_offset [private] |
Definition at line 186 of file memobject.h.
Referenced by offset().
class Buffer* Coal::SubBuffer::p_parent [private] |
Reimplemented from Coal::Object.
Definition at line 187 of file memobject.h.
Referenced by allocate(), and parent().
size_t Coal::SubBuffer::p_size [private] |
Definition at line 186 of file memobject.h.
Referenced by size().