Top Description Inners Fields Constructors Methods
com.jogamp.opencl

public Class CLDevice

extends CLObject
Class Inheritance
Imports
java.nio.ByteOrder, java.util.ArrayList, .Collections, .EnumSet, .HashSet, .List, .Map, .Scanner, .Set, com.jogamp.opencl.llb.CL, .CLDeviceBinding, com.jogamp.opencl.spi.CLInfoAccessor, com.jogamp.opencl.util.CLUtil

This object represents an OpenCL device.
Author
Michael Bien, et al.
See Also
CLPlatform#listCLDevices(com.jogamp.opencl.CLDevice.Type...), CLPlatform#getMaxFlopsDevice(com.jogamp.opencl.CLDevice.Type...), CLContext#getDevices(), CLContext#getMaxFlopsDevice(com.jogamp.opencl.CLDevice.Type)

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
CLDevice.Capabilities

Enumeration for the execution capabilities of the device.

public static enum
CLDevice.FPConfig

Describes floating-point capability of the device.

public static enum
CLDevice.GlobalMemCacheType

Type of global memory cache supported.

public static enum
CLDevice.LocalMemType

Type of local memory cache supported.

public static enum
CLDevice.Type

Enumeration for the type of a device.

Field Summary

Modifier and TypeField and Description
private final CLInfoAccessor
private Set<String>
private final CLPlatform
Inherited from com.jogamp.opencl.CLObject:
contextID

Constructor Summary

AccessConstructor and Description
protected
CLDevice(final CLPlatform platform, final long id)

protected
CLDevice(final CLContext context, final long id)

Method Summary

Modifier and TypeMethod and Description
public CLCommandQueue
public CLCommandQueue
public CLCommandQueue
createCommandQueue(final CLCommandQueue.Mode... properties)

public CLCommandQueue
createCommandQueue(final long properties)

