Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
67b8e8f2
Commit
67b8e8f2
authored
Oct 21, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #68 from larsmans/docfixes
DOC improve parallel/OpenMP section
parents
8f5fd6c0
2835d9d7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
33 deletions
+41
-33
docs/README
docs/README
+3
-2
docs/TODO
docs/TODO
+26
-0
docs/src/userguide/external_C_code.rst
docs/src/userguide/external_C_code.rst
+2
-0
docs/src/userguide/parallelism.rst
docs/src/userguide/parallelism.rst
+10
-7
docs/todo.txt
docs/todo.txt
+0
-24
No files found.
docs/README
View file @
67b8e8f2
...
...
@@ -2,13 +2,14 @@ Cython's entire documentation suite is currently being overhauled.
For the time being, I'll use this page to post notes.
The previous Cython documentation files are hosted at http://hg.cython.org/cython-docs
The previous Cython documentation files are hosted at
http://hg.cython.org/cython-docs
Notes
=======
1) Some css work should defin
a
tely be done.
1) Some css work should defin
i
tely be done.
2) Use local 'top-of-page' contents rather than the sidebar, imo.
3) Provide a link from each (sub)section to the TOC of the page.
4) Fix cython highlighter for cdef blocks
docs/TODO
View file @
67b8e8f2
Background
----------
[brain dump]
The "Old Cython Users Guide" is a derivative of the old Pyrex documentation.
It underwent substantial editing by Peter Alexandar
to become the Reference Guide, which is oriented around bullet points
and lists rather than prose. This transition was incomplete.
At nearly the same time, Robert, Dag, and Stefan wrote a tutorial as
part of the SciPy proceedings. It was felt that the content there was
cleaner and more up to date than anything else, and this became the
basis for the "Getting Started" and "Tutorials" sections. However,
it simply doesn't have as much content as the old documentation used to.
Eventually, it seems all of the old users manual could be whittled
down into independent tutorial topics. Much discussion of what we'd
like to see is at
http://www.mail-archive.com/cython-dev@codespeak.net/msg06945.html
There is currently a huge amount of redundancy, but no one section has
it all.
Also, we should go through the wiki enhancement proposal list
and make sure to transfer the (done) ones into the user manual.
docs/src/userguide/external_C_code.rst
View file @
67b8e8f2
...
...
@@ -420,6 +420,8 @@ Cython provides facilities for releasing the Global Interpreter Lock (GIL)
before calling C code, and for acquiring the GIL in functions that are to be
called back from C code that is executed without the GIL.
.. _nogil:
Releasing the GIL
^^^^^^^^^^^^^^^^^
...
...
docs/src/userguide/parallelism.rst
View file @
67b8e8f2
...
...
@@ -7,8 +7,11 @@ Using Parallelism
**********************************
Cython supports native parallelism through the :py:mod:`cython.parallel`
module. To use this kind of parallelism, the GIL must be released. It
currently supports OpenMP, but later on more backends might be supported.
module. To use this kind of parallelism, the GIL must be released
(see :ref:`Releasing the GIL <nogil>`).
It currently supports OpenMP, but later on more backends might be supported.
__ nogil_
.. function:: prange([start,] stop[, step], nogil=False, schedule=None)
...
...
@@ -59,11 +62,11 @@ currently supports OpenMP, but later on more backends might be supported.
+-----------------+------------------------------------------------------+
The default schedule is implementation defined. For more information consult
the OpenMP specification
:
[#]_.
the OpenMP specification [#]_.
Example with a reduction::
from cython.parallel import prange
, parallel, threadid
from cython.parallel import prange
cdef int i
cdef int sum = 0
...
...
@@ -75,7 +78,7 @@ currently supports OpenMP, but later on more backends might be supported.
Example with a shared numpy array::
from cython.parallel import
*
from cython.parallel import
prange
def func(np.ndarray[double] x, double alpha):
cdef Py_ssize_t i
...
...
@@ -94,8 +97,8 @@ currently supports OpenMP, but later on more backends might be supported.
Example with thread-local buffers::
from cython.parallel import
*
from libc.stdlib cimport abort
, malloc, free
from cython.parallel import
parallel, prange
from libc.stdlib cimport abort
cdef Py_ssize_t idx, i, n = 100
cdef int * local_buf
...
...
docs/todo.txt
deleted
100644 → 0
View file @
8f5fd6c0
Background
----------
[brain dump]
The "Old Cython Users Guide" is a derivative of the old Pyrex documentation. It underwent substantial editing by Peter Alexandar
to become the Reference Guide, which is oriented around bullet points
and lists rather than prose. This transition was incomplete.
At nearly the same time, Robert, Dag, and Stefan wrote a tutorial as
part of the SciPy proceedings. It was felt that the content there was
cleaner and more up to date than anything else, and this became the
basis for the "Getting Started" and "Tutorials" sections. However,
it simply doesn't have as much content as the old documentation used to.
Eventually, it seems all of the old users manual could be whittled
down into independent tutorial topics. Much discussion of what we'd
like to see is at
http://www.mail-archive.com/cython-dev@codespeak.net/msg06945.html
There is currently a huge amount of redundancy, but no one section has
it all.
Also, we should go through the wiki enhancement proposal list and make sure to transfer the (done) ones into the user manual.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment