summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoon Ro <joon.ro@outlook.com>2016-05-13 14:02:50 -0700
committerStefan Behnel <stefan_ml@behnel.de>2016-07-15 08:12:49 +0200
commitd9a5b0602e799c65f1bbea36d12f912d4abc9047 (patch)
tree3ea935cfd243c9e66159ef02c82b7b5cd69b682f
parent65dab3735909d560bbe09ef6bf4d10a77ac4d4f3 (diff)
downloadcython-d9a5b0602e799c65f1bbea36d12f912d4abc9047.tar.gz
+ setup.py instructions for Visual C++ compiler
Add setup.py openMP instructions for Microsoft Visual C++ compiler
-rw-r--r--docs/src/userguide/parallelism.rst18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/src/userguide/parallelism.rst b/docs/src/userguide/parallelism.rst
index 43a549a4c..075fead40 100644
--- a/docs/src/userguide/parallelism.rst
+++ b/docs/src/userguide/parallelism.rst
@@ -182,6 +182,24 @@ enable OpenMP. For gcc this can be done as follows in a setup.py::
ext_modules = [ext_module],
)
+For Microsoft Visual C++ compiler::
+
+ from distutils.core import setup
+ from distutils.extension import Extension
+ from Cython.Distutils import build_ext
+
+ ext_module = Extension(
+ "hello",
+ ["hello.pyx"],
+ extra_compile_args=['/openmp'],
+ )
+
+ setup(
+ name = 'Hello world app',
+ cmdclass = {'build_ext': build_ext},
+ ext_modules = [ext_module],
+ )
+
Breaking out of loops
=====================
The parallel with and prange blocks support the statements break, continue and