Show More
@@ -175,9 +175,15 b' class CythonMagics(Magics):' | |||||
175 | namespace. The usage is similar to that of `%%cython_pyximport` but |
|
175 | namespace. The usage is similar to that of `%%cython_pyximport` but | |
176 | you don't have to pass a module name:: |
|
176 | you don't have to pass a module name:: | |
177 |
|
177 | |||
178 | %%cython |
|
178 | %%cython | |
179 | def f(x): |
|
179 | def f(x): | |
180 | return 2.0*x |
|
180 | return 2.0*x | |
|
181 | ||||
|
182 | To compile OpenMP codes, pass the required `--compile-args` | |||
|
183 | and `--link-args`. For example with gcc:: | |||
|
184 | ||||
|
185 | %%cython --compile-args=-fopenmp --link-args=-fopenmp | |||
|
186 | ... | |||
181 | """ |
|
187 | """ | |
182 | args = magic_arguments.parse_argstring(self.cython, line) |
|
188 | args = magic_arguments.parse_argstring(self.cython, line) | |
183 | code = cell if cell.endswith('\n') else cell+'\n' |
|
189 | code = cell if cell.endswith('\n') else cell+'\n' |
General Comments 0
You need to be logged in to leave comments.
Login now