| Modifier and Type | Class and Description |
|---|---|
static class |
JavaCL.OpenCLProbeLibrary |
| Constructor and Description |
|---|
JavaCL() |
| Modifier and Type | Method and Description |
|---|---|
static CLContext |
createBestContext()
Creates an OpenCL context with the "best" device (see
getBestDevice()) |
static CLContext |
createBestContext(CLPlatform.DeviceFeature... preferredFeatures)
Creates an OpenCL context with the "best" device based on the comparison of the provided
prioritized device feature (see
getBestDevice(CLPlatform.DeviceFeature...)) |
static CLContext |
createContext(Map<CLPlatform.ContextProperties,Object> contextProperties,
CLDevice... devices)
Creates an OpenCL context formed of the provided devices.
|
static CLContext |
createContextFromCurrentGL()
Creates an OpenCL context able to share entities with the current OpenGL context.
|
static CLDevice |
getBestDevice()
Returns the "best" OpenCL device (currently, the one that has the largest amount of compute units).
|
static CLDevice |
getBestDevice(CLPlatform.DeviceFeature... preferredFeatures)
Returns the "best" OpenCL device based on the comparison of the provided prioritized device feature.
|
static CLPlatform[] |
listGPUPoweredPlatforms()
List the OpenCL implementations that contain at least one GPU device.
|
static CLPlatform[] |
listPlatforms()
Lists all available OpenCL implementations.
|
static void |
unloadCompiler()
Allows the implementation to release the resources allocated by the OpenCL compiler.
|
public JavaCL()
public static CLPlatform[] listGPUPoweredPlatforms()
public static CLPlatform[] listPlatforms()
public static CLContext createContext(Map<CLPlatform.ContextProperties,Object> contextProperties, CLDevice... devices)
devices - devices that are to form the new contextpublic static void unloadCompiler()
public static CLDevice getBestDevice()
getBestDevice(CLPlatform.DeviceFeature[]) variant.getBestDevice(MaxComputeUnits)public static CLDevice getBestDevice(CLPlatform.DeviceFeature... preferredFeatures)
JavaCL.getBestDevice(CPU, MaxComputeUnits) will return the CPU device, but on another system with two GPUs and no CPU device it will return the GPU that has the most compute units.public static CLContext createBestContext()
getBestDevice())public static CLContext createBestContext(CLPlatform.DeviceFeature... preferredFeatures)
getBestDevice(CLPlatform.DeviceFeature...))public static CLContext createContextFromCurrentGL()
RuntimeException - if JavaCL is unable to create an OpenGL-shared OpenCL context.Copyright © 2009-2015. All Rights Reserved.