Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyopencl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Klöckner
pyopencl
Commits
d1c97247
Commit
d1c97247
authored
10 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Improve docs on buffer/buffer obj ambiguity
parent
aaf35ede
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/runtime.rst
+9
-0
9 additions, 0 deletions
doc/runtime.rst
pyopencl/__init__.py
+9
-0
9 additions, 0 deletions
pyopencl/__init__.py
with
18 additions
and
0 deletions
doc/runtime.rst
+
9
−
0
View file @
d1c97247
...
...
@@ -386,6 +386,15 @@ Buffers
:class:`Buffer` inherits from :class:`MemoryObject`.
.. note::
Python also defines a type of `buffer object
<https://docs.python.org/3.4/c-api/buffer.html>`_,
and PyOpenCL interacts with those, too, as the host-side
target of :func:`enqueue_copy`. Make sure to always be
clear on whether a :class:`Buffer` or a Python buffer
object is needed.
Note that actual memory allocation in OpenCL may be deferred.
Buffers are attached to a :class:`Context` and are only
moved to a device once the buffer is used on that device.
...
...
This diff is collapsed.
Click to expand it.
pyopencl/__init__.py
+
9
−
0
View file @
d1c97247
...
...
@@ -954,6 +954,15 @@ def enqueue_copy(queue, dest, src, **kwargs):
:return: A :class:`NannyEvent` if the transfer involved a
host-side buffer, otherwise an :class:`Event`.
.. note::
Two types of
'
buffer
'
occur in the arguments to this function,
:class:`Buffer` and
'
host-side buffers
'
. The latter are
defined by Python and commonly called `buffer objects
<https://docs.python.org/3.4/c-api/buffer.html>`_.
Make sure to always be clear on whether a :class:`Buffer` or a
Python buffer object is needed.
.. ------------------------------------------------------------------------
.. rubric :: Transfer :class:`Buffer` ↔ host
.. ------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment