ParallelME Runtime Environment
Public Member Functions | Protected Member Functions | List of all members
Device Class Referenceabstract

#include <Device.hpp>

Public Member Functions

 Device (const Device &)=delete
 
Deviceoperator= (const Device &)=delete
 
DevicePlatform platform () const
 
DeviceType type () const
 
DeviceID id () const
 
JavaVM * jvm ()
 
JNIEnv * jenv ()
 Returns the JNIEnv of the current thread.
 
virtual void finish ()=0
 
virtual std::shared_ptr< BuffercreateBuffer (Buffer::ElementType type, int numX, int numY=1, int numZ=1)=0
 

Protected Member Functions

 Device (DevicePlatform platform, DeviceType type, JavaVM *jvm)
 

Detailed Description

This is an abstract class that defines the interface that should be implemented by a device of a given programming platform to work with the Runtime system. Each different programming platform creates one Device class for each execution device present in their system, and the Runtime class registers all these devices to be used on execution.

Constructor & Destructor Documentation

Device::Device ( DevicePlatform  platform,
DeviceType  type,
JavaVM *  jvm 
)
inlineprotected

Initializes the device type.

Member Function Documentation

virtual std::shared_ptr<Buffer> Device::createBuffer ( Buffer::ElementType  type,
int  numX,
int  numY = 1,
int  numZ = 1 
)
pure virtual

Creates a buffer on the device's memory and returns it.

Parameters
typeThe type of the elements of the buffer.
numXThe number of elements of the X dimension of the buffer.
numYThe number of elements of the Y dimension of the buffer.
numZThe number of elements of the Z dimension of the buffer.
See also
setConfigFunction
virtual void Device::finish ( )
pure virtual

Blocks until all executions queued for this device finishes.

DeviceID Device::id ( ) const
inline

Returns the device's ID.

JavaVM* Device::jvm ( )
inline

Returns the JavaVM.

DevicePlatform Device::platform ( ) const
inline

Returns the device's platform.

DeviceType Device::type ( ) const
inline

Returns the device type.


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