ParallelME Runtime Environment
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Buffer Class Referenceabstract

#include <Buffer.hpp>

Public Types

enum  ElementType {
  CHAR, CHAR2, CHAR4, UCHAR,
  UCHAR2, UCHAR4, RGBA, SHORT,
  SHORT2, SHORT4, USHORT, USHORT2,
  USHORT4, INT, INT2, INT4,
  UINT, UINT2, UINT4, FLOAT,
  FLOAT2, FLOAT4
}
 

Public Member Functions

 Buffer (const Buffer &)=delete
 
Bufferoperator= (const Buffer &)=delete
 
virtual void copyFrom (jbyteArray array)=0
 Copies from an input array of bytes.
 
virtual void copyFrom (jshortArray array)=0
 Copies from an input array of shorts.
 
virtual void copyFrom (jintArray array)=0
 Copies from an input array of ints.
 
virtual void copyFrom (jfloatArray array)=0
 Copies from an input array of floats.
 
virtual void copyFrom (jobject bitmap)=0
 Copies from an input Bitmap.
 
virtual void copyTo (jbyteArray array)=0
 Copies to an output array of bytes.
 
virtual void copyTo (jshortArray array)=0
 Copies to an output array of shorts.
 
virtual void copyTo (jintArray array)=0
 Copies to an output array of ints.
 
virtual void copyTo (jfloatArray array)=0
 Copies to an output array of floats.
 
virtual void copyTo (jobject bitmap)=0
 Copies to an output Bitmap object.
 
Devicedevice ()
 
ElementType type ()
 
size_t numX ()
 
size_t numY ()
 
size_t numZ ()
 
size_t size ()
 

Public Attributes

const size_t ElementSize [22]
 

Protected Member Functions

 Buffer (Device *device, ElementType type, int numX, int numY, int numZ)
 

Detailed Description

This class is an abstract class that defines the interface of a buffer that should be implemented for a given programming platform. Instances of implementations of this class can be created by calling device.createBuffer().

Member Enumeration Documentation

Types that can be used on a buffer.

Constructor & Destructor Documentation

Buffer::Buffer ( Device device,
ElementType  type,
int  numX,
int  numY,
int  numZ 
)
inlineprotected

Saves some information that is useful to the derived classes.

Member Function Documentation

Device* Buffer::device ( )
inline

Returns the device where the buffer's memory is.

size_t Buffer::numX ( )
inline

Returns the number of elements of the X dimension of the buffer.

size_t Buffer::numY ( )
inline

Returns the number of elements of the Y dimension of the buffer.

size_t Buffer::numZ ( )
inline

Returns the number of elements of the Z dimension of the buffer.

size_t Buffer::size ( )
inline

Returns the size of the buffer (the size of the element times how many elements).

ElementType Buffer::type ( )
inline

Returns the type of the elements of the buffer.

Member Data Documentation

const size_t Buffer::ElementSize[22]
Initial value:
= {
1, 2, 4, 1, 2, 4, 4,
2, 4, 8, 2, 4, 8,
4, 8, 16, 4, 8, 16,
4, 8, 16
}

Array that stores the size in bytes of each element.


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