Package com.jme3.opencl.lwjgl
Class LwjglDevice
java.lang.Object
com.jme3.opencl.lwjgl.LwjglDevice
- All Implemented Interfaces:
Device
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jme3.opencl.Device
Device.DeviceType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the default compute device address space size specified as an unsigned integer value in bits.intOpenCL C version string.intExtracts the major version from the compiler versionintExtracts the minor version from the compiler versionintReturns the number of parallel compute units on the OpenCL device.org.lwjgl.opencl.CLDeviceintExtracts the major version from the driver versionintExtracts the minor version from the driver versionCollection<? extends String>Lists all available extensionslonglonglongintlongReturns the maximal size of a constant buffer.long[]Queries the maximal size of a 2D imagelong[]Queries the maximal size of a 3D imageintintlongThe maximum dimension that specify the local and global work item ids.long[]Maximum number of work-items that can be specified in each dimension of the work-group toKernel.Run2(com.jme3.opencl.CommandQueue, com.jme3.opencl.Kernel.WorkSize, com.jme3.opencl.Kernel.WorkSize, java.lang.Object...).intlongMaximum number of work-items in a work-group executing a kernel on a single compute unit, using the data parallel execution model.getName()OpenCL profile string.intOpenCL version string.intExtracts the major version from the version stringintExtracts the minor version from the version stringbooleanbooleanbooleanbooleanhasExtension(String extension) Explicitly tests for the availability of the specified extensionbooleanbooleanbooleanbooleanbooleanbooleanchecks if this device is available at all, must always be testedbooleantoString()
-
Constructor Details
-
LwjglDevice
-
-
Method Details
-
getDevice
public org.lwjgl.opencl.CLDevice getDevice() -
getPlatform
- Specified by:
getPlatformin interfaceDevice- Returns:
- the platform associated with this device
-
getDeviceType
- Specified by:
getDeviceTypein interfaceDevice- Returns:
- queries the device type
-
getVendorId
public int getVendorId()- Specified by:
getVendorIdin interfaceDevice- Returns:
- the vendor id
-
isAvailable
public boolean isAvailable()Description copied from interface:Devicechecks if this device is available at all, must always be tested- Specified by:
isAvailablein interfaceDevice- Returns:
- checks if this device is available at all, must always be tested
-
hasCompiler
public boolean hasCompiler()- Specified by:
hasCompilerin interfaceDevice- Returns:
- if this device has a compiler for kernel code
-
hasDouble
public boolean hasDouble() -
hasHalfFloat
public boolean hasHalfFloat()- Specified by:
hasHalfFloatin interfaceDevice- Returns:
- supports half precision floats (16 bit)
-
hasErrorCorrectingMemory
public boolean hasErrorCorrectingMemory()- Specified by:
hasErrorCorrectingMemoryin interfaceDevice- Returns:
- supports error correction for every access to global or constant memory
-
hasUnifiedMemory
public boolean hasUnifiedMemory()- Specified by:
hasUnifiedMemoryin interfaceDevice- Returns:
- supports unified virtual memory (OpenCL 2.0)
-
hasImageSupport
public boolean hasImageSupport()- Specified by:
hasImageSupportin interfaceDevice- Returns:
- supports images
-
hasWritableImage3D
public boolean hasWritableImage3D()- Specified by:
hasWritableImage3Din interfaceDevice- Returns:
- supports writes to 3d images (this is an extension)
-
hasOpenGLInterop
public boolean hasOpenGLInterop()- Specified by:
hasOpenGLInteropin interfaceDevice- Returns:
- supports sharing with OpenGL
-
hasExtension
Description copied from interface:DeviceExplicitly tests for the availability of the specified extension- Specified by:
hasExtensionin interfaceDevice- Parameters:
extension- the name of the extension- Returns:
trueiff this extension is supported
-
getExtensions
Description copied from interface:DeviceLists all available extensions- Specified by:
getExtensionsin interfaceDevice- Returns:
- all available extensions
-
getComputeUnits
public int getComputeUnits()Description copied from interface:DeviceReturns the number of parallel compute units on the OpenCL device. A work-group executes on a single compute unit. The minimum value is 1.- Specified by:
getComputeUnitsin interfaceDevice- Returns:
- the number of parallel compute units
- See Also:
-
getClockFrequency
public int getClockFrequency()- Specified by:
getClockFrequencyin interfaceDevice- Returns:
- maximum clock frequency of the device in MHz
-
getAddressBits
public int getAddressBits()Description copied from interface:DeviceReturns the default compute device address space size specified as an unsigned integer value in bits. The values currently supported are 32 and 64.- Specified by:
getAddressBitsin interfaceDevice- Returns:
- the size of an address
-
isLittleEndian
public boolean isLittleEndian()- Specified by:
isLittleEndianin interfaceDevice- Returns:
trueif this device is little endian
-
getMaximumWorkItemDimensions
public long getMaximumWorkItemDimensions()Description copied from interface:DeviceThe maximum dimension that specify the local and global work item ids. You can always assume to be this at least 3. Therefore, the ids are always three integers x,y,z.- Specified by:
getMaximumWorkItemDimensionsin interfaceDevice- Returns:
- the maximum dimension of work item ids
-
getMaximumWorkItemSizes
public long[] getMaximumWorkItemSizes()Description copied from interface:DeviceMaximum number of work-items that can be specified in each dimension of the work-group toKernel.Run2(com.jme3.opencl.CommandQueue, com.jme3.opencl.Kernel.WorkSize, com.jme3.opencl.Kernel.WorkSize, java.lang.Object...). The array has a length of at least 3.- Specified by:
getMaximumWorkItemSizesin interfaceDevice- Returns:
- the maximum size of the work group in each dimension
-
getMaxiumWorkItemsPerGroup
public long getMaxiumWorkItemsPerGroup()Description copied from interface:DeviceMaximum number of work-items in a work-group executing a kernel on a single compute unit, using the data parallel execution model.- Specified by:
getMaxiumWorkItemsPerGroupin interfaceDevice- Returns:
- maximum number of work-items in a work-group
-
getMaximumSamplers
public int getMaximumSamplers()- Specified by:
getMaximumSamplersin interfaceDevice- Returns:
- the maximum number of samples that can be used in a kernel
-
getMaximumReadImages
public int getMaximumReadImages()- Specified by:
getMaximumReadImagesin interfaceDevice- Returns:
- the maximum number of images that can be used for reading in a kernel
-
getMaximumWriteImages
public int getMaximumWriteImages()- Specified by:
getMaximumWriteImagesin interfaceDevice- Returns:
- the maximum number of images that can be used for writing in a kernel
-
getMaximumImage2DSize
public long[] getMaximumImage2DSize()Description copied from interface:DeviceQueries the maximal size of a 2D image- Specified by:
getMaximumImage2DSizein interfaceDevice- Returns:
- an array of length 2 with the maximal size of a 2D image
-
getMaximumImage3DSize
public long[] getMaximumImage3DSize()Description copied from interface:DeviceQueries the maximal size of a 3D image- Specified by:
getMaximumImage3DSizein interfaceDevice- Returns:
- an array of length 3 with the maximal size of a 3D image
-
getMaximumAllocationSize
public long getMaximumAllocationSize()- Specified by:
getMaximumAllocationSizein interfaceDevice- Returns:
- the maximal size of a memory object (buffer and image) in bytes
-
getGlobalMemorySize
public long getGlobalMemorySize()- Specified by:
getGlobalMemorySizein interfaceDevice- Returns:
- the total available global memory in bytes
-
getLocalMemorySize
public long getLocalMemorySize()- Specified by:
getLocalMemorySizein interfaceDevice- Returns:
- the total available local memory in bytes
-
getMaximumConstantBufferSize
public long getMaximumConstantBufferSize()Description copied from interface:DeviceReturns the maximal size of a constant buffer.
Constant buffers are normal buffer objects, but passed to the kernel with the special declaration__constant BUFFER_TYPE* BUFFER_NAME. Because they have a special caching, their size is usually very limited.- Specified by:
getMaximumConstantBufferSizein interfaceDevice- Returns:
- the maximal size of a constant buffer
-
getMaximumConstantArguments
public int getMaximumConstantArguments()- Specified by:
getMaximumConstantArgumentsin interfaceDevice- Returns:
- the maximal number of constant buffer arguments in a kernel call
-
getProfile
Description copied from interface:DeviceOpenCL profile string. Returns the profile name supported by the device. The profile name returned can be one of the following strings:
FULL_PROFILE – if the device supports the OpenCL specification (functionality defined as part of the core specification and does not require any extensions to be supported).
EMBEDDED_PROFILE - if the device supports the OpenCL embedded profile.- Specified by:
getProfilein interfaceDevice- Returns:
- the profile string
-
getVersion
Description copied from interface:DeviceOpenCL version string. Returns the OpenCL version supported by the device. This version string has the following format: OpenCL space major_version.minor_version space vendor-specific information.
E.g. OpenCL 1.1, OpenCL 1.2, OpenCL 2.0- Specified by:
getVersionin interfaceDevice- Returns:
- the version string
-
getVersionMajor
public int getVersionMajor()Description copied from interface:DeviceExtracts the major version from the version string- Specified by:
getVersionMajorin interfaceDevice- Returns:
- the major version
- See Also:
-
getVersionMinor
public int getVersionMinor()Description copied from interface:DeviceExtracts the minor version from the version string- Specified by:
getVersionMinorin interfaceDevice- Returns:
- the minor version
- See Also:
-
getCompilerVersion
Description copied from interface:DeviceOpenCL C version string. Returns the highest OpenCL C version supported by the compiler for this device that is not of type CL_DEVICE_TYPE_CUSTOM. This version string has the following format: OpenCL space C space major_version.minor_version space vendor-specific information.
The major_version.minor_version value returned must be 1.2 if CL_DEVICE_VERSION is OpenCL 1.2. The major_version.minor_version value returned must be 1.1 if CL_DEVICE_VERSION is OpenCL 1.1. The major_version.minor_version value returned can be 1.0 or 1.1 if CL_DEVICE_VERSION is OpenCL 1.0.- Specified by:
getCompilerVersionin interfaceDevice- Returns:
- the compiler version
-
getCompilerVersionMajor
public int getCompilerVersionMajor()Description copied from interface:DeviceExtracts the major version from the compiler version- Specified by:
getCompilerVersionMajorin interfaceDevice- Returns:
- the major compiler version
- See Also:
-
getCompilerVersionMinor
public int getCompilerVersionMinor()Description copied from interface:DeviceExtracts the minor version from the compiler version- Specified by:
getCompilerVersionMinorin interfaceDevice- Returns:
- the minor compiler version
- See Also:
-
getDriverVersion
- Specified by:
getDriverVersionin interfaceDevice- Returns:
- the OpenCL software driver version string in the form major_number.minor_number
-
getDriverVersionMajor
public int getDriverVersionMajor()Description copied from interface:DeviceExtracts the major version from the driver version- Specified by:
getDriverVersionMajorin interfaceDevice- Returns:
- the major driver version
- See Also:
-
getDriverVersionMinor
public int getDriverVersionMinor()Description copied from interface:DeviceExtracts the minor version from the driver version- Specified by:
getDriverVersionMinorin interfaceDevice- Returns:
- the minor driver version
- See Also:
-
getName
-
getVendor
-
toString
-