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
4817877f
Commit
4817877f
authored
Feb 14, 2012
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cython.parallel c89 compat
parent
9032091b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+7
-5
No files found.
Cython/Compiler/Nodes.py
View file @
4817877f
...
@@ -7037,7 +7037,8 @@ class ParallelStatNode(StatNode, ParallelNode):
...
@@ -7037,7 +7037,8 @@ class ParallelStatNode(StatNode, ParallelNode):
error
(
self
.
pos
,
error
(
self
.
pos
,
"argument to num_threads must be greater than 0"
)
"argument to num_threads must be greater than 0"
)
self
.
num_threads
=
self
.
num_threads
.
coerce_to
(
if
not
self
.
num_threads
.
is_simple
():
self
.
num_threads
=
self
.
num_threads
.
coerce_to
(
PyrexTypes
.
c_int_type
,
env
).
coerce_to_temp
(
env
)
PyrexTypes
.
c_int_type
,
env
).
coerce_to_temp
(
env
)
def
analyse_sharing_attributes
(
self
,
env
):
def
analyse_sharing_attributes
(
self
,
env
):
...
@@ -7180,7 +7181,7 @@ class ParallelStatNode(StatNode, ParallelNode):
...
@@ -7180,7 +7181,7 @@ class ParallelStatNode(StatNode, ParallelNode):
entry
.
type
.
cast_code
(
invalid_value
)))
entry
.
type
.
cast_code
(
invalid_value
)))
def
evaluate_before_block
(
self
,
code
,
expr
):
def
evaluate_before_block
(
self
,
code
,
expr
):
c
=
self
.
begin_of_parallel_control_block_point
c
=
self
.
begin_of_parallel_control_block_point
_after_decls
# we need to set the owner to ourselves temporarily, as
# we need to set the owner to ourselves temporarily, as
# allocate_temp may generate a comment in the middle of our pragma
# allocate_temp may generate a comment in the middle of our pragma
# otherwise when DebugFlags.debug_temp_code_comments is in effect
# otherwise when DebugFlags.debug_temp_code_comments is in effect
...
@@ -7297,6 +7298,7 @@ class ParallelStatNode(StatNode, ParallelNode):
...
@@ -7297,6 +7298,7 @@ class ParallelStatNode(StatNode, ParallelNode):
code
.
begin_block
()
# parallel control flow block
code
.
begin_block
()
# parallel control flow block
self
.
begin_of_parallel_control_block_point
=
code
.
insertion_point
()
self
.
begin_of_parallel_control_block_point
=
code
.
insertion_point
()
self
.
begin_of_parallel_control_block_point_after_decls
=
code
.
insertion_point
()
def
begin_parallel_block
(
self
,
code
):
def
begin_parallel_block
(
self
,
code
):
"""
"""
...
@@ -7537,11 +7539,11 @@ class ParallelStatNode(StatNode, ParallelNode):
...
@@ -7537,11 +7539,11 @@ class ParallelStatNode(StatNode, ParallelNode):
# Firstly, always prefer errors over returning, continue or break
# Firstly, always prefer errors over returning, continue or break
if
self
.
error_label_used
:
if
self
.
error_label_used
:
c
.
putln
(
"const char *%s
; int %s, %s;"
%
self
.
parallel_pos_info
)
c
.
putln
(
"const char *%s
= NULL; int %s = 0, %s = 0;"
%
c
.
putln
(
"%s = NULL; %s = %s = 0;"
%
self
.
parallel_pos_info
)
self
.
parallel_pos_info
)
c
.
putln
(
"PyObject *%s = NULL, *%s = NULL, *%s = NULL;"
%
c
.
putln
(
"PyObject *%s = NULL, *%s = NULL, *%s = NULL;"
%
self
.
parallel_exc
)
self
.
parallel_exc
)
code
.
putln
(
code
.
putln
(
"if (%s) {"
%
Naming
.
parallel_exc_type
)
"if (%s) {"
%
Naming
.
parallel_exc_type
)
...
...
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