public boolean
equals(final Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public int
getAddressBits()

The default compute device address space size specified in bits.

public ByteOrder
public final CLInfoAccessor
public CLVersion
getCVersion()

Returns the OpenCL-C version supported by the device.

public EnumSet<CLDevice.FPConfig>

Returns:

An EnumSet containing the extensions, never null.
getDoubleFPConfig
()

Returns the optional double precision floating-point capability of the device.

public String
getDriverVersion()

Returns OpenCL software driver version string in the form major_number.minor_number.

public EnumSet<CLDevice.Capabilities>
getExecutionCapabilities()

Returns the execution capabilities as EnumSet.

public Set<String>
getExtensions()

Returns all device extension names as unmodifiable Set.

public long
getGlobalMemCachelineSize()

Returns the size of global memory cache line in bytes.

public long
getGlobalMemCacheSize()

Returns the size of global memory cache in bytes.

public CLDevice.GlobalMemCacheType
getGlobalMemCacheType()

Returns the type of global memory cache supported.

public long
getGlobalMemSize()

Returns the global memory size in bytes.

public EnumSet<CLDevice.FPConfig>

Returns:

An EnumSet containing the extensions, never null.
getHalfFPConfig
()

Returns the optional half precision floating-point capability of the device.

public long
getLocalMemSize()

Returns the local memory size in bytes.

public CLDevice.LocalMemType
getLocalMemType()

Returns the local memory type.

public int
getMaxClockFrequency()

Returns the maximum configured clock frequency of the device in MHz.

public int
getMaxComputeUnits()

Returns the number of parallel compute cores on the OpenCL device.

public long
getMaxConstantArgs()

Returns the max number of arguments declared with the constant qualifier in a kernel.

public long
getMaxConstantBufferSize()

Returns the max size in bytes of a constant buffer allocation.

public int
getMaxImage2dHeight()

Returns the max height of 2D image in pixels.

public int
getMaxImage2dWidth()

Returns the max width of 2D image in pixels.

public int
getMaxImage3dDepth()

Returns the max depth of 3D image in pixels.

public int
getMaxImage3dHeight()

Returns the max height of 3D image in pixels.

public int
getMaxImage3dWidth()

Returns the max width of 3D image in pixels.

public long
getMaxMemAllocSize()

Returns the largest allocatable size of a CLBuffer on this device.

public long
getMaxParameterSize()

Returns the max size in bytes of the arguments that can be passed to a kernel.

public int
getMaxReadImageArgs()

Returns the max number of simultaneous image objects that can be read by a kernel.

public int
getMaxSamplers()

Returns the maximum number of samplers that can be used in a kernel.

public int
getMaxWorkGroupSize()

Returns the maximum number of work-items in a work-group executing a kernel using the data parallel execution model.

public int
getMaxWorkItemDimensions()

Returns the maximum dimensions that specify the global and local work-item IDs used by the data parallel execution model.

public int[]
getMaxWorkItemSizes()

Returns the maximum number of work-items that can be specified in each dimension of the work-group.

public int
getMaxWriteImageArgs()

Returns the max number of simultaneous image objects that can be written by a kernel.

public long
getMemBaseAddrAlign()

Returns the uint32_t memory base address alignment value reinterpreted as a long value.

public String
getName()

Returns the name of this device.

public int
getNativeCharVectorWidth()

Native vector width size for built-in char vectors.

public int
getNativeDoubleVectorWidth()

Native vector width size for built-in double vectors.

public int
getNativeFloatVectorWidth()

Native vector width size for built-in float vectors.

public int
getNativeHalfVectorWidth()

Native vector width size for built-in half vectors.

public int
getNativeIntVectorWidth()

Native vector width size for built-in int vectors.

public int
getNativeLongVectorWidth()

Native vector width size for built-in long vectors.

public int
getNativeShortVectorWidth()

Native vector width size for built-in short vectors.

public CLPlatform
getPlatform()

Overrides com.jogamp.opencl.CLObject.getPlatform.

Returns the platform for this OpenCL object.
public int
getPreferredCharVectorWidth()

Preferred native vector width size for built-in char vectors.

public int
getPreferredDoubleVectorWidth()

Preferred native vector width size for built-in double vectors.

public int
getPreferredFloatVectorWidth()

Preferred native vector width size for built-in float vectors.

public int
getPreferredIntVectorWidth()

Preferred native vector width size for built-in int vectors.

public int
getPreferredLongVectorWidth()

Preferred native vector width size for built-in long vectors.

public int
getPreferredShortVectorWidth()

Preferred native vector width size for built-in short vectors.

public String
getProfile()

Returns the OpenCL profile of this device.

public long
getProfilingTimerResolution()

Returns the resolution of device timer.

public Map<String, String>
getProperties()

Returns a Map of device properties with the enum names as keys.

public EnumSet<CLCommandQueue.Mode>
getQueueProperties()

Returns the command-queue properties supported by the device.

public EnumSet<CLDevice.FPConfig>

Returns:

An EnumSet containing the extensions, never null.
getSingleFPConfig
()

Returns the single precision floating-point capability of the device.

public CLDevice.Type
getType()

Returns the type of this device.

public String
getVendor()

Returns the vendor of this device.

public long
getVendorID()

Returns the vendor id of this device.

public CLVersion
getVersion()

Returns the OpenCL version supported by the device.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.
public boolean
isAvailable()

Returns true if this device is available.

public boolean
isCompilerAvailable()

Returns false if the implementation does not have a compiler available to compile the program source.

public boolean
isDoubleFPAvailable()

Returns isExtensionAvailable("cl_khr_fp64").

public boolean
isErrorCorrectionSupported()

Returns true if the device implements error correction for the memories, caches, registers etc. in the device.

public boolean
isExtensionAvailable(final String extension)

Returns true if the extension is supported on this device.

public boolean
isGLMemorySharingSupported()

Returns isExtensionAvailable("cl_khr_gl_sharing") || isExtensionAvailable("cl_APPLE_gl_sharing").

public boolean
isHalfFPAvailable()

Returns isExtensionAvailable("cl_khr_fp16").

public boolean
isICDAvailable()

Returns isExtensionAvailable("cl_khr_icd").

public boolean
isImageSupportAvailable()

Returns true if images are supported by the OpenCL device and false otherwise.

public boolean
isLittleEndian()

Returns true if the OpenCL device is a little endian device and false otherwise.

public boolean
isMemoryUnified()

Returns true if the device and the host have a unified memory subsystem.

pack-priv void
setContext(final CLContext context)

public String
toString()

Overrides com.jogamp.opencl.CLObject.toString.

Returns a string representation of the object.
Inherited from com.jogamp.opencl.CLObject:
getContextgetID