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
Xavier Thompson
cython
Commits
359ba798
Commit
359ba798
authored
Aug 20, 2011
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow 'from cython cimport parallel'
parent
9d91a4ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+3
-1
tests/errors/e_cython_parallel.pyx
tests/errors/e_cython_parallel.pyx
+5
-0
No files found.
Cython/Compiler/ParseTreeTransforms.py
View file @
359ba798
...
@@ -696,7 +696,9 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
...
@@ -696,7 +696,9 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
if
result
:
if
result
:
directive
=
full_name
.
split
(
'.'
)
directive
=
full_name
.
split
(
'.'
)
if
full_name
==
u"cython.parallel.*"
:
if
full_name
==
u"cython.parallel"
:
self
.
parallel_directives
[
u"parallel"
]
=
u"cython.parallel"
elif
full_name
==
u"cython.parallel.*"
:
for
name
in
self
.
valid_parallel_directives
:
for
name
in
self
.
valid_parallel_directives
:
self
.
parallel_directives
[
name
]
=
u"cython.parallel.%s"
%
name
self
.
parallel_directives
[
name
]
=
u"cython.parallel.%s"
%
name
elif
(
len
(
directive
)
!=
3
or
elif
(
len
(
directive
)
!=
3
or
...
...
tests/errors/e_cython_parallel.pyx
View file @
359ba798
...
@@ -121,6 +121,11 @@ for i in prange(10, nogil=True):
...
@@ -121,6 +121,11 @@ for i in prange(10, nogil=True):
for
pyobj
in
prange
(
"hello"
):
for
pyobj
in
prange
(
"hello"
):
pass
pass
from
cython
import
parallel
with
nogil
,
parallel
.
parallel
():
for
i
in
parallel
.
prange
(
10
):
pass
_ERRORS
=
u"""
_ERRORS
=
u"""
e_cython_parallel.pyx:3:8: cython.parallel.parallel is not a module
e_cython_parallel.pyx:3:8: cython.parallel.parallel is not a module
e_cython_parallel.pyx:4:0: No such directive: cython.parallel.something
e_cython_parallel.pyx:4:0: No such directive: cython.parallel.something
...
...
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