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 interfacestatic interfacestatic classOpenCLDevice.OpenCLInvocationHandler<T extends OpenCL<T>>Nested classes/interfaces inherited from class Device
Device.TYPE -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static IOpenCLDeviceConfiguratorprivate final longprivate longprivate longprivate static Loggerprivate intprivate longprivate Stringprivate final OpenCLPlatformprivate booleanprivate Stringprivate AtomicBooleanFields inherited from class 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>>
TvoidCalled by the underlying Aparapi OpenCL platform, upon device detection.longlonglongintlonggetName()private static booleanisReservedInterfaceMethod(Method _methods) booleanRetrieves the shared memory flagstatic List<OpenCLDevice> listDevices(Device.TYPE type) List OpenCLDevices of a given TYPE, or all OpenCLDevices if type == null.static OpenCLDeviceselect(OpenCLDevice.DeviceComparitor _deviceComparitor) static OpenCLDeviceselect(OpenCLDevice.DeviceComparitor _deviceComparitor, Device.TYPE _type) static OpenCLDeviceselect(OpenCLDevice.DeviceSelector _deviceSelector) static voidsetConfigurator(IOpenCLDeviceConfigurator _configurator) Statically assigns a new configurator for all OpenCL devices detected after the assignment.voidsetGlobalMemSize(long _globalMemSize) voidsetLocalMemSize(long _localMemSize) voidsetMaxComputeUnits(int _maxComputeUnits) voidsetMaxMemAllocSize(long _maxMemAllocSize) voidsetMaxWorkItemSize(int _dim, int _value) voidvoidsetSharedMemory(boolean _sharedMemory) Configure if device has the memory shared with the host memory.private StringstreamToString(InputStream _inputStream) toString()Methods inherited from class Device
best, bestACC, bestGPU, compareTo, createRange, createRange, createRange2D, createRange2D, createRange3D, createRange3D, equals, first, firstCPU, firstGPU, getMaxWorkGroupSize, getMaxWorkItemDimensions, getMaxWorkItemSize, getType, hashCode, setMaxWorkGroupSize, setMaxWorkItemDimensions, setMaxWorkItemSize, setTypeMethods inherited from interface 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:
getDeviceIdin classDevice
-
getShortDescription
- Specified by:
getShortDescriptionin 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
-