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
Boxiang Sun
cython
Commits
04a8c7fe
Commit
04a8c7fe
authored
Jul 11, 2011
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue comment only when applicable, set __pyx_parallel_why omp shared
parent
3a446eee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+12
-6
No files found.
Cython/Compiler/Nodes.py
View file @
04a8c7fe
...
...
@@ -6023,15 +6023,21 @@ class ParallelStatNode(StatNode, ParallelNode):
"thread-private variable"
)
def
initialize_privates_to_nan
(
self
,
code
,
exclude
=
None
):
code
.
putln
(
"/* Initialize private variables to invalid values */"
)
first
=
True
for
entry
,
op
in
self
.
privates
.
iteritems
():
if
not
op
and
(
not
exclude
or
entry
!=
exclude
):
invalid_value
=
entry
.
type
.
invalid_value
()
if
invalid_value
:
code
.
globalstate
.
use_utility_code
(
if
first
:
code
.
putln
(
"/* Initialize private variables to "
"invalid values */"
)
code
.
globalstate
.
use_utility_code
(
invalid_values_utility_code
)
first
=
False
have_invalid_values
=
True
code
.
putln
(
"%s = %s;"
%
(
entry
.
cname
,
entry
.
type
.
cast_code
(
invalid_value
)))
...
...
@@ -6091,6 +6097,8 @@ class ParallelStatNode(StatNode, ParallelNode):
if
temps
:
c
=
self
.
privatization_insertion_point
c
.
put
(
" private(%s)"
%
", "
.
join
(
temps
))
if
self
.
breaking_label_used
:
c
.
put
(
" shared(__pyx_parallel_why)"
)
def
setup_parallel_control_flow_block
(
self
,
code
):
"""
...
...
@@ -6553,11 +6561,9 @@ class ParallelRangeNode(ParallelStatNode):
code
.
funcstate
.
start_collecting_temps
()
self
.
body
.
generate_execution_code
(
code
)
if
self
.
is_parallel
:
self
.
privatize_temps
(
code
)
self
.
trap_parallel_exit
(
code
,
should_flush
=
True
)
self
.
privatize_temps
(
code
)
if
self
.
breaking_label_used
:
# Put a guard around the loop body in case return, break or
# exceptions might be used
...
...
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