Package com.aparapi.device
Class OpenCLDevice
java.lang.Object
com.aparapi.device.Device
com.aparapi.device.OpenCLDevice
- All Implemented Interfaces:
Comparable<Device>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static interface
static class
OpenCLDevice.OpenCLInvocationHandler<T extends OpenCL<T>>
Nested classes/interfaces inherited from class com.aparapi.device.Device
Device.TYPE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static IOpenCLDeviceConfigurator
private final long
private long
private long
private static Logger
private int
private long
private String
private final OpenCLPlatform
private boolean
private String
private AtomicBoolean
Fields inherited from class com.aparapi.device.Device
maxWorkGroupSize, maxWorkItemDimensions, maxWorkItemSize, type
-
Constructor Summary
ConstructorsConstructorDescriptionOpenCLDevice
(OpenCLPlatform _platform, long _deviceId, Device.TYPE _type) Minimal constructor -
Method Summary
Modifier and TypeMethodDescription<T extends OpenCL<T>>
T<T extends OpenCL<T>>
Tbind
(Class<T> _interface, InputStream _inputStream) <T extends OpenCL<T>>
Tvoid
Called by the underlying Aparapi OpenCL platform, upon device detection.long
long
long
int
long
getName()
private static boolean
isReservedInterfaceMethod
(Method _methods) boolean
Retrieves the shared memory flagstatic List
<OpenCLDevice> listDevices
(Device.TYPE type) List OpenCLDevices of a given TYPE, or all OpenCLDevices if type == null.static OpenCLDevice
select
(OpenCLDevice.DeviceComparitor _deviceComparitor) static OpenCLDevice
select
(OpenCLDevice.DeviceComparitor _deviceComparitor, Device.TYPE _type) static OpenCLDevice
select
(OpenCLDevice.DeviceSelector _deviceSelector) static void
setConfigurator
(IOpenCLDeviceConfigurator _configurator) Statically assigns a new configurator for all OpenCL devices detected after the assignment.void
setGlobalMemSize
(long _globalMemSize) void
setLocalMemSize
(long _localMemSize) void
setMaxComputeUnits
(int _maxComputeUnits) void
setMaxMemAllocSize
(long _maxMemAllocSize) void
setMaxWorkItemSize
(int _dim, int _value) void
void
setSharedMemory
(boolean _sharedMemory) Configure if device has the memory shared with the host memory.private String
streamToString
(InputStream _inputStream) toString()
Methods inherited from class com.aparapi.device.Device
best, bestACC, bestGPU, compareTo, createRange, createRange, createRange2D, createRange2D, createRange3D, createRange3D, equals, first, firstCPU, firstGPU, getMaxWorkGroupSize, getMaxWorkItemDimensions, getMaxWorkItemSize, getType, hashCode, setMaxWorkGroupSize, setMaxWorkItemDimensions, setMaxWorkItemSize, setType
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
-
Field Details
-
logger
-
configurator
-
platform
-
deviceId
private final long deviceId -
maxComputeUnits
private int maxComputeUnits -
localMemSize
private long localMemSize -
globalMemSize
private long globalMemSize -
maxMemAllocSize
private long maxMemAllocSize -
shortDescription
-
name
-
underConfiguration
-
-
Constructor Details
-
OpenCLDevice
Minimal constructor- Parameters:
_platform
-_deviceId
-_type
-
-
-
Method Details
-
setConfigurator
Statically assigns a new configurator for all OpenCL devices detected after the assignment.- Parameters:
_configurator
- the configurator instance
-
getOpenCLPlatform
-
getMaxComputeUnits
public int getMaxComputeUnits() -
setMaxComputeUnits
public void setMaxComputeUnits(int _maxComputeUnits) -
getLocalMemSize
public long getLocalMemSize() -
setLocalMemSize
public void setLocalMemSize(long _localMemSize) -
getMaxMemAllocSize
public long getMaxMemAllocSize() -
setMaxMemAllocSize
public void setMaxMemAllocSize(long _maxMemAllocSize) -
getGlobalMemSize
public long getGlobalMemSize() -
setGlobalMemSize
public void setGlobalMemSize(long _globalMemSize) -
setMaxWorkItemSize
public void setMaxWorkItemSize(int _dim, int _value) -
getName
-
setName
-
configure
public void configure()Called by the underlying Aparapi OpenCL platform, upon device detection. -
getDeviceId
public long getDeviceId()- Specified by:
getDeviceId
in classDevice
-
getShortDescription
- Specified by:
getShortDescription
in classDevice
-
getArgs
-
isReservedInterfaceMethod
-
streamToString
-
bind
-
bind
-
bind
-
listDevices
List OpenCLDevices of a given TYPE, or all OpenCLDevices if type == null. -
select
-
select
-
select
public static OpenCLDevice select(OpenCLDevice.DeviceComparitor _deviceComparitor, Device.TYPE _type) -
toString
-