Commit 7a48a98d authored by scoder's avatar scoder Committed by GitHub

Merge pull request #2393 from gabrieldemarmiesse/test_parallelism_4

Added tests to "Using Parallelism" part 4
parents 323f6a47 956ff7b2
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),
)
...@@ -157,25 +157,9 @@ Compiling ...@@ -157,25 +157,9 @@ Compiling
========= =========
To actually use the OpenMP support, you need to tell the C or C++ compiler to 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:: enable OpenMP. For gcc this can be done as follows in a setup.py:
from distutils.core import setup .. literalinclude:: ../../examples/userguide/parallelism/setup.py
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),
)
For Microsoft Visual C++ compiler, use ``'/openmp'`` instead of ``'-fopenmp'``. For Microsoft Visual C++ compiler, use ``'/openmp'`` instead of ``'-fopenmp'``.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment