Class INTELAccelerator
- java.lang.Object
-
- org.lwjgl.opencl.INTELAccelerator
-
public class INTELAccelerator extends java.lang.ObjectNative 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
Fields Modifier and Type Field and Description static intCL_ACCELERATOR_CONTEXT_INTEL
CL_ACCELERATOR_DESCRIPTOR_INTEL
CL_ACCELERATOR_REFERENCE_COUNT_INTEL
CL_ACCELERATOR_TYPE_INTELPossible values for cl_accelerator_info_intel.static intCL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL
CL_INVALID_ACCELERATOR_DESCRIPTOR_INTEL
CL_INVALID_ACCELERATOR_INTEL
CL_INVALID_ACCELERATOR_TYPE_INTELError codes used by functions in this extension.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static longclCreateAcceleratorINTEL(long context, int accelerator_type, java.nio.ByteBuffer descriptor, int[] errcode_ret)Array version of:CreateAcceleratorINTELstatic longclCreateAcceleratorINTEL(long context, int accelerator_type, java.nio.ByteBuffer descriptor, java.nio.IntBuffer errcode_ret)Accelerator objects represent the programmable state of an acceleration processor, engine, or algorithm.static intclGetAcceleratorInfoINTEL(long accelerator, int param_name, java.nio.ByteBuffer param_value, PointerBuffer param_value_size_ret)Returns information about the accelerator object.static intclGetAcceleratorInfoINTEL(long accelerator, int param_name, int[] param_value, PointerBuffer param_value_size_ret)int[] version of:GetAcceleratorInfoINTELstatic intclGetAcceleratorInfoINTEL(long accelerator, int param_name, java.nio.IntBuffer param_value, PointerBuffer param_value_size_ret)IntBuffer version of:GetAcceleratorInfoINTELstatic intclGetAcceleratorInfoINTEL(long accelerator, int param_name, PointerBuffer param_value, PointerBuffer param_value_size_ret)PointerBuffer version of:GetAcceleratorInfoINTELstatic intclReleaseAcceleratorINTEL(long accelerator)Decrements the accelerator reference count.static intclRetainAcceleratorINTEL(long accelerator)Increments the accelerator reference count.
-
-
-
Field Detail
-
CL_ACCELERATOR_DESCRIPTOR_INTEL
public static final int CL_ACCELERATOR_DESCRIPTOR_INTEL
Possible values for cl_accelerator_info_intel.- See Also:
- Constant Field Values
-
CL_ACCELERATOR_REFERENCE_COUNT_INTEL
public static final int CL_ACCELERATOR_REFERENCE_COUNT_INTEL
Possible values for cl_accelerator_info_intel.- See Also:
- Constant Field Values
-
CL_ACCELERATOR_CONTEXT_INTEL
public static final int CL_ACCELERATOR_CONTEXT_INTEL
Possible values for cl_accelerator_info_intel.- See Also:
- Constant Field Values
-
CL_ACCELERATOR_TYPE_INTEL
public static final int CL_ACCELERATOR_TYPE_INTEL
Possible values for cl_accelerator_info_intel.- See Also:
- Constant Field Values
-
CL_INVALID_ACCELERATOR_INTEL
public static final int CL_INVALID_ACCELERATOR_INTEL
Error codes used by functions in this extension.- See Also:
- Constant Field Values
-
CL_INVALID_ACCELERATOR_TYPE_INTEL
public static final int CL_INVALID_ACCELERATOR_TYPE_INTEL
Error codes used by functions in this extension.- See Also:
- Constant Field Values
-
CL_INVALID_ACCELERATOR_DESCRIPTOR_INTEL
public static final int CL_INVALID_ACCELERATOR_DESCRIPTOR_INTEL
Error codes used by functions in this extension.- See Also:
- Constant Field Values
-
CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL
public static final int CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL
Error codes used by functions in this extension.- See Also:
- Constant Field Values
-
-
Method Detail
-
clCreateAcceleratorINTEL
public static long clCreateAcceleratorINTEL(long context, int accelerator_type, java.nio.ByteBuffer descriptor, java.nio.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- a valid OpenCL contextaccelerator_type- 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- 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 withaccelerator_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- will return an appropriate error code. Iferrcode_retisNULL, no error code is returned.- Returns:
- a valid non-zero accelerator object, and
errcode_retis set toSUCCESSif the accelerator object is created successfully. Otherwise, it returns aNULLvalue with one of the following error values returned inerrcode_ret:INVALID_CONTEXTifcontextis not a valid context.INVALID_ACCELERATOR_TYPE_INTELif the supplied accelerator type is not valid.INVALID_ACCELERATOR_DESCRIPTOR_INTELif values specified inaccelerator_descare not valid (or a combination of values is not valid) or ifaccelerator_descisNULL.ACCELERATOR_TYPE_NOT_SUPPORTED_INTELif the supplied accelerator type is not supported by the context.INVALID_OPERATIONif none of the devices in the context support accelerator objects.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clRetainAcceleratorINTEL
public static int clRetainAcceleratorINTEL(long accelerator)
Increments the accelerator reference count.CreateAcceleratorINTELdoes an implicit retain.- Parameters:
accelerator- a valid accelerator object- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_ACCELERATOR_INTELif accelerator is a not a valid accelerator object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clReleaseAcceleratorINTEL
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- a valid accelerator object- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_ACCELERATOR_INTELif accelerator is a not a valid accelerator object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clGetAcceleratorInfoINTEL
public static int clGetAcceleratorInfoINTEL(long accelerator, int param_name, java.nio.ByteBuffer param_value, PointerBuffer param_value_size_ret)Returns information about the accelerator object.- Parameters:
accelerator- the accelerator object being queriedparam_name- the information to query. One of:ACCELERATOR_DESCRIPTOR_INTELACCELERATOR_REFERENCE_COUNT_INTELACCELERATOR_CONTEXT_INTELACCELERATOR_TYPE_INTELparam_value- a pointer to memory where the appropriate result being queried is returned. Ifparam_valueisNULL, it is ignored.param_value_size_ret- the actual size in bytes of data being queried byparam_value. IfNULL, it is ignored.- Returns:
SUCCESSif the function is executed successfully. Otherwise, it returns one of the following errors:INVALID_VALUEifparam_nameis not valid or if size in bytes specified byparam_value_sizeis < size of return type andparam_valueis notNULL.INVALID_ACCELERATOR_INTELif accelerator is a not a valid accelerator object.OUT_OF_RESOURCESif there is a failure to allocate resources required by the OpenCL implementation on the device.OUT_OF_HOST_MEMORYif there is a failure to allocate resources required by the OpenCL implementation on the host.
-
clGetAcceleratorInfoINTEL
public static int clGetAcceleratorInfoINTEL(long accelerator, int param_name, java.nio.IntBuffer param_value, PointerBuffer param_value_size_ret)IntBuffer version of:GetAcceleratorInfoINTEL
-
clGetAcceleratorInfoINTEL
public static int clGetAcceleratorInfoINTEL(long accelerator, int param_name, PointerBuffer param_value, PointerBuffer param_value_size_ret)PointerBuffer version of:GetAcceleratorInfoINTEL
-
clCreateAcceleratorINTEL
public static long clCreateAcceleratorINTEL(long context, int accelerator_type, java.nio.ByteBuffer descriptor, int[] errcode_ret)Array version of:CreateAcceleratorINTEL
-
clGetAcceleratorInfoINTEL
public static int clGetAcceleratorInfoINTEL(long accelerator, int param_name, int[] param_value, PointerBuffer param_value_size_ret)int[] version of:GetAcceleratorInfoINTEL
-
-