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
Kirill Smelkov
cython
Commits
7a48a98d
Commit
7a48a98d
authored
Jun 22, 2018
by
scoder
Committed by
GitHub
Jun 22, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2393 from gabrieldemarmiesse/test_parallelism_4
Added tests to "Using Parallelism" part 4
parents
323f6a47
956ff7b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
19 deletions
+20
-19
docs/examples/userguide/parallelism/setup.py
docs/examples/userguide/parallelism/setup.py
+17
-0
docs/src/userguide/parallelism.rst
docs/src/userguide/parallelism.rst
+3
-19
No files found.
docs/examples/userguide/parallelism/setup.py
0 → 100644
View file @
7a48a98d
from
distutils.core
import
setup
from
distutils.extension
import
Extension
from
Cython.Build
import
cythonize
ext_modules
=
[
Extension
(
"hello"
,
[
"hello.pyx"
],
extra_compile_args
=
[
'-fopenmp'
],
extra_link_args
=
[
'-fopenmp'
],
)
]
setup
(
name
=
'hello-parallel-world'
,
ext_modules
=
cythonize
(
ext_modules
),
)
docs/src/userguide/parallelism.rst
View file @
7a48a98d
...
...
@@ -157,25 +157,9 @@ Compiling
=========
To actually use the OpenMP support, you need to tell the C or C++ compiler to
enable OpenMP. For gcc this can be done as follows in a setup.py::
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
ext_modules = [
Extension(
"hello",
["hello.pyx"],
extra_compile_args=['-fopenmp'],
extra_link_args=['-fopenmp'],
)
]
setup(
name='hello-parallel-world',
ext_modules=cythonize(ext_modules),
)
enable OpenMP. For gcc this can be done as follows in a setup.py:
.. literalinclude:: ../../examples/userguide/parallelism/setup.py
For Microsoft Visual C++ compiler, use ``'/openmp'`` instead of ``'-fopenmp'``.
...
...
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