Commit 4855fccb authored by Mark Florisson's avatar Mark Florisson

Make pyobject temps firstprivate

parent 3ddd9709
......@@ -6101,16 +6101,20 @@ class ParallelStatNode(StatNode, ParallelNode):
code.start_collecting_temps() should have been called.
"""
if self.is_parallel:
private_cnames = cython.set([e.cname for e in self.privates])
c = self.privatization_insertion_point
temps = []
for cname, type in code.funcstate.stop_collecting_temps():
if not type.is_pyobject:
temps.append(cname)
temps = code.funcstate.stop_collecting_temps()
privates, firstprivates = [], []
for temp, type in temps:
if type.is_pyobject:
firstprivates.append(temp)
else:
privates.append(temp)
c = self.privatization_insertion_point
if temps:
c.put(" private(%s)" % ", ".join(temps))
if privates:
c.put(" private(%s)" % ", ".join(privates))
if firstprivates:
c.put(" firstprivate(%s)" % ", ".join(firstprivates))
if self.breaking_label_used:
shared_vars = [Naming.parallel_why]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment