##// END OF EJS Templates
Document OpenMP in %%cython magic
Bradley M. Froehle -
Show More
@@ -158,9 +158,15 b' class CythonMagics(Magics):'
158 namespace. The usage is similar to that of `%%cython_pyximport` but
158 namespace. The usage is similar to that of `%%cython_pyximport` but
159 you don't have to pass a module name::
159 you don't have to pass a module name::
160
160
161 %%cython
161 %%cython
162 def f(x):
162 def f(x):
163 return 2.0*x
163 return 2.0*x
164
165 To compile OpenMP codes, pass the required `--compile-args`
166 and `--link-args`. For example with gcc::
167
168 %%cython --compile-args=-fopenmp --link-args=-fopenmp
169 ...
164 """
170 """
165 args = magic_arguments.parse_argstring(self.cython, line)
171 args = magic_arguments.parse_argstring(self.cython, line)
166 code = cell if cell.endswith('\n') else cell+'\n'
172 code = cell if cell.endswith('\n') else cell+'\n'
General Comments 0
You need to be logged in to leave comments. Login now