Top Description Fields Constructors Methods
org.lwjgl.opencl

public Class INTELAccelerator

extends Object
Class Inheritance
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Native bindings to the intel_accelerator extension.

The accelerator extension consists of a unified set of OpenCL runtime APIs to create, query, and manage the lifetime of objects which represent acceleration processors, engines, or algorithms. Accelerator object instances are referenced with the generic cl_accelerator_intel type by the runtime API, but they are always associated with a specific acceleration engine type, which is assigned by the application at accelerator object creation time. Descriptors are used to assign acceleration engine-specific properties to the accelerator objects. This mechanism of specialized creation with generic referencing is analogous to the way image objects are managed in the OpenCL 1.2 runtime API via generic cl_mem referencing but specialized descriptor-based creation with CreateImage.

Each accelerator object is assigned a unique type id. Vendors are freely encouraged to define new accelerator types and ids. This base extension provides unified mechanism for the creation and lifetime management of new accelerator types, but the semantics and creation descriptors of these types are to be defined in acceleration engine-specific extensions.

Accelerator objects can be supplied to kernels as arguments. Unless an extension defines a new OpenCL C language type for the engine-specific accelerator (e.g. sampler_t), accelerator objects can only be used in conjunction with built-in kernels. If an extension does define such a new type, or if it provides a mechanism to access accelerator data within kernels, then accelerator objects can act as regular kernel arguments as well.

Requires CL12.

Field Summary

Modifier and TypeField and Description
public static final int
CL_ACCELERATOR_CONTEXT_INTEL

Possible values for cl_accelerator_info_intel.

public static final int
CL_ACCELERATOR_DESCRIPTOR_INTEL

Possible values for cl_accelerator_info_intel.

public static final int
CL_ACCELERATOR_REFERENCE_COUNT_INTEL

Possible values for cl_accelerator_info_intel.

public static final int
CL_ACCELERATOR_TYPE_INTEL

Possible values for cl_accelerator_info_intel.

public static final int
CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL

Error codes used by functions in this extension.

public static final int
CL_INVALID_ACCELERATOR_DESCRIPTOR_INTEL

Error codes used by functions in this extension.

public static final int
CL_INVALID_ACCELERATOR_INTEL

Error codes used by functions in this extension.

public static final int
CL_INVALID_ACCELERATOR_TYPE_INTEL

Error codes used by functions in this extension.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static long

Returns:

a valid non-zero accelerator object, and errcode_ret is set to SUCCESS if the accelerator object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret:
clCreateAcceleratorINTEL
(long
a valid OpenCL context
context
,
int
specifies the type of accelerator object created. The type constants are defined by acceleration engine-specific extensions. It is encouraged that extensions follow the naming scheme of CL_ACCELERATOR_TYPE_{name}_INTEL where {name} is a descriptive acceleration engine string.
accelerator_type
,
ByteBuffer
a pointer to a structure that defines the parameter set of the accelerator object. This parameter set describes the configurable state of the underlying object. The actual structure supplied must be consistent with accelerator_type. The descriptor structures are defined by acceleration engine-specific extensions. It is encouraged that extensions follow the naming scheme of cl_{name}_desc_INTEL where {name} is a descriptive acceleration engine string.
descriptor
,
IntBuffer
will return an appropriate error code. If errcode_ret is NULL, no error code is returned.
errcode_ret
)

Accelerator objects represent the programmable state of an acceleration processor, engine, or algorithm.

public static long
clCreateAcceleratorINTEL(long context, int accelerator_type, ByteBuffer descriptor, int[] errcode_ret)

Array version of: CreateAcceleratorINTEL

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
  • INVALID_VALUE if param_name is not valid or if size in bytes specified by param_value_size is < size of return type and param_value is not NULL.
  • INVALID_ACCELERATOR_INTEL if accelerator is a not a valid accelerator object.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clGetAcceleratorInfoINTEL
(long
the accelerator object being queried
accelerator
,
int param_name, ByteBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about the accelerator object.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
  • INVALID_VALUE if param_name is not valid or if size in bytes specified by param_value_size is < size of return type and param_value is not NULL.
  • INVALID_ACCELERATOR_INTEL if accelerator is a not a valid accelerator object.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clGetAcceleratorInfoINTEL
(long
the accelerator object being queried
accelerator
,
int param_name, IntBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about the accelerator object.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
  • INVALID_VALUE if param_name is not valid or if size in bytes specified by param_value_size is < size of return type and param_value is not NULL.
  • INVALID_ACCELERATOR_INTEL if accelerator is a not a valid accelerator object.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clGetAcceleratorInfoINTEL
(long
the accelerator object being queried
accelerator
,
int param_name, PointerBuffer
a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.
param_value
,
PointerBuffer
the actual size in bytes of data being queried by param_value. If NULL, it is ignored.
param_value_size_ret
)

Returns information about the accelerator object.

public static int
clGetAcceleratorInfoINTEL(long accelerator, int param_name, int[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetAcceleratorInfoINTEL

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
  • INVALID_ACCELERATOR_INTEL if accelerator is a not a valid accelerator object.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clReleaseAcceleratorINTEL
(long
a valid accelerator object
accelerator
)

Decrements the accelerator reference count.

public static int

Returns:

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
  • INVALID_ACCELERATOR_INTEL if accelerator is a not a valid accelerator object.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
clRetainAcceleratorINTEL
(long
a valid accelerator object
accelerator
)

Increments the accelerator reference count.

public static long
nclCreateAcceleratorINTEL(long context, int accelerator_type, long
a value which specifies of the size, in bytes, of the immediately following descriptor structure
descriptor_size
,
long descriptor, long errcode_ret)

Unsafe version of: CreateAcceleratorINTEL

public static int
nclGetAcceleratorInfoINTEL(long accelerator, int param_name, long
the size in bytes of memory pointed to by param_value. This size must be ≥ size of return type. If param_value is NULL, it is ignored.
param_value_size
,
long param_value, long param_value_size_ret)

Unsafe version of: GetAcceleratorInfoINTEL

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CL_ACCELERATOR_CONTEXT_INTELback to summary
public static final int CL_ACCELERATOR_CONTEXT_INTEL

Possible values for cl_accelerator_info_intel.

CL_ACCELERATOR_DESCRIPTOR_INTELback to summary
public static final int CL_ACCELERATOR_DESCRIPTOR_INTEL

Possible values for cl_accelerator_info_intel.

CL_ACCELERATOR_REFERENCE_COUNT_INTELback to summary
public static final int CL_ACCELERATOR_REFERENCE_COUNT_INTEL

Possible values for cl_accelerator_info_intel.

CL_ACCELERATOR_TYPE_INTELback to summary
public static final int CL_ACCELERATOR_TYPE_INTEL

Possible values for cl_accelerator_info_intel.

CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTELback to summary
public static final int CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL

Error codes used by functions in this extension.

CL_INVALID_ACCELERATOR_DESCRIPTOR_INTELback to summary
public static final int CL_INVALID_ACCELERATOR_DESCRIPTOR_INTEL

Error codes used by functions in this extension.

CL_INVALID_ACCELERATOR_INTELback to summary
public static final int CL_INVALID_ACCELERATOR_INTEL

Error codes used by functions in this extension.

CL_INVALID_ACCELERATOR_TYPE_INTELback to summary
public static final int CL_INVALID_ACCELERATOR_TYPE_INTEL

Error codes used by functions in this extension.

Constructor Detail

INTELAcceleratorback to summary
protected INTELAccelerator()

Method Detail

clCreateAcceleratorINTELback to summary
public static long clCreateAcceleratorINTEL(long context, int accelerator_type, ByteBuffer descriptor, IntBuffer errcode_ret)

Accelerator objects represent the programmable state of an acceleration processor, engine, or algorithm. Accelerator objects can be supplied to kernels as arguments. Unless an extension defines a new OpenCL C language type for the engine-specific accelerator (e.g. sampler_t), accelerator objects can only be used in conjunction with built-in kernels.

This function creates an accelerator object. The accelerator object will be created with a reference count of one. Accelerator objects created with this function have semantics defined by the parameter accelerator_type, which are defined and described by extensions external to this document.

Parameters
context:long

a valid OpenCL context

accelerator_type:int

specifies the type of accelerator object created. The type constants are defined by acceleration engine-specific extensions. It is encouraged that extensions follow the naming scheme of CL_ACCELERATOR_TYPE_{name}_INTEL where {name} is a descriptive acceleration engine string.

descriptor:ByteBuffer

a pointer to a structure that defines the parameter set of the accelerator object. This parameter set describes the configurable state of the underlying object. The actual structure supplied must be consistent with accelerator_type. The descriptor structures are defined by acceleration engine-specific extensions. It is encouraged that extensions follow the naming scheme of cl_{name}_desc_INTEL where {name} is a descriptive acceleration engine string.

errcode_ret:IntBuffer

will return an appropriate error code. If errcode_ret is NULL, no error code is returned.

Returns:long

a valid non-zero accelerator object, and errcode_ret is set to SUCCESS if the accelerator object is created successfully. Otherwise, it returns a NULL value with one of the following error values returned in errcode_ret:

Annotations
@NativeType:cl_accelerator_intel
clCreateAcceleratorINTELback to summary
public static long clCreateAcceleratorINTEL(long context, int accelerator_type, ByteBuffer descriptor, int[] errcode_ret)

Array version of: CreateAcceleratorINTEL

Annotations
@NativeType:cl_accelerator_intel
clGetAcceleratorInfoINTELback to summary
public static int clGetAcceleratorInfoINTEL(long accelerator, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret)

Returns information about the accelerator object.

Parameters
accelerator:long

the accelerator object being queried

param_name:int

the information to query. One of:

ACCELERATOR_DESCRIPTOR_INTELACCELERATOR_REFERENCE_COUNT_INTEL
ACCELERATOR_CONTEXT_INTELACCELERATOR_TYPE_INTEL
param_value:ByteBuffer

a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.

param_value_size_ret:PointerBuffer

the actual size in bytes of data being queried by param_value. If NULL, it is ignored.

Returns:int

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:

  • INVALID_VALUE if param_name is not valid or if size in bytes specified by param_value_size is < size of return type and param_value is not NULL.
  • INVALID_ACCELERATOR_INTEL if accelerator is a not a valid accelerator object.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
Annotations
@NativeType:cl_int
clGetAcceleratorInfoINTELback to summary
public static int clGetAcceleratorInfoINTEL(long accelerator, int param_name, IntBuffer param_value, PointerBuffer param_value_size_ret)

Returns information about the accelerator object.

Parameters
accelerator:long

the accelerator object being queried

param_name:int

the information to query. One of:

ACCELERATOR_DESCRIPTOR_INTELACCELERATOR_REFERENCE_COUNT_INTEL
ACCELERATOR_CONTEXT_INTELACCELERATOR_TYPE_INTEL
param_value:IntBuffer

a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.

param_value_size_ret:PointerBuffer

the actual size in bytes of data being queried by param_value. If NULL, it is ignored.

Returns:int

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:

  • INVALID_VALUE if param_name is not valid or if size in bytes specified by param_value_size is < size of return type and param_value is not NULL.
  • INVALID_ACCELERATOR_INTEL if accelerator is a not a valid accelerator object.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
Annotations
@NativeType:cl_int
clGetAcceleratorInfoINTELback to summary
public static int clGetAcceleratorInfoINTEL(long accelerator, int param_name, PointerBuffer param_value, PointerBuffer param_value_size_ret)

Returns information about the accelerator object.

Parameters
accelerator:long

the accelerator object being queried

param_name:int

the information to query. One of:

ACCELERATOR_DESCRIPTOR_INTELACCELERATOR_REFERENCE_COUNT_INTEL
ACCELERATOR_CONTEXT_INTELACCELERATOR_TYPE_INTEL
param_value:PointerBuffer

a pointer to memory where the appropriate result being queried is returned. If param_value is NULL, it is ignored.

param_value_size_ret:PointerBuffer

the actual size in bytes of data being queried by param_value. If NULL, it is ignored.

Returns:int

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:

  • INVALID_VALUE if param_name is not valid or if size in bytes specified by param_value_size is < size of return type and param_value is not NULL.
  • INVALID_ACCELERATOR_INTEL if accelerator is a not a valid accelerator object.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
Annotations
@NativeType:cl_int
clGetAcceleratorInfoINTELback to summary
public static int clGetAcceleratorInfoINTEL(long accelerator, int param_name, int[] param_value, PointerBuffer param_value_size_ret)

Array version of: GetAcceleratorInfoINTEL

Annotations
@NativeType:cl_int
clReleaseAcceleratorINTELback to summary
public static int clReleaseAcceleratorINTEL(long accelerator)

Decrements the accelerator reference count. The accelerator object is deleted after the reference count becomes zero and commands queued for execution on a command-queue(s) that reference accelerator have finished.

Parameters
accelerator:long

a valid accelerator object

Returns:int

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:

  • INVALID_ACCELERATOR_INTEL if accelerator is a not a valid accelerator object.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
Annotations
@NativeType:cl_int
clRetainAcceleratorINTELback to summary
public static int clRetainAcceleratorINTEL(long accelerator)

Increments the accelerator reference count. CreateAcceleratorINTEL does an implicit retain.

Parameters
accelerator:long

a valid accelerator object

Returns:int

SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:

  • INVALID_ACCELERATOR_INTEL if accelerator is a not a valid accelerator object.
  • OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.
  • OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.
Annotations
@NativeType:cl_int
nclCreateAcceleratorINTELback to summary
public static long nclCreateAcceleratorINTEL(long context, int accelerator_type, long descriptor_size, long descriptor, long errcode_ret)

Unsafe version of: CreateAcceleratorINTEL

Parameters
descriptor_size:long

a value which specifies of the size, in bytes, of the immediately following descriptor structure

nclGetAcceleratorInfoINTELback to summary
public static int nclGetAcceleratorInfoINTEL(long accelerator, int param_name, long param_value_size, long param_value, long param_value_size_ret)

Unsafe version of: GetAcceleratorInfoINTEL

Parameters
param_value_size:long

the size in bytes of memory pointed to by param_value. This size must be ≥ size of return type. If param_value is NULL, it is ignored.