public class CLDevice extends Object
CLPlatform.listDevices(CLDevice.Type, boolean),
CLPlatform.listAllDevices(boolean),
CLPlatform.listCPUDevices(boolean),
CLPlatform.listGPUDevices(boolean)| Modifier and Type | Class and Description |
|---|---|
static class |
CLDevice.AffinityDomain
Enums values for cl_device_affinity_domain
|
static class |
CLDevice.ExecutionCapability
Bit values for CL_DEVICE_EXECUTION_CAPABILITIES
|
static class |
CLDevice.FpConfig
Floating-point config of a device.
|
static class |
CLDevice.GlobalMemCacheType
Values for CL_DEVICE_GLOBAL_MEM_CACHE_TYPE
|
static class |
CLDevice.LocalMemType
Values for CL_DEVICE_LOCAL_MEM_TYPE
|
static class |
CLDevice.PartitionType
Device partition types.
|
static class |
CLDevice.QueueProperties
Bit values for CL_DEVICE_QUEUE_PROPERTIES
|
static class |
CLDevice.Type
Bit values for CL_DEVICE_TYPE
|
| Modifier and Type | Method and Description |
|---|---|
CLQueue |
createOutOfOrderQueue(CLContext context) |
CLQueue |
createProfilingQueue(CLContext context) |
CLQueue |
createQueue(CLContext context,
CLDevice.QueueProperties... queueProperties)
Calls clCreateCommandQueue.
|
CLQueue |
createQueue(EnumSet<CLDevice.QueueProperties> queueProperties,
CLContext context)
Deprecated.
|
String |
createSignature() |
CLDevice[] |
createSubDevicesByAffinity(CLDevice.AffinityDomain affinityDomain)
Creates an array of sub-devices that each reference a non-intersecting set of compute units within this device.
|
CLDevice[] |
createSubDevicesByCounts(long... computeUnitsForEachSubDevice)
Creates an array of sub-devices that each reference a non-intersecting set of compute units within this device.
|
CLDevice[] |
createSubDevicesEqually(int computeUnitsForEverySubDevice)
Creates an array of sub-devices that each reference a non-intersecting set of compute units within this device.
|
boolean |
equals(Object obj)
Underyling implementation pointer-based equality test
|
int |
getAddressBits()
The default compute device address space size specified as an unsigned integer value in bits.
|
String[] |
getBuiltInKernels()
List of built-in kernels supported by the device.
|
ByteOrder |
getByteOrder() |
static Map<String,List<CLDevice>> |
getDevicesBySignature(List<CLDevice> devices) |
EnumSet<CLDevice.FpConfig> |
getDoubleFpConfig()
TODO
|
String |
getDriverVersion()
OpenCL software driver version string in the form major_number.minor_number.
|
static <E extends TypedPointer,A extends com.nativelibs4java.opencl.CLAbstractEntity> |
getEntities(A[] objects,
Pointer<E> out) |
EnumSet<CLDevice.ExecutionCapability> |
getExecutionCapabilities()
Describes the execution capabilities of the device.
|
String[] |
getExtensions()
List of extension names supported by the device.
|
int |
getGlobalMemCachelineSize()
Size of global memory cache line in bytes.
|
long |
getGlobalMemCacheSize()
Size of global memory cache in bytes.
|
CLDevice.GlobalMemCacheType |
getGlobalMemCacheType()
Type of global memory cache supported.
|
long |
getGlobalMemSize()
Size of global device memory in bytes.
|
EnumSet<CLDevice.FpConfig> |
getHalfFpConfig()
TODO
|
long |
getImage2DMaxHeight()
Max height of 2D image in pixels.
|
long |
getImage2DMaxWidth()
Max width of 2D image in pixels.
|
long |
getImage3DMaxDepth()
Max depth of 3D image in pixels.
|
long |
getImage3DMaxHeight()
Max height of 3D image in pixels.
|
long |
getImage3DMaxWidth()
Max width of 3D image in pixels.
|
long |
getImageMaxArraySize()
TODO
|
long |
getImageMaxBufferSize()
TODO
|
ByteOrder |
getKernelsDefaultByteOrder()
Deprecated.
Use
getByteOrder() |
long |
getLocalMemSize()
Size of local memory arena in bytes.
|
CLDevice.LocalMemType |
getLocalMemType()
Type of local memory supported.
|
int |
getMaxClockFrequency()
Maximum configured clock frequency of the device in MHz.
|
int |
getMaxComputeUnits()
The number of parallel compute cores on the OpenCL device.
|
int |
getMaxConstantArgs()
Max number of arguments declared with the __constant qualifier in a kernel.
|
long |
getMaxConstantBufferSize()
Max size in bytes of a constant buffer allocation.
|
long |
getMaxMemAllocSize()
Max size of memory object allocation in bytes.
|
long |
getMaxParameterSize()
Max size in bytes of the arguments that can be passed to a kernel.
|
int |
getMaxReadImageArgs()
Max number of simultaneous image objects that can be read by a kernel.
|
int |
getMaxSamplers()
Maximum number of samplers that can be used in a kernel.
|
long |
getMaxWorkGroupSize()
Maximum number of work-items in a work-group executing a kernel using the data parallel execution model.
|
int |
getMaxWorkItemDimensions()
Maximum dimensions that specify the global and local work-item IDs used by the data parallel execution model.
|
long[] |
getMaxWorkItemSizes()
Maximum number of work-items that can be specified in each dimension of the work-group to clEnqueueNDRangeKernel.
|
int |
getMaxWriteImageArgs()
Max number of simultaneous image objects that can be written to by a kernel.
|
int |
getMemBaseAddrAlign()
Describes the alignment in bits of the base address of any allocated memory object.
|
int |
getMinDataTypeAlign()
The smallest alignment in bytes which can be used for any data type.
|
String |
getName()
Device name string.
|
int |
getNativeVectorWidthChar()
Returns the native ISA vector width.
|
int |
getNativeVectorWidthDouble()
Returns the native ISA vector width.
|
int |
getNativeVectorWidthFloat()
Returns the native ISA vector width.
|
long |
getNativeVectorWidthHalf()
TODO
|
int |
getNativeVectorWidthInt()
Returns the native ISA vector width.
|
int |
getNativeVectorWidthLong()
Returns the native ISA vector width.
|
int |
getNativeVectorWidthShort()
Returns the native ISA vector width.
|
String |
getOpenCLCVersion()
OpenCL C version string.
|
String |
getOpenCLVersion()
Deprecated.
Legacy typo, use getOpenCLCVersion() instead.
|
CLDevice |
getParent()
Returns the cl_device_id of the parent device to which this sub-device belongs.
|
CLDevice.AffinityDomain |
getPartitionAffinityDomain()
Affinity domain specified in
createSubDevicesByAffinity(AffinityDomain), or null if the device is not a sub-device or wasn't split by affinity. |
EnumSet<CLDevice.PartitionType> |
getPartitionProperties()
TODO
|
CLPlatform |
getPlatform() |
int |
getPreferredVectorWidthChar()
Preferred native vector width size for built-in scalar types that can be put into vectors.
|
int |
getPreferredVectorWidthDouble()
Preferred native vector width size for built-in scalar types that can be put into vectors.
|
int |
getPreferredVectorWidthFloat()
Preferred native vector width size for built-in scalar types that can be put into vectors.
|
long |
getPreferredVectorWidthHalf()
TODO
|
int |
getPreferredVectorWidthInt()
Preferred native vector width size for built-in scalar types that can be put into vectors.
|
int |
getPreferredVectorWidthLong()
Preferred native vector width size for built-in scalar types that can be put into vectors.
|
int |
getPreferredVectorWidthShort()
Preferred native vector width size for built-in scalar types that can be put into vectors.
|
long |
getPrintfBufferSize()
Maximum size of the internal buffer that holds the output of printf calls from a kernel.
|
String |
getProfile()
OpenCL profile string.
|
long |
getProfilingTimerResolution()
Describes the resolution of device timer.
|
EnumSet<CLDevice.QueueProperties> |
getQueueProperties()
Describes the command-queue properties supported by the device.
|
long |
getReferenceCount()
TODO
|
EnumSet<CLDevice.FpConfig> |
getSingleFPConfig()
Describes single precision floating- point capability of the device.
|
EnumSet<CLDevice.Type> |
getType()
The OpenCL device type.
|
String |
getVendor()
Vendor name string.
|
int |
getVendorId()
A unique device vendor identifier.
|
String |
getVersion()
OpenCL version string.
|
boolean |
hasErrorCorrectionSupport()
Is CL_TRUE if the device implements error correction for the memories, caches, registers etc. in the device.
|
boolean |
hasExtension(String name) |
int |
hashCode()
Underyling implementation pointer-based hashCode computation
|
boolean |
hasImageSupport()
Is CL_TRUE if images are supported by the OpenCL device and CL_FALSE otherwise.
|
boolean |
hasOutOfOrderQueueSupport() |
boolean |
isAvailable()
Is CL_TRUE if the device is available and CL_FALSE if the device is not available.
|
boolean |
isByteAddressableStoreSupported()
Whether this device supports the cl_khr_byte_addressable_store extension.
|
boolean |
isCompilerAvailable()
Is CL_FALSE if the implementation does not have a compiler available to compile the program source.
|
boolean |
isDoubleSupported()
Whether this device support any double-precision number extension (cl_khr_fp64 or cl_amd_fp64)
|
boolean |
isDoubleSupportedAMD()
Whether this device supports the cl_amd_fp64 double-precision number extension
|
boolean |
isDoubleSupportedKHR()
Whether this device support the cl_khr_fp64 double-precision number extension
|
boolean |
isEndianLittle()
Is CL_TRUE if the OpenCL device is a little endian device and CL_FALSE otherwise.
|
boolean |
isGlobalInt32BaseAtomicsSupported()
Whether this device supports the cl_khr_global_int32_base_atomics extension.
|
boolean |
isGlobalInt32ExtendedAtomicsSupported()
Whether this device supports the cl_khr_global_int32_extended_atomics extension.
|
boolean |
isGLSharingSupported()
Whether this device supports any OpenGL sharing extension (cl_khr_gl_sharing or cl_APPLE_gl_sharing)
|
boolean |
isHalfSupported()
Whether this device supports the cl_khr_fp16 extension.
|
boolean |
isHostUnifiedMemory()
Whether the device and the host have a unified memory subsystem.
|
boolean |
isLinkerAvailable()
TODO
|
boolean |
isLocalInt32BaseAtomicsSupported()
Whether this device supports the cl_khr_local_int32_base_atomics extension.
|
boolean |
isLocalInt32ExtendedAtomicsSupported()
Whether this device supports the cl_khr_local_int32_extended_atomics extension.
|
boolean |
isPreferredInteropUserSync()
Is CL_TRUE if the device’s preference is for the user to be responsible for synchronization, when sharing memory objects between OpenCL and other APIs such as DirectX, CL_FALSE if the device / implementation has a performant path for performing synchronization of memory object shared between OpenCL and other APIs such as DirectX.
|
void |
release()
Manual release of the OpenCL resources represented by this object.
|
String |
replaceDoubleExtensionByExtensionActuallyAvailable(String kernelSource)
If this device supports the extension cl_amd_fp64 but not cl_khr_fp64, replace any OpenCL source code pragma of the style
#pragma OPENCL EXTENSION cl_khr_fp64 : enable by #pragma OPENCL EXTENSION cl_amd_fp64 : enable. |
String |
toString() |
public CLPlatform getPlatform()
public String createSignature()
public static Map<String,List<CLDevice>> getDevicesBySignature(List<CLDevice> devices)
public ByteOrder getByteOrder()
@Deprecated public ByteOrder getKernelsDefaultByteOrder()
getByteOrder()public EnumSet<CLDevice.ExecutionCapability> getExecutionCapabilities()
public EnumSet<CLDevice.Type> getType()
public int getVendorId()
public int getMaxComputeUnits()
public int getMaxWorkItemDimensions()
public long[] getMaxWorkItemSizes()
public long getMaxWorkGroupSize()
public int getMaxClockFrequency()
public int getAddressBits()
public long getMaxMemAllocSize()
public boolean hasImageSupport()
public int getMaxReadImageArgs()
public int getMaxWriteImageArgs()
public CLQueue createQueue(CLContext context, CLDevice.QueueProperties... queueProperties)
context - context of the queue to create@Deprecated public CLQueue createQueue(EnumSet<CLDevice.QueueProperties> queueProperties, CLContext context)
public CLQueue createOutOfOrderQueue(CLContext context)
public CLQueue createProfilingQueue(CLContext context)
public long getImage2DMaxWidth()
public long getImage2DMaxHeight()
public long getImage3DMaxWidth()
public long getImage3DMaxHeight()
public long getImage3DMaxDepth()
public int getMaxSamplers()
public long getMaxParameterSize()
public int getMemBaseAddrAlign()
public int getMinDataTypeAlign()
public EnumSet<CLDevice.FpConfig> getSingleFPConfig()
public CLDevice.GlobalMemCacheType getGlobalMemCacheType()
public int getGlobalMemCachelineSize()
public long getGlobalMemCacheSize()
public long getGlobalMemSize()
public long getMaxConstantBufferSize()
public int getMaxConstantArgs()
public CLDevice.LocalMemType getLocalMemType()
public long getLocalMemSize()
public boolean hasErrorCorrectionSupport()
public long getPrintfBufferSize()
public boolean isPreferredInteropUserSync()
public boolean hasOutOfOrderQueueSupport()
public long getProfilingTimerResolution()
public boolean isEndianLittle()
public boolean isAvailable()
public boolean isCompilerAvailable()
public String getOpenCLCVersion()
@Deprecated public String getOpenCLVersion()
public String getDriverVersion()
public long getImageMaxArraySize()
public long getImageMaxBufferSize()
public EnumSet<CLDevice.FpConfig> getDoubleFpConfig()
public EnumSet<CLDevice.FpConfig> getHalfFpConfig()
public boolean isLinkerAvailable()
public long getNativeVectorWidthHalf()
public EnumSet<CLDevice.PartitionType> getPartitionProperties()
public long getPreferredVectorWidthHalf()
public long getReferenceCount()
public CLDevice.AffinityDomain getPartitionAffinityDomain()
createSubDevicesByAffinity(AffinityDomain), or null if the device is not a sub-device or wasn't split by affinity.
This returns part of CL_DEVICE_PARTITION_TYPE.public CLDevice getParent()
public String getProfile()
public boolean isHostUnifiedMemory()
public int getPreferredVectorWidthChar()
public int getPreferredVectorWidthShort()
public int getPreferredVectorWidthInt()
public int getPreferredVectorWidthLong()
public int getPreferredVectorWidthFloat()
public int getPreferredVectorWidthDouble()
public int getNativeVectorWidthChar()
public int getNativeVectorWidthShort()
public int getNativeVectorWidthInt()
public int getNativeVectorWidthLong()
public int getNativeVectorWidthFloat()
public int getNativeVectorWidthDouble()
public String getVersion()
OpenCL<space><major_version.min or_version><space><vendor-specific information>
The major_version.minor_version value returned will be 1.0.public String[] getExtensions()
public boolean hasExtension(String name)
public String[] getBuiltInKernels()
public boolean isDoubleSupported()
public boolean isDoubleSupportedKHR()
public boolean isDoubleSupportedAMD()
public String replaceDoubleExtensionByExtensionActuallyAvailable(String kernelSource)
#pragma OPENCL EXTENSION cl_khr_fp64 : enable by #pragma OPENCL EXTENSION cl_amd_fp64 : enable.public boolean isHalfSupported()
public boolean isByteAddressableStoreSupported()
public boolean isGLSharingSupported()
public boolean isGlobalInt32BaseAtomicsSupported()
public boolean isGlobalInt32ExtendedAtomicsSupported()
public boolean isLocalInt32BaseAtomicsSupported()
public boolean isLocalInt32ExtendedAtomicsSupported()
public EnumSet<CLDevice.QueueProperties> getQueueProperties()
public CLDevice[] createSubDevicesEqually(int computeUnitsForEverySubDevice)
computeUnitsForEverySubDevice - Count of compute units for every subdevice.public CLDevice[] createSubDevicesByCounts(long... computeUnitsForEachSubDevice)
computeUnitsForEachSubDevice - List of counts of compute units for each subdevice.public CLDevice[] createSubDevicesByAffinity(CLDevice.AffinityDomain affinityDomain)
affinityDomain - Affinity domain along which devices should be split.public void release()
public static <E extends TypedPointer,A extends com.nativelibs4java.opencl.CLAbstractEntity> Pointer<E> getEntities(A[] objects, Pointer<E> out)
public int hashCode()
Copyright © 2009-2015. All Rights Reserved.