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
Boxiang Sun
cython
Commits
c92a6ad8
Commit
c92a6ad8
authored
May 06, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fixes in parallelism docs
parent
00eff3c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
docs/src/userguide/parallelism.rst
docs/src/userguide/parallelism.rst
+7
-7
No files found.
docs/src/userguide/parallelism.rst
View file @
c92a6ad8
...
...
@@ -130,7 +130,7 @@ __ nogil_
abort()
# populate our local buffer in a sequential loop
for i
dx in
range(size):
for i
in x
range(size):
local_buf[i] = i * 2
# share the work using the thread-local buffer(s)
...
...
@@ -145,7 +145,7 @@ __ nogil_
.. function:: threadid()
Returns the id of the thread. For n threads, the ids will range from 0 to
n.
n
-1
.
Compiling
=========
...
...
@@ -169,11 +169,11 @@ enable OpenMP. For gcc this can be done as follows in a setup.py::
ext_modules = [ext_module],
)
Breaking
========
The parallel with and prange blocks support
break, continue and return in
nogil mode. Additionally, it is valid to use a ``with gil`` block inside these
blocks, and have exceptions propagate from them.
Breaking
out of loops
========
=============
The parallel with and prange blocks support
the statements break, continue and
return in nogil mode. Additionally, it is valid to use a ``with gil`` block
inside these
blocks, and have exceptions propagate from them.
However, because the blocks use OpenMP, they can not just be left, so the
exiting procedure is best-effort. For prange() this means that the loop
body is skipped after the first break, return or exception for any subsequent
...
...
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