Class KHRExternalMemory

java.lang.Object
org.lwjgl.opencl.KHRExternalMemory

public class KHRExternalMemory extends Object
Native bindings to the khr_external_memory extension.

This extension defines a generic mechanism to share buffer and image objects between OpenCL and many other APIs.

In particular, the cl_khr_external_memory extension defines:

  • Optional properties to import external memory exported by other APIs into OpenCL for a set of devices.
  • Routines to explicitly hand off memory ownership between OpenCL and other APIs.

Other related extensions define specific external memory types that may be imported into OpenCL.

Requires CL30.

  • Field Details

    • CL_PLATFORM_EXTERNAL_MEMORY_IMPORT_HANDLE_TYPES_KHR

      public static final int CL_PLATFORM_EXTERNAL_MEMORY_IMPORT_HANDLE_TYPES_KHR
      Accepted value for the param_name parameter to GetPlatformInfo to query external memory handle types that may be imported by all devices in an OpenCL platform.
      See Also:
    • CL_DEVICE_EXTERNAL_MEMORY_IMPORT_HANDLE_TYPES_KHR

      public static final int CL_DEVICE_EXTERNAL_MEMORY_IMPORT_HANDLE_TYPES_KHR
      Accepted value for the param_name parameter to GetDeviceInfo to query external memory handle types that may be imported by an OpenCL device.
      See Also:
    • CL_DEVICE_HANDLE_LIST_KHR

      public static final int CL_DEVICE_HANDLE_LIST_KHR
      New properties accepted as properties to CreateBufferWithProperties and CreateImageWithProperties.
      See Also:
    • CL_DEVICE_HANDLE_LIST_END_KHR

      public static final int CL_DEVICE_HANDLE_LIST_END_KHR
      New properties accepted as properties to CreateBufferWithProperties and CreateImageWithProperties.
      See Also:
    • CL_COMMAND_ACQUIRE_EXTERNAL_MEM_OBJECTS_KHR

      public static final int CL_COMMAND_ACQUIRE_EXTERNAL_MEM_OBJECTS_KHR
      New return values from GetEventInfo when param_name is EVENT_COMMAND_TYPE.
      See Also:
    • CL_COMMAND_RELEASE_EXTERNAL_MEM_OBJECTS_KHR

      public static final int CL_COMMAND_RELEASE_EXTERNAL_MEM_OBJECTS_KHR
      New return values from GetEventInfo when param_name is EVENT_COMMAND_TYPE.
      See Also:
    • CL_EXTERNAL_MEMORY_HANDLE_DMA_BUF_KHR

      public static final int CL_EXTERNAL_MEMORY_HANDLE_DMA_BUF_KHR
      External memory handle type added by cl_khr_external_memory_dma_buf.
      See Also:
    • CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_FD_KHR

      public static final int CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_FD_KHR
      External memory handle type added by cl_khr_external_memory_opaque_fd.
      See Also:
    • CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_KHR

      public static final int CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_KHR
      External memory handle types added by cl_khr_external_memory_win32.
      See Also:
    • CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_KMT_KHR

      public static final int CL_EXTERNAL_MEMORY_HANDLE_OPAQUE_WIN32_KMT_KHR
      External memory handle types added by cl_khr_external_memory_win32.
      See Also:
  • Method Details

    • nclEnqueueAcquireExternalMemObjectsKHR

      public static int nclEnqueueAcquireExternalMemObjectsKHR(long command_queue, int num_mem_objects, long mem_objects, int num_events_in_wait_list, long event_wait_list, long event)
      Parameters:
      num_events_in_wait_list - the number of events in event_wait_list
    • clEnqueueAcquireExternalMemObjectsKHR

      public static int clEnqueueAcquireExternalMemObjectsKHR(long command_queue, org.lwjgl.PointerBuffer mem_objects, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)
      Parameters:
      event_wait_list - a list of events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same.
      event - Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array.
    • nclEnqueueReleaseExternalMemObjectsKHR

      public static int nclEnqueueReleaseExternalMemObjectsKHR(long command_queue, int num_mem_objects, long mem_objects, int num_events_in_wait_list, long event_wait_list, long event)
      Parameters:
      num_events_in_wait_list - the number of events in event_wait_list
    • clEnqueueReleaseExternalMemObjectsKHR

      public static int clEnqueueReleaseExternalMemObjectsKHR(long command_queue, org.lwjgl.PointerBuffer mem_objects, @Nullable org.lwjgl.PointerBuffer event_wait_list, @Nullable org.lwjgl.PointerBuffer event)
      Parameters:
      event_wait_list - a list of events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same.
      event - Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete. event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the event_wait_list array.