Gives the numeric version of PyOpenCL as a variable-length tuple of integers. Enables easy version checks such as VERSION >= (0, 93).
A text string such as “rc4” or “beta” qualifying the status of the release.
The full release name (such as “0.93rc4”) in string form.
Return a variable-length tuple of integers representing the version of the OpenCL header against which PyOpenCL was compiled.
New in version 0.92.
Base class for all PyOpenCL exceptions.
Available with OpenCL 1.1.
New in version 0.92.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.1.
New in version 0.92.
Available with the cl_khr_gl_sharing extension.
New in version 0.92.
Available with the cl_khr_gl_sharing extension.
New in version 0.92.
Available with the cl_khr_gl_sharing extension.
New in version 0.92.
Available with the cl_khr_gl_sharing extension.
New in version 0.92.
Available with the cl_amd_offline_devices extension.
New in version 2011.1.
Available with the cl_khr_gl_sharing extension.
New in version 0.92.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.1.
New in version 0.92.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with OpenCL 1.2.
New in version 2011.2.
Available with the cl_nv_device_attribute_query extension.
New in version 0.92.
Available with the cl_nv_device_attribute_query extension.
New in version 0.92.
Available with the cl_khr_fp64 extension.
New in version 2011.1.
Available with the cl_nv_device_attribute_query extension.
New in version 0.92.
Available with the cl_khr_fp16 extension.
New in version 2011.1.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with the cl_nv_device_attribute_query extension.
New in version 0.92.
Available with the cl_nv_device_attribute_query extension.
New in version 0.92.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.2.
New in version 2011.2.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with OpenCL 1.2.
New in version 2011.2.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.2.
New in version 2011.2.
Available with the cl_amd_device_attribute_query extension.
New in version 2011.1.
Available with OpenCL 1.2.
New in version 2011.2.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with the cl_nv_device_attribute_query extension.
New in version 0.92.
Available with the cl_nv_device_attribute_query extension.
New in version 0.92.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with the cl_ext_device_fission extension.
New in version 2011.1.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.1.
New in version 0.92.
Only available when PyOpenCL is compiled with GL support. See have_gl().
Only available when PyOpenCL is compiled with GL support. See have_gl().
Only available when PyOpenCL is compiled with GL support. See have_gl().
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with the cl_amd_device_memory_flags extension.
New in version 2011.1.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.1.
New in version 0.92.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.1.
New in version 0.92.
Available with the cl_khr_gl_sharing extension.
New in version 0.92.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.2.
New in version 2011.2.
Available with OpenCL 1.1.
New in version 0.92.
Available with the cl_khr_icd extension.
New in version 2011.1.
Lower case versions of the platform_info constants may be used as attributes on instances of this class to directly query info attributes.
See platform_info for values of param.
Return a list of devices matching device_type. See device_type for values of device_type.
Instances of this class are hashable, and two instances of this class may be compared using “==” and ”!=”. (Hashability was added in version 2011.2.)
Lower case versions of the device_info constants may be used as attributes on instances of this class to directly query info attributes.
See device_info for values of param.
Two instances of this class may be compared using ==” and ”!=”.
Create a new context. properties is a list of key-value tuples, where each key must be one of context_properties. At most one of devices and dev_type may be not None, where devices is a list of Device instances, and dev_type is one of the device_type constants. If neither is specified, a context with a dev_type of device_type.DEFAULT is created.
Note
Calling the constructor with no arguments will fail for recent CL drivers that support the OpenCL ICD. If you want similar, just-give-me-a-context-already behavior, we recommend create_some_context(). See, e.g. this explanation by AMD.
Note
For context_properties.CL_GL_CONTEXT_KHR, context_properties.CL_EGL_DISPLAY_KHR, context_properties.CL_GLX_DISPLAY_KHR, context_properties.CL_WGL_HDC_KHR, and context_properties.CL_CGL_SHAREGROUP_KHR context_properties.CL_CGL_SHAREGROUP_APPLE the value in the key-value pair is a PyOpenGL context or display instance.
Changed in version 0.91.2: Constructor arguments dev_type added.
Lower case versions of the context_info constants may be used as attributes on instances of this class to directly query info attributes.
See context_info for values of param.
properties is an array of one (or more) of the forms:
[ dpp.EQUALLY, 8]
[ dpp.BY_COUNTS, 5, 7, 9, dpp.PARTITION_BY_COUNTS_LIST_END]
[ dpp.BY_NAMES, 5, 7, 9, dpp.PARTITION_BY_NAMES_LIST_END]
[ dpp.BY_AFFINITY_DOMAIN, dad.L1_CACHE]
where dpp represents device_partition_property and dad represent device_affinity_domain.
PROPERTIES_LIST_END_EXT is added automatically.
Only available with CL 1.2.
New in version 2011.2.
properties is an array of one (or more) of the forms:
[ dppe.EQUALLY, 8]
[ dppe.BY_COUNTS, 5, 7, 9, dppe.PARTITION_BY_COUNTS_LIST_END]
[ dppe.BY_NAMES, 5, 7, 9, dppe.PARTITION_BY_NAMES_LIST_END]
[ dppe.BY_AFFINITY_DOMAIN, ad.L1_CACHE]
where dppe represents device_partition_property_ext and ad represent affinity_domain_ext.
PROPERTIES_LIST_END_EXT is added automatically.
Only available with the cl_ext_device_fission extension.
New in version 2011.1.
Instances of this class are hashable, and two instances of this class may be compared using “==” and ”!=”. (Hashability was added in version 2011.2.)
Create a Context ‘somehow’.
If multiple choices for platform and/or device exist, interactive is True, and sys.stdin.isatty() is also True, then the user is queried about which device should be chosen. Otherwise, a device is chosen in an implementation-defined manner.
Create a new command queue. properties is a bit field consisting of command_queue_properties values.
if device is None, one of the devices in context is chosen in an implementation-defined manner.
A CommandQueue may be used as a context manager, like this:
with cl.CommandQueue(self.cl_context) as queue:
enqueue_stuff(queue, ...)
finish() is automatically called at the end of the context.
New in version 2013.1: Context manager capability.
Lower case versions of the command_queue_info constants may be used as attributes on instances of this class to directly query info attributes.
See command_queue_info for values of param.
See command_queue_properties for possible values of prop. enable is a bool.
Unavailable in OpenCL 1.1 and newer.
Instances of this class are hashable, and two instances of this class may be compared using “==” and ”!=”. (Hashability was added in version 2011.2.)
Lower case versions of the event_info constants may be used as attributes on instances of this class to directly query info attributes.
Lower case versions of the profiling_info constants may be used as attributes on the attribute profile of this class to directly query profiling info.
For example, you may use evt.profile.end instead of evt.get_profiling_info(pyopencl.profiling_info.END).
See event_info for values of param.
See profiling_info for values of param. See profile for an easier way of obtaining the same information.
Instances of this class are hashable, and two instances of this class may be compared using “==” and ”!=”. (Hashability was added in version 2011.2.)
Enqueues a barrier operation. which ensures that all queued commands in command_queue have finished execution. This command is a synchronization point.
New in version 0.91.5.
Changed in version 2011.2: Takes wait_for and returns an Event
Returns an Event.
Changed in version 2011.2: Takes wait_for.
A subclass of Event. Only available with OpenCL 1.1 and newer.
New in version 0.92.
See command_execution_status for possible values of status.
Transfers between host and device return events of this type. They hold a reference to the host-side buffer and wait for the transfer to complete when they are freed. Therefore, they can safely release the reference to the object they’re guarding upon destruction.
A subclass of Event.
New in version 2011.2.
In addition to performing the same wait as Event.wait(), this method also releases the reference to the guarded object.
Lower case versions of the mem_info constants may be used as attributes on instances of this class to directly query info attributes.
Return the memory object’s associated host memory area as a numpy.ndarray of the given shape, dtype and order.
Instances of this class are hashable, and two instances of this class may be compared using “==” and ”!=”. (Hashability was added in version 2011.2.)
Parameters: | flags – from mem_migration_flags |
---|
New in version 2011.2.
Only available with CL 1.2.
Parameters: | flags – from migrate_mem_object_flags_ext |
---|
New in version 2011.2.
Only available with the cl_ext_migrate_memobject extension.
Create a Buffer. See mem_flags for values of flags. If hostbuf is specified, size defaults to the size of the specified buffer if it is passed as zero.
Buffer is a subclass of MemoryObject.
Note that actual memory allocation in OpenCL may be deferred. Buffers are attached to a Context and are only moved to a device once the buffer is used on that device. That is also the point when out-of-memory errors will occur. If you’d like to be sure that there’s enough memory for your allocation, either use enqueue_migrate_mem_objects() (if available) or simply perform a small transfer to the buffer. See also pyopencl.tools.ImmediateAllocator.
Only available in OpenCL 1.1 and newer.
slc is a slice object indicating from which byte index range a sub-buffer is to be created. The flags argument of get_sub_region() is set to the same flags with which self was created.
Parameters: | pattern – a buffer object (likely a numpy.ndarray) |
---|
Returns a new pyopencl.Event. wait_for may either be None or a list of pyopencl.Event instances for whose completion this command waits before starting exeuction.
Only available with CL 1.2.
New in version 2011.2.
Changed in version 0.91: Constructor arguments added.
See channel_order for possible values.
See channel_type for possible values.
New in version 0.91.5.
New in version 0.91.5.
New in version 0.91.5.
See mem_flags for possible values of flags and mem_object_type for possible values of image_type.
See mem_flags for values of flags. shape is a 2- or 3-tuple. format is an instance of ImageFormat. pitches is a 1-tuple for 2D images and a 2-tuple for 3D images, indicating the distance in bytes from one scan line to the next, and from one 2D image slice to the next.
If hostbuf is given and shape is None, then hostbuf.shape is used as the shape parameter.
Image is a subclass of MemoryObject.
Note
If you want to load images from numpy.ndarray instances or read images back into them, be aware that OpenCL images expect the x dimension to vary fastest, whereas in the default (C) order of numpy arrays, the last index varies fastest. If your array is arranged in the wrong order in memory, there are two possible fixes for this:
New in version 0.91.
Changed in version 2011.2: Added is_array and buffer, which are only available on CL 1.2 and newer.
Lower case versions of the mem_info and image_info constants may be used as attributes on instances of this class to directly query info attributes.
See image_info for values of param.
Instances of this class are hashable, and two instances of this class may be compared using “==” and ”!=”. (Hashability was added in version 2011.2.)
Build a 2D or 3D Image from the numpy.ndarray ary. If num_channels is greater than one, the last dimension of ary must be identical to num_channels. ary must be in C order. If num_channels is not given, it defaults to 1 for scalar types and the number of entries for Vector Types.
The ImageFormat is chosen as the first num_channels components of “RGBA”.
Parameters: | mode – “r” or “w” for read/write |
---|
Note
When reading from the image object, the indices passed to read_imagef are in the reverse order from what they would be when accessing ary from Python.
If norm_int is True, then the integer values are normalized to a floating point scale of 0..1 when read.
New in version 2011.2.
Parameters: | color – a buffer object (likely a numpy.ndarray) |
---|
Returns a new pyopencl.Event. wait_for may either be None or a list of pyopencl.Event instances for whose completion this command waits before starting exeuction.
Only available with CL 1.2.
New in version 2011.2.
Copy from Image, Buffer or the host to Image, Buffer or the host. (Note: host-to-host copies are unsupported.)
The following keyword arguments are available:
Parameters: |
|
---|---|
Returns: | A NannyEvent if the transfer involved a host-side buffer, otherwise an Event. |
Transfer Buffer ↔ host
Parameters: | device_offset – offset in bytes (optional) |
---|
Note
The size of the transfer is controlled by the size of the of the host-side buffer. If the host-side buffer is a numpy.ndarray, you can control the transfer size by transfering into a smaller ‘view’ of the target array, like this:
cl.enqueue_copy(queue, large_dest_numpy_array[:15], src_buffer)
Parameters: |
|
---|
Rectangular Buffer ↔ host transfers (CL 1.1 and newer)
Parameters: |
|
---|
Transfer Image ↔ host
Parameters: |
---|
Transfer Buffer ↔ Image
Parameters: |
---|
Transfer Image ↔ Image
Parameters: |
---|
Returns a new pyopencl.Event. wait_for may either be None or a list of pyopencl.Event instances for whose completion this command waits before starting exeuction.
New in version 2011.1.
wait_for may either be None or a list of pyopencl.Event instances for whose completion this command waits before starting exeuction. shape, dtype, and order have the same meaning as in numpy.empty(). See map_flags for possible values of flags.
Returns: | a tuple (array, event). array is a numpy.ndarray representing the host side of the map. Its .base member contains a MemoryMap. |
---|
Changed in version 2011.1: is_blocking now defaults to True.
Changed in version 2013.1: order now defaults to “C”.
wait_for may either be None or a list of pyopencl.Event instances for whose completion this command waits before starting exeuction. shape, dtype, and order have the same meaning as in numpy.empty(). See map_flags for possible values of flags.
Returns: | a tuple (array, event). array is a numpy.ndarray representing the host side of the map. Its .base member contains a MemoryMap. |
---|
Changed in version 2011.1: is_blocking now defaults to True.
Changed in version 2013.1: order now defaults to “C”.
normalized_coords is a bool indicating whether to use coordinates between 0 and 1 (True) or the texture’s natural pixel size (False). See addressing_mode and filter_mode for possible argument values.
Lower case versions of the sampler_info constants may be used as attributes on instances of this class to directly query info attributes.
See sampler_info for values of param.
Instances of this class are hashable, and two instances of this class may be compared using “==” and ”!=”. (Hashability was added in version 2011.2.)
binaries must contain one binary for each entry in devices.
Lower case versions of the program_info constants may be used as attributes on instances of this class to directly query info attributes.
See program_info for values of param.
See program_build_info for values of param.
options is a string of compiler flags. Returns self.
By default, built binaries are cached in an on-disk cache called pyopencl-compiler-cache-vN-uidNAME-pyVERSION in the directory returned by tempfile.gettempdir(). By setting the environment variable PYOPENCL_NO_CACHE to any non-empty value, this caching is suppressed. Any options found in the environment variable PYOPENCL_BUILD_OPTIONS will be appended to options.
Changed in version 2013.1: Added PYOPENCL_NO_CACHE. Added PYOPENCL_BUILD_OPTIONS.
Parameters: | headers – a list of tuples (name, program). |
---|
Only available with CL 1.2.
New in version 2011.2.
Kernel objects can be produced from a built (see build()) program simply by attribute lookup.
Note
The program_info attributes live in the same name space and take precedence over Kernel names.
Instances of this class are hashable, and two instances of this class may be compared using “==” and ”!=”. (Hashability was added in version 2011.2.)
Only available with CL 1.2.
New in version 2011.2.
Only available with CL 1.2.
New in version 2011.2.
Only available with CL 1.2.
New in version 2011.2.
Lower case versions of the kernel_info constants may be used as attributes on instances of this class to directly query info attributes.
See kernel_info for values of param.
See kernel_work_group_info for values of param.
See kernel_arg_info for values of param.
Only available in OpenCL 1.2 and newer.
arg may be
None: This may be passed for __global memory references to pass a NULL pointer to the kernel.
Anything that satisfies the Python buffer interface, in particular numpy.ndarray, str, or numpy‘s sized scalars, such as numpy.int32 or numpy.float64.
Note
Note that Python’s own int or float objects will not work out of the box. See Kernel.set_scalar_arg_dtypes() for a way to make them work. Alternatively, the standard library module struct can be used to convert Python’s native number types to binary data in a str.
An instance of MemoryObject. (e.g. Buffer, Image, etc.)
An instance of LocalMemory.
An instance of Sampler.
Inform the wrapper about the sized types of scalar Kernel arguments. For each argument, arg_dtypes contains an entry. For non-scalars, this must be None. For scalars, it must be an object acceptable to the numpy.dtype constructor, indicating that the corresponding scalar argument is of that type.
After invoking this function with the proper information, most suitable number types will automatically be cast to the right type for kernel invocation.
Note
The information set by this rountine is attached to a single kernel instance. A new kernel instance is created every time you use program.kernel attribute access. The following will therefore not work:
prg = cl.Program(...).build()
prg.kernel.set_scalar_arg_dtypes(...)
prg.kernel(queue, n_globals, None, args)
Use enqueue_nd_range_kernel() to enqueue a kernel execution, after using set_args() to set each argument in turn. See the documentation for set_arg() to see what argument types are allowed. Returns a new pyopencl.Event. wait_for may either be None or a list of pyopencl.Event instances for whose completion this command waits before starting exeuction.
None may be passed for local_size.
If g_times_l is specified, the global size will be multiplied by the local size. (which makes the behavior more like Nvidia CUDA) In this case, global_size and local_size also do not have to have the same number of dimensions.
Note
__call__() is not thread-safe. It sets the arguments using set_args() and then runs enqueue_nd_range_kernel(). Another thread could race it in doing the same things, with undefined outcome. This issue is inherited from the C-level OpenCL API. The recommended solution is to make a kernel (i.e. access prg.kernel_name, which corresponds to making a new kernel) for every thread that may enqueue calls to the kernel.
A solution involving implicit locks was discussed and decided against on the mailing list in October 2012.
Changed in version 0.92: local_size was promoted to third positional argument from being a keyword argument. The old keyword argument usage will continue to be accepted with a warning throughout the 0.92 release cycle. This is a backward-compatible change (just barely!) because local_size as third positional argument can only be a tuple or None. tuple instances are never valid Kernel arguments, and None is valid as an argument, but its treatment in the wrapper had a bug (now fixed) that prevented it from working.
Changed in version 2011.1: Added the g_times_l keyword arg.
This method supports the exact same interface as __call__(), but instead of invoking the kernel, it writes a self-contained PyOpenCL program to filename that reproduces this invocation. Data and kernel source code will be packaged up in filename‘s source code.
This is mainly intended as a debugging aid. For example, it can be used to automate the task of creating a small, self-contained test case for an observed problem. It can also help separate a misbehaving kernel from a potentially large or time-consuming outer code.
To use, simply change:
evt = my_kernel(queue, gsize, lsize, arg1, arg2, ...)
to:
evt = my_kernel.capture_call("bug.py", queue, gsize, lsize, arg1, arg2, ...)
New in version 2013.1.
Instances of this class are hashable, and two instances of this class may be compared using “==” and ”!=”. (Hashability was added in version 2011.2.)
A helper class to pass __local memory arguments to kernels.
New in version 0.91.2.
The size of local buffer in bytes to be provided.
Returns a new pyopencl.Event. wait_for may either be None or a list of pyopencl.Event instances for whose completion this command waits before starting exeuction.
If g_times_l is specified, the global size will be multiplied by the local size. (which makes the behavior more like Nvidia CUDA) In this case, global_size and local_size also do not have to have the same number of dimensions.
Changed in version 2011.1: Added the g_times_l keyword arg.
Returns a new pyopencl.Event. wait_for may either be None or a list of pyopencl.Event instances for whose completion this command waits before starting exeuction.
Functionality in this section is only available when PyOpenCL is compiled with GL support. See have_gl().
New in version 0.91.
Return True if PyOpenCL was compiled with OpenGL interoperability, otherwise False.
Return a list of context_properties that will allow a newly created context to share the currently active GL context.
Get share group handle for current CGL context.
Apple OS X only.
New in version 2011.1.
GLBuffer is a subclass of MemoryObject.
GLRenderBuffer is a subclass of MemoryObject.
dims is either 2 or 3. GLTexture is a subclass of Image.
See gl_texture_info for values of param. Only available when PyOpenCL is compiled with GL support. See have_gl().
mem_objects is a list of MemoryObject instances. Returns a new pyopencl.Event. wait_for may either be None or a list of pyopencl.Event instances for whose completion this command waits before starting exeuction.
mem_objects is a list of MemoryObject instances. Returns a new pyopencl.Event. wait_for may either be None or a list of pyopencl.Event instances for whose completion this command waits before starting exeuction.
Get information on which CL device corresponds to a given GL/EGL/WGL/CGL device.
See the Context constructor for the meaning of properties and gl_context_info for param_name.
Changed in version 2011.2: Accepts the platform argument. Using platform equal to None is deprecated as of PyOpenCL 2011.2.