Top Description Fields Constructors Methods
org.lwjgl.opencl

public Class EXTMigrateMemobject

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

Native bindings to the ext_migrate_memobject extension.

This extension defines a mechanism for assigning which device an OpenCL memory object resides.

Field Summary

Modifier and TypeField and Description
public static final int
CL_COMMAND_MIGRATE_MEM_OBJECT_EXT

Returned in the param_value parameter of the clGetEventInfo when param_name is EVENT_COMMAND_TYPE.

public static final int
CL_MIGRATE_MEM_OBJECT_HOST_EXT

This flag specifies that the specified set of memory objects are to be migrated to the host, regardless of the target command queue.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
clEnqueueMigrateMemObjectEXT(long
a valid command queue
command_queue
,
PointerBuffer
the memory objects to migrate to the OpenCL device associated with command_queue
mem_objects
,
long
a bitfield that is used to specify migration options. One of:
0MIGRATE_MEM_OBJECT_HOST_EXT
flags
,
PointerBuffer
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_wait_list
,
PointerBuffer
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.
event
)

Provides the application with a way to indicate which device a set of memory objects should be associated.

public static int
nclEnqueueMigrateMemObjectEXT(long command_queue, int
the number of memory objects specified in the mem_objects argument
num_mem_objects
,
long mem_objects, long flags, int
the number of events in event_wait_list
num_events_in_wait_list
,
long event_wait_list, long event)

Unsafe version of: EnqueueMigrateMemObjectEXT

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CL_COMMAND_MIGRATE_MEM_OBJECT_EXTback to summary
public static final int CL_COMMAND_MIGRATE_MEM_OBJECT_EXT

Returned in the param_value parameter of the clGetEventInfo when param_name is EVENT_COMMAND_TYPE.

CL_MIGRATE_MEM_OBJECT_HOST_EXTback to summary
public static final int CL_MIGRATE_MEM_OBJECT_HOST_EXT

This flag specifies that the specified set of memory objects are to be migrated to the host, regardless of the target command queue.

Constructor Detail

EXTMigrateMemobjectback to summary
protected EXTMigrateMemobject()

Method Detail

clEnqueueMigrateMemObjectEXTback to summary
public static int clEnqueueMigrateMemObjectEXT(long command_queue, PointerBuffer mem_objects, long flags, PointerBuffer event_wait_list, PointerBuffer event)

Provides the application with a way to indicate which device a set of memory objects should be associated. Typically, memory objects are implicitly migrated to a device for which enqueued commands, using the memory object, are targeted. clEnqueueMigrateMemObjectEXT allows this migration to be explicitly performed ahead of the dependent commands. This permits an application to overlap the placement of memory objects with other unrelated operations. Once the OpenCL event, returned from clEnqueueMigrateMemObject, has been marked COMPLETE the memory objects specified in mem_objects have been successfully migrated to the device associated with command_queue. The migrated memory object shall remain resident on the device until another command is enqueued that either implicitly or explicitly migrates it away. As well, clEnqueueMigrateMemObjectEXT can be used to direct the initial placement of a memory object, after creation, possibly avoiding the initial overhead of instantiating the object on the first enqueued command to use it.

The user is responsible for managing the event dependencies, associated with this command, in order to avoid overlapping access to memory objects. Improperly specified event dependencies passed to clEnqueueMigrateMemObject could result in undefined results.

Parameters
command_queue:long

a valid command queue

mem_objects:PointerBuffer

the memory objects to migrate to the OpenCL device associated with command_queue

flags:long

a bitfield that is used to specify migration options. One of:

0MIGRATE_MEM_OBJECT_HOST_EXT
event_wait_list:PointerBuffer

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:PointerBuffer

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.

Annotations
@NativeType:cl_int
nclEnqueueMigrateMemObjectEXTback to summary
public static int nclEnqueueMigrateMemObjectEXT(long command_queue, int num_mem_objects, long mem_objects, long flags, int num_events_in_wait_list, long event_wait_list, long event)

Unsafe version of: EnqueueMigrateMemObjectEXT

Parameters
num_mem_objects:int

the number of memory objects specified in the mem_objects argument

num_events_in_wait_list:int

the number of events in event_wait_list