Return a variable-length tuple of integers representing the version of the OpenCL header against which PyOpenCL was compiled.
New in version 0.92.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
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_khr_gl_sharing extension.
New in version 0.92.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Only available when PyOpenCL is compiled with GL support. See have_gl().
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.
Returns a str representing value.
New in version 0.91.
Only available when PyOpenCL is compiled with GL support. See have_gl().
Returns a str representing value.
New in version 0.91.
Only available when PyOpenCL is compiled with GL support. See have_gl().
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
Returns a str representing value.
New in version 0.91.
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.
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 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.
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.
See command_queue_properties for possible values of prop. enable is a bool.
Unavailable in OpenCL 1.1 and newer.
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.
A subclass of Event. Only available with OpenCL 1.1 and newer.
New in version 0.92.
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.
The origin and region parameters are tuple instances of length three or shorter. The pitches parameters are tuple instances of length two or shorter, which may be zero to indicate ‘tight packing’.
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)
Only available in OpenCL 1.1 and newer.
New in version 0.92.
The origin and region parameters are tuple instances of length three or shorter. The pitches parameters are tuple instances of length two or shorter, which may be zero to indicate ‘tight packing’.
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)
Only available in OpenCL 1.1 and newer.
New in version 0.92.
The origin and region parameters are tuple instances of length three or shorter. The pitches parameters are tuple instances of length two or shorter, which may be zero to indicate ‘tight packing’.
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.
Only available in OpenCL 1.1 and newer.
New in version 0.92.
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.
Returns a str representation of the image format.
New in version 0.91.
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.
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.
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 Event. wait_for may either be None or a list of Event instances for whose completion this command waits before starting exeuction.
None may be passed for local_size
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.
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.
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.