public class CLDevice extends CLObject
Modifier and Type | Class and Description |
---|---|
static class |
CLDevice.Capabilities
Enumeration for the execution capabilities of the device.
|
static class |
CLDevice.FPConfig
Describes floating-point capability of the device.
|
static class |
CLDevice.GlobalMemCacheType
Type of global memory cache supported.
|
static class |
CLDevice.LocalMemType
Type of local memory cache supported.
|
static class |
CLDevice.Type
Enumeration for the type of a device.
|
Modifier | Constructor and Description |
---|---|
protected |
CLDevice(CLContext context,
long id) |
protected |
CLDevice(CLPlatform platform,
long id) |
Modifier and Type | Method and Description |
---|---|
CLCommandQueue |
createCommandQueue() |
CLCommandQueue |
createCommandQueue(CLCommandQueue.Mode... properties) |
CLCommandQueue |
createCommandQueue(CLCommandQueue.Mode property) |
CLCommandQueue |
createCommandQueue(long properties) |
boolean |
equals(Object obj) |
int |
getAddressBits()
The default compute device address space size specified in bits.
|
ByteOrder |
getByteOrder()
Returns
ByteOrder.LITTLE_ENDIAN or ByteOrder.BIG_ENDIAN . |
CLInfoAccessor |
getCLAccessor() |
CLVersion |
getCVersion()
Returns the OpenCL-C version supported by the device.
|
EnumSet<CLDevice.FPConfig> |
getDoubleFPConfig()
Returns the optional double precision floating-point capability of the device.
|
String |
getDriverVersion()
Returns OpenCL software driver version string in the form major_number.minor_number.
|
EnumSet<CLDevice.Capabilities> |
getExecutionCapabilities()
Returns the execution capabilities as EnumSet.
|
Set<String> |
getExtensions()
Returns all device extension names as unmodifiable Set.
|
long |
getGlobalMemCachelineSize()
Returns the size of global memory cache line in bytes.
|
long |
getGlobalMemCacheSize()
Returns the size of global memory cache in bytes.
|
CLDevice.GlobalMemCacheType |
getGlobalMemCacheType()
Returns the type of global memory cache supported.
|
long |
getGlobalMemSize()
Returns the global memory size in bytes.
|
EnumSet<CLDevice.FPConfig> |
getHalfFPConfig()
Returns the optional half precision floating-point capability of the device.
|
long |
getLocalMemSize()
Returns the local memory size in bytes.
The minimum OpenCL 1.0 value is 16 KB. The minimum OpenCL 1.1 value is 32 KB. |
CLDevice.LocalMemType |
getLocalMemType()
Returns the local memory type.
|
int |
getMaxClockFrequency()
Returns the maximum configured clock frequency of the device in MHz.
|
int |
getMaxComputeUnits()
Returns the number of parallel compute cores on the OpenCL device.
|
long |
getMaxConstantArgs()
Returns the max number of arguments declared with the
constant
qualifier in a kernel. |
long |
getMaxConstantBufferSize()
Returns the max size in bytes of a constant buffer allocation.
|
int |
getMaxImage2dHeight()
Returns the max height of 2D image in pixels.
|
int |
getMaxImage2dWidth()
Returns the max width of 2D image in pixels.
|
int |
getMaxImage3dDepth()
Returns the max depth of 3D image in pixels.
|
int |
getMaxImage3dHeight()
Returns the max height of 3D image in pixels.
|
int |
getMaxImage3dWidth()
Returns the max width of 3D image in pixels.
|
long |
getMaxMemAllocSize()
Returns the largest allocatable size of a
CLBuffer on this device. |
long |
getMaxParameterSize()
Returns the max size in bytes of the arguments that can be passed to a kernel.
The minimum OpenCL 1.0 value is 256. The minimum OpenCL 1.1 value is 1024. |
int |
getMaxReadImageArgs()
Returns the max number of simultaneous image objects that can be read by a kernel.
|
int |
getMaxSamplers()
Returns the maximum number of samplers that can be used in a kernel.
|
int |
getMaxWorkGroupSize()
Returns the maximum number of work-items in a work-group executing
a kernel using the data parallel execution model.
|
int |
getMaxWorkItemDimensions()
Returns the maximum dimensions that specify the global and local work-item
IDs used by the data parallel execution model.
|
int[] |
getMaxWorkItemSizes()
Returns the maximum number of work-items that can be specified in each
dimension of the work-group.
|
int |
getMaxWriteImageArgs()
Returns the max number of simultaneous image objects that can be written by a kernel.
|
String |
getName()
Returns the name of this device.
|
int |
getNativeCharVectorWidth()
Native vector width size for built-in char vectors.
|
int |
getNativeDoubleVectorWidth()
Native vector width size for built-in double vectors.
|
int |
getNativeFloatVectorWidth()
Native vector width size for built-in float vectors.
|
int |
getNativeHalfVectorWidth()
Native vector width size for built-in half vectors.
|
int |
getNativeIntVectorWidth()
Native vector width size for built-in int vectors.
|
int |
getNativeLongVectorWidth()
Native vector width size for built-in long vectors.
|
int |
getNativeShortVectorWidth()
Native vector width size for built-in short vectors.
|
CLPlatform |
getPlatform()
Returns the platform for this OpenCL object.
|
int |
getPreferredCharVectorWidth()
Preferred native vector width size for built-in char vectors.
|
int |
getPreferredDoubleVectorWidth()
Preferred native vector width size for built-in double vectors.
|
int |
getPreferredFloatVectorWidth()
Preferred native vector width size for built-in float vectors.
|
int |
getPreferredIntVectorWidth()
Preferred native vector width size for built-in int vectors.
|
int |
getPreferredLongVectorWidth()
Preferred native vector width size for built-in long vectors.
|
int |
getPreferredShortVectorWidth()
Preferred native vector width size for built-in short vectors.
|
String |
getProfile()
Returns the OpenCL profile of this device.
|
long |
getProfilingTimerResolution()
Returns the resolution of device timer.
|
Map<String,String> |
getProperties()
Returns a Map of device properties with the enum names as keys.
|
EnumSet<CLCommandQueue.Mode> |
getQueueProperties()
Returns the command-queue properties supported by the device.
|
EnumSet<CLDevice.FPConfig> |
getSingleFPConfig()
Returns the single precision floating-point capability of the device.
|
CLDevice.Type |
getType()
Returns the type of this device.
|
String |
getVendor()
Returns the vendor of this device.
|
long |
getVendorID()
Returns the vendor id of this device.
|
CLVersion |
getVersion()
Returns the OpenCL version supported by the device.
|
int |
hashCode() |
boolean |
isAvailable()
Returns true if this device is available.
|
boolean |
isCompilerAvailable()
Returns false if the implementation does not have a compiler available to
compile the program source.
|
boolean |
isDoubleFPAvailable()
Returns
isExtensionAvailable(java.lang.String) ("cl_khr_fp64"). |
boolean |
isErrorCorrectionSupported()
Returns true if the device implements error correction for the memories,
caches, registers etc.
|
boolean |
isExtensionAvailable(String extension)
Returns true if the extension is supported on this device.
|
boolean |
isGLMemorySharingSupported()
Returns
isExtensionAvailable(java.lang.String) ("cl_khr_gl_sharing") || isExtensionAvailable(java.lang.String) ("cl_APPLE_gl_sharing"). |
boolean |
isHalfFPAvailable()
Returns
isExtensionAvailable(java.lang.String) ("cl_khr_fp16"). |
boolean |
isImageSupportAvailable()
Returns true if images are supported by the OpenCL device and false otherwise.
|
boolean |
isLittleEndian()
Returns true if the OpenCL device is a little endian device and false otherwise.
|
boolean |
isMemoryUnified()
Returns true if the device and the host have a unified memory subsystem.
|
String |
toString() |
getContext, getID
protected CLDevice(CLPlatform platform, long id)
protected CLDevice(CLContext context, long id)
public CLCommandQueue createCommandQueue()
public CLCommandQueue createCommandQueue(CLCommandQueue.Mode property)
public CLCommandQueue createCommandQueue(CLCommandQueue.Mode... properties)
public CLCommandQueue createCommandQueue(long properties)
public CLPlatform getPlatform()
CLObject
getPlatform
in class CLObject
public String getName()
public String getProfile()
public String getVendor()
public long getVendorID()
public CLVersion getVersion()
public CLVersion getCVersion()
public String getDriverVersion()
public CLDevice.Type getType()
public int getAddressBits()
public int getPreferredShortVectorWidth()
public int getPreferredCharVectorWidth()
public int getPreferredIntVectorWidth()
public int getPreferredLongVectorWidth()
public int getPreferredFloatVectorWidth()
public int getPreferredDoubleVectorWidth()
public int getNativeCharVectorWidth()
public int getNativeShortVectorWidth()
public int getNativeIntVectorWidth()
public int getNativeLongVectorWidth()
public int getNativeHalfVectorWidth()
public int getNativeFloatVectorWidth()
public int getNativeDoubleVectorWidth()
public int getMaxComputeUnits()
public int getMaxWorkGroupSize()
public int getMaxClockFrequency()
public int getMaxWorkItemDimensions()
public int[] getMaxWorkItemSizes()
public long getMaxParameterSize()
public long getMaxMemAllocSize()
CLBuffer
on this device.public long getGlobalMemSize()
public long getLocalMemSize()
public boolean isMemoryUnified()
public long getMaxConstantBufferSize()
public long getGlobalMemCachelineSize()
public long getGlobalMemCacheSize()
public long getMaxConstantArgs()
constant
qualifier in a kernel. The minimum value is 8.public boolean isImageSupportAvailable()
public int getMaxReadImageArgs()
public int getMaxWriteImageArgs()
public int getMaxImage2dWidth()
public int getMaxImage2dHeight()
public int getMaxImage3dWidth()
public int getMaxImage3dHeight()
public int getMaxImage3dDepth()
public int getMaxSamplers()
public long getProfilingTimerResolution()
public EnumSet<CLDevice.Capabilities> getExecutionCapabilities()
public EnumSet<CLDevice.FPConfig> getHalfFPConfig()
CLDevice.FPConfig.ROUND_TO_ZERO
, CLDevice.FPConfig.ROUND_TO_INF
and CLDevice.FPConfig.INF_NAN
.public EnumSet<CLDevice.FPConfig> getSingleFPConfig()
CLDevice.FPConfig.ROUND_TO_NEAREST
and
CLDevice.FPConfig.INF_NAN
.public EnumSet<CLDevice.FPConfig> getDoubleFPConfig()
CLDevice.FPConfig.FMA
,
CLDevice.FPConfig.ROUND_TO_NEAREST
, CLDevice.FPConfig.ROUND_TO_ZERO
,
CLDevice.FPConfig.ROUND_TO_INF
, CLDevice.FPConfig.INF_NAN
, and CLDevice.FPConfig.DENORM
.public CLDevice.LocalMemType getLocalMemType()
public CLDevice.GlobalMemCacheType getGlobalMemCacheType()
public EnumSet<CLCommandQueue.Mode> getQueueProperties()
public boolean isAvailable()
public boolean isCompilerAvailable()
public boolean isLittleEndian()
public boolean isErrorCorrectionSupported()
public boolean isHalfFPAvailable()
isExtensionAvailable(java.lang.String)
("cl_khr_fp16").getExtensions()
public boolean isDoubleFPAvailable()
isExtensionAvailable(java.lang.String)
("cl_khr_fp64").getExtensions()
public boolean isGLMemorySharingSupported()
isExtensionAvailable(java.lang.String)
("cl_khr_gl_sharing") || isExtensionAvailable(java.lang.String)
("cl_APPLE_gl_sharing").getExtensions()
public boolean isExtensionAvailable(String extension)
getExtensions()
public ByteOrder getByteOrder()
ByteOrder.LITTLE_ENDIAN
or ByteOrder.BIG_ENDIAN
.public Set<String> getExtensions()
public Map<String,String> getProperties()
public final CLInfoAccessor getCLAccessor()