Top Description Inners Fields Constructors Methods
org.lwjgl.opencl

public final Class CLPlatform

extends CLObject
Class Inheritance
Imports
org.lwjgl.PointerBuffer, org.lwjgl.opencl.api.Filter, java.nio.ByteBuffer, .IntBuffer, java.util.List

This class is a wrapper around a cl_platform_id pointer.
Author
Spasi

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static interface
CLPlatform.CLPlatformUtil

CLPlatform utility methods interface.

Field Summary

Modifier and TypeField and Description
private Object
private final CLObjectRegistry<CLDevice>
private static final FastLongMap<CLPlatform>
private static final CLPlatform.CLPlatformUtil

Constructor Summary

AccessConstructor and Description
pack-priv
CLPlatform(final long pointer)

Method Summary

Modifier and TypeMethod and Description
pack-priv Object
public CLDevice

Returns:

the CLDevice object
getCLDevice
(final long
the device object id
id
)

Returns a CLDevice that is available on this platform.

pack-priv CLObjectRegistry<CLDevice>
public static CLPlatform

Returns:

the CLPlatform object
getCLPlatform
(final long
the platform object id
id
)

Returns a CLPlatform with the specified id.

public List<CLDevice>

Returns:

the available devices
getDevices
(final int
the device type
device_type
)

Returns a list of the available devices on this platform that match the specified type.

public List<CLDevice>

Returns:

the available devices
getDevices
(final int
the device type
device_type
,
final Filter<CLDevice>
the device filter
filter
)

Returns a list of the available devices on this platform that match the specified type, filtered by the specified filter.

public String

Returns:

the parameter value
getInfoString
(int
the parameter
param_name
)

Returns the String value of the specified parameter.

pack-priv static <T extends CLObject> InfoUtil<T>
getInfoUtilInstance(final Class<T> clazz, final String fieldName)

public static List<CLPlatform>

Returns:

the available platforms
getPlatforms
()

Returns a list of all the available platforms.

public static List<CLPlatform>

Returns:

the available platforms
getPlatforms
(final Filter<CLPlatform>
the platform filter
filter
)

Returns a list of the available platforms, filtered by the specified filter.

pack-priv void
registerCLDevices(final PointerBuffer
a buffer containing CLDevice pointers.
devices
,
final IntBuffer num_devices)

Called from clGetDeviceIDs to register new devices.

pack-priv void
registerCLDevices(final ByteBuffer
a buffer containing CLDevice pointers.
devices
,
final PointerBuffer num_devices)

Called from clGetContextInfo to register new devices.

pack-priv static void
registerCLPlatforms(final PointerBuffer
a buffer containing CLPlatform pointers.
platforms
,
final IntBuffer num_platforms)

Called from clGetPlatformIDs to register new platforms.

pack-priv void
setCapabilities(final Object caps)

Inherited from org.lwjgl.opencl.CLObject:
getPointerUnsafe

Field Detail

capsback to summary
private Object caps
clDevicesback to summary
private final CLObjectRegistry<CLDevice> clDevices
clPlatformsback to summary
private static final FastLongMap<CLPlatform> clPlatforms
utilback to summary
private static final CLPlatform.CLPlatformUtil util

Constructor Detail

CLPlatformback to summary
pack-priv CLPlatform(final long pointer)

Method Detail

getCapabilitiesback to summary
pack-priv Object getCapabilities()
getCLDeviceback to summary
public CLDevice getCLDevice(final long id)

Returns a CLDevice that is available on this platform.

Parameters
id:long

the device object id

Returns:CLDevice

the CLDevice object

getCLDeviceRegistryback to summary
pack-priv CLObjectRegistry<CLDevice> getCLDeviceRegistry()
getCLPlatformback to summary
public static CLPlatform getCLPlatform(final long id)

Returns a CLPlatform with the specified id.

Parameters
id:long

the platform object id

Returns:CLPlatform

the CLPlatform object

getDevicesback to summary
public List<CLDevice> getDevices(final int device_type)

Returns a list of the available devices on this platform that match the specified type.

Parameters
device_type:int

the device type

Returns:List<CLDevice>

the available devices

getDevicesback to summary
public List<CLDevice> getDevices(final int device_type, final Filter<CLDevice> filter)

Returns a list of the available devices on this platform that match the specified type, filtered by the specified filter.

Parameters
device_type:int

the device type

filter:Filter<CLDevice>

the device filter

Returns:List<CLDevice>

the available devices

getInfoStringback to summary
public String getInfoString(int param_name)

Returns the String value of the specified parameter.

Parameters
param_name:int

the parameter

Returns:String

the parameter value

getInfoUtilInstanceback to summary
pack-priv static <T extends CLObject> InfoUtil<T> getInfoUtilInstance(final Class<T> clazz, final String fieldName)
Annotations
@SuppressWarnings:unchecked
getPlatformsback to summary
public static List<CLPlatform> getPlatforms()

Returns a list of all the available platforms.

Returns:List<CLPlatform>

the available platforms

getPlatformsback to summary
public static List<CLPlatform> getPlatforms(final Filter<CLPlatform> filter)

Returns a list of the available platforms, filtered by the specified filter.

Parameters
filter:Filter<CLPlatform>

the platform filter

Returns:List<CLPlatform>

the available platforms

registerCLDevicesback to summary
pack-priv void registerCLDevices(final PointerBuffer devices, final IntBuffer num_devices)

Called from clGetDeviceIDs to register new devices.

Parameters
devices:PointerBuffer

a buffer containing CLDevice pointers.

registerCLDevicesback to summary
pack-priv void registerCLDevices(final ByteBuffer devices, final PointerBuffer num_devices)

Called from clGetContextInfo to register new devices.

Parameters
devices:ByteBuffer

a buffer containing CLDevice pointers.

registerCLPlatformsback to summary
pack-priv static void registerCLPlatforms(final PointerBuffer platforms, final IntBuffer num_platforms)

Called from clGetPlatformIDs to register new platforms.

Parameters
platforms:PointerBuffer

a buffer containing CLPlatform pointers.

setCapabilitiesback to summary
pack-priv void setCapabilities(final Object caps)
org.lwjgl.opencl back to summary

pack-priv Interface CLPlatform.CLPlatformUtil

extends InfoUtil<CLPlatform>
Known Direct Implementers
org.lwjgl.opencl.InfoUtilFactory.CLPlatformUtil

CLPlatform utility methods interface.

Method Summary

Modifier and TypeMethod and Description
public List<CLDevice>
getDevices(CLPlatform platform, int device_type, final Filter<CLDevice> filter)

public List<CLPlatform>
Inherited from org.lwjgl.opencl.InfoUtil:
getInfoIntgetInfoLonggetInfoSizegetInfoSizeArraygetInfoString

Method Detail

getDevicesback to summary
public List<CLDevice> getDevices(CLPlatform platform, int device_type, final Filter<CLDevice> filter)
getPlatformsback to summary
public List<CLPlatform> getPlatforms(Filter<CLPlatform> filter)