diff --git a/doc/source/misc.rst b/doc/source/misc.rst index 58167ded30a5920c8adad75319c6baccc33905c7..903749b60afd9b96b94f42dedd3ee71d76f89899 100644 --- a/doc/source/misc.rst +++ b/doc/source/misc.rst @@ -73,7 +73,8 @@ Version 2011.2 This version is currently under development. You can get snapshots from PyOpenCL's git version control. -* Add :func:`enqueue_migrate_mem_object`. +* Add :func:`pyopencl.enqueue_migrate_mem_object`. +* Add :func:`pyopencl.image_from_array`. Version 2011.1.2 ---------------- diff --git a/doc/source/runtime.rst b/doc/source/runtime.rst index 0bc6600411680b22b0dfa5133ee928f4aae25718..7bcd56285aee2c8f105f15bbde1d5952eb1a22c5 100644 --- a/doc/source/runtime.rst +++ b/doc/source/runtime.rst @@ -241,14 +241,13 @@ Command Queues and Events |comparable| .. function:: wait_for_events(events) + .. function:: enqueue_marker(queue) Returns an :class:`Event`. .. function:: enqueue_wait_for_events(queue, events) - Returns an :class:`Event`. - .. function:: enqueue_barrier(queue) Enqueues a barrier operation. which ensures that all queued commands in @@ -298,7 +297,7 @@ Memory :param flags: from :class:`migrate_mem_object_flags_ext` - ..versionadded:: 2011.2 + .. versionadded:: 2011.2 Only available with the `cl_ext_migrate_memobject` extension. @@ -496,6 +495,25 @@ Images |comparable| +.. function:: image_from_array(ctx, ary, num_channels, mode="r", norm_int=False) + + Build a 2D or 3D :class:`Image` from the :class:`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. + + The :class:`ImageFormat` is chosen as the first *num_channels* components + of "RGBA". + + :param 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. + + .. versionadded:: 2011.2 + .. function:: enqueue_read_image(queue, mem, origin, region, hostbuf, row_pitch=0, slice_pitch=0, wait_for=None, is_blocking=True) |copy-depr|