Clover Git
OpenCL 1.1 software implementation
Public Member Functions | Private Attributes

Coal::SubBuffer Class Reference

Sub-buffer. More...

#include <memobject.h>

Inheritance diagram for Coal::SubBuffer:
Collaboration diagram for Coal::SubBuffer:

List of all members.

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 Bufferparent () const
 Parent Coal::Buffer.

Private Attributes

size_t p_offset
size_t p_size
class Bufferp_parent

Detailed Description

Sub-buffer.

Definition at line 164 of file memobject.h.


Constructor & Destructor Documentation

SubBuffer::SubBuffer ( class Buffer parent,
size_t  offset,
size_t  size,
cl_mem_flags  flags,
cl_int *  errcode_ret 
)

Constructor.

Parameters:
parentparent Coal::Buffer
offsetoffset in parent of the start of this sub-buffer
sizesize of the sub-buffer
flagsmemory flags (must be compatible with the parent's ones)
errcode_retreturn code

Definition at line 401 of file memobject.cpp.

References Coal::MemObject::flags(), and Coal::Buffer::size().

Referenced by type().


Member Function Documentation

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]

Size.

Implements Coal::MemObject.

Definition at line 445 of file memobject.cpp.

References p_size.

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().


Member Data Documentation

size_t Coal::SubBuffer::p_offset [private]

Definition at line 186 of file memobject.h.

Referenced by offset().

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().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines