Only available when PyOpenCL is compiled with GL support. See have_gl().
Only available when PyOpenCL is compiled with GL support. See have_gl().
Two instances of this class may be compared using “==” and “!=”.
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.
Changed in version 0.91.2: Constructor arguments dev_type added.
Two instances of this class may be compared using “==” and “!=”.
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.
Two instances of this class may be compared using “==” and “!=”.
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).
Two instances of this class may be compared using “==” and “!=”.
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.
Two instances of this class may be compared using “==” and “!=”.
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.
Returns a new Event. wait_for may either be None or a list of Event instances for whose completion this command waits before starting exeuction.
hostbuf must implement the Python buffer interface. (e.g. by being an numpy.ndarray)
Returns a new Event. wait_for may either be None or a list of Event instances for whose completion this command waits before starting exeuction.
hostbuf must implement the Python buffer interface. (e.g. by being an numpy.ndarray)
If byte_count is passed as 0 (the default), the size of the Buffer src is used instead.
Returns a new Event. wait_for may either be None or a list of Event instances for whose completion this command waits before starting exeuction.
New in version 0.91.5.
Changed in version 0.91: Constructor arguments added.
New in version 0.91.5.
New in version 0.91.5.
New in version 0.91.5.
shape is a 2- or 3-tuple.
If hostbuf is given and shape is None, then hostbuf.shape is used as the shape parameter.
Image is a subclass of MemoryObject.
New in version 0.91.
Two instances of this class may be compared using “==” and “!=”.
Returns a new Event. wait_for may either be None or a list of Event instances for whose completion this command waits before starting exeuction.
Changed in version 0.91: pitch arguments defaults to zero, moved.
Returns a new Event. wait_for may either be None or a list of Event instances for whose completion this command waits before starting exeuction.
Changed in version 0.91: pitch arguments defaults to zero, moved.
wait_for may either be None or a list of 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. |
|---|
wait_for may either be None or a list of 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. |
|---|
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.
Two instances of this class may be compared using “==” and “!=”.
binaries must contain one binary for each entry in devices.
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.
Two instances of this class may be compared using “==” and “!=”.
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.
An instance of MemoryObject. (e.g. Buffer, Image, etc.)
An instance of LocalMemory.
An instance of Sampler.
Two instances of this class may be compared using “==” and “!=”.
A helper class to pass __local memory arguments to kernels.
New in version 0.91.2.
Functionality in this section is only available when PyOpenCL is compiled with GL support. See have_gl().
New in version 0.91.
GLBuffer is a subclass of MemoryObject.
GLRenderBuffer is a subclass of MemoryObject.
dims is either 2 or 3. GLTexture is a subclass of Image.