Add test to use numpy.fromfunc.

Depends on numpy branch "ufunc-from-function-pointer" in git://github.com/jayvius/numpy.git
This commit is contained in:
Siu Kwan Lam 2012-08-06 17:02:04 -07:00
commit b5893d4ebb
3 changed files with 52 additions and 10 deletions

View file

@ -151,11 +151,12 @@ class ParallelUFunc(CDefinition):
for t in range(ThreadCount):
cur_ctxt = contexts[t].as_struct(Context)
total_completed += cur_ctxt.completed
self.debug(cur_ctxt.id, 'completed', cur_ctxt.completed)
# self.debug(cur_ctxt.id, 'completed', cur_ctxt.completed)
with self.ifelse( total_completed == N ) as ifelse:
with ifelse.then():
self.debug("All is well!")
# self.debug("All is well!")
pass # keep quite if all is well
with ifelse.otherwise():
self.debug("ERROR: race occurred! Trigger segfault")
self.unreachable()