Triton Repository branch, master, updated. f1d517b2a0f7699f2832fd2711b6a9fa59ebecf1
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Triton Repository". The branch, master has been updated via f1d517b2a0f7699f2832fd2711b6a9fa59ebecf1 (commit) via c2ac4d2b97a21717c1a21d748ee139971555eff3 (commit) from 6b345fe8aeb7140b8691d17ca5140b183943fbdf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f1d517b2a0f7699f2832fd2711b6a9fa59ebecf1 Author: slang <[email protected]> Date: Thu Jul 1 16:22:22 2010 -0500 more fixes after lone pbranch changes commit c2ac4d2b97a21717c1a21d748ee139971555eff3 Author: slang <[email protected]> Date: Thu Jul 1 16:10:08 2010 -0500 fix for pbranch that doesn't post a blocking op. Introduced with lone pbranch additions. ----------------------------------------------------------------------- Summary of changes: code/src/aesop/ae-blocking-parser.h | 54 +++++++++---------- code/src/aesop/parser/ae-blocking-parser.lhs | 6 +- .../aesop/parser/tests/blocking/parallelfor2.ae | 2 +- 3 files changed, 30 insertions(+), 32 deletions(-) Diff of changes: diff --git a/code/src/aesop/ae-blocking-parser.h b/code/src/aesop/ae-blocking-parser.h index 2bc6fd0..c7b5c18 100644 --- a/code/src/aesop/ae-blocking-parser.h +++ b/code/src/aesop/ae-blocking-parser.h @@ -157,30 +157,29 @@ } #define AE_MK_PBRANCH_POST_DECLS(__ctl_type) \ - struct __ctl_type * child_ctl, *parent_ctl; + struct __ctl_type *parent_ctl; #define AE_MK_PBRANCH_POST_STMTS(__pwait_ctl, __ctl_type, __fname, __location, __pbranch_id) \ { \ parent_ctl = ctl; \ - child_ctl = malloc(sizeof(*child_ctl)); \ - if(child_ctl == NULL) \ + ctl = malloc(sizeof(*ctl)); \ + if(ctl == NULL) \ { \ triton_err(triton_log_default, "INVALID STATE: %s:%d: memory allocation for control structure failed!\n", #__fname, __location); \ - assert(child_ctl != NULL); \ + assert(ctl != NULL); \ goto __ae_##__pbranch_id##_end; \ } \ - ae_ctl_init(&child_ctl->gen, #__ctl_type ":" #__pbranch_id, NULL, ctl->gen.context); \ - child_ctl->parent = ctl; \ - ae_hints_copy(ctl->gen.hints, &child_ctl->gen.hints); \ - child_ctl->params = ctl->params; \ - memcpy(&child_ctl->__pwait_ctl.private, &ctl->__pwait_ctl.private, sizeof(child_ctl->__pwait_ctl.private)); \ - child_ctl->__pwait_ctl.shared_params = &ctl->__pwait_ctl.shared; \ - ctl = child_ctl; \ - triton_mutex_lock(&child_ctl->parent->gen.mutex); \ - child_ctl->parent->gen.posted++; \ - triton_list_link_clear(&child_ctl->gen.link); \ - triton_queue_enqueue(&child_ctl->gen.link, &child_ctl->parent->gen.children); \ - triton_mutex_unlock(&child_ctl->parent->gen.mutex); \ + ae_ctl_init(&ctl->gen, #__ctl_type ":" #__pbranch_id, NULL, ctl->gen.context); \ + ctl->parent = parent_ctl; \ + ae_hints_copy(parent_ctl->gen.hints, &ctl->gen.hints); \ + ctl->params = parent_ctl->params; \ + memcpy(&ctl->__pwait_ctl.private, &parent_ctl->__pwait_ctl.private, sizeof(ctl->__pwait_ctl.private)); \ + ctl->__pwait_ctl.shared_params = &parent_ctl->__pwait_ctl.shared; \ + triton_mutex_lock(&ctl->parent->gen.mutex); \ + ctl->parent->gen.posted++; \ + triton_list_link_clear(&ctl->gen.link); \ + triton_queue_enqueue(&ctl->gen.link, &ctl->parent->gen.children); \ + triton_mutex_unlock(&ctl->parent->gen.mutex); \ } #define AE_MK_PBRANCH_POST_END_STMTS(__pwait_ctl, __ctl_type, __fname, __location, __pbranch_id) \ @@ -189,26 +188,25 @@ } #define AE_MK_LONE_PBRANCH_POST_DECLS(__ctl_type) \ - struct __ctl_type * child_ctl, *parent_ctl; + struct __ctl_type *parent_ctl; #define AE_MK_LONE_PBRANCH_POST_STMTS(__ctl_type, __fname, __location, __pbranch_id) \ { \ parent_ctl = ctl; \ - child_ctl = malloc(sizeof(*child_ctl)); \ - if(child_ctl == NULL) \ + ctl = malloc(sizeof(*ctl)); \ + if(ctl == NULL) \ { \ triton_err(triton_log_default, "INVALID STATE: %s:%d: memory allocation for control structure failed!\n", #__fname, __location); \ - assert(child_ctl != NULL); \ + assert(ctl != NULL); \ goto __ae_##__pbranch_id##_end; \ } \ - ae_ctl_init(&child_ctl->gen, #__ctl_type ":" #__pbranch_id, NULL, ctl->gen.context); \ - child_ctl->parent = ctl; \ - ae_hints_copy(ctl->gen.hints, &child_ctl->gen.hints); \ - child_ctl->params = ctl->params; \ - ctl = child_ctl; \ - triton_list_link_clear(&child_ctl->gen.link); \ - ae_lone_pbranches_add(&child_ctl->gen); \ - ae_ctl_refinc(&child_ctl->parent->gen); \ + ae_ctl_init(&ctl->gen, #__ctl_type ":" #__pbranch_id, NULL, ctl->gen.context); \ + ctl->parent = parent_ctl; \ + ae_hints_copy(parent_ctl->gen.hints, &ctl->gen.hints); \ + ctl->params = parent_ctl->params; \ + triton_list_link_clear(&ctl->gen.link); \ + ae_lone_pbranches_add(&ctl->gen); \ + ae_ctl_refinc(&ctl->parent->gen); \ } #define AE_MK_LONE_PBRANCH_POST_END_STMTS(__ctl_type, __fname, __location, __pbranch_id) \ diff --git a/code/src/aesop/parser/ae-blocking-parser.lhs b/code/src/aesop/parser/ae-blocking-parser.lhs index b04fbfe..817e86d 100644 --- a/code/src/aesop/parser/ae-blocking-parser.lhs +++ b/code/src/aesop/parser/ae-blocking-parser.lhs @@ -1082,7 +1082,7 @@ Special case where the if has blocking call(s), but the else doesn't (an else ma
pwaitCtx = getPWaitAncestor pb
(pbreakDecls, pbreakStmts) <- mkPBreakStmts pp ni
-> (pbranchDecls, pbranchStart) <- mkPBranchPostStartStmts "child_ctl" fname ni +> (pbranchDecls, pbranchStart) <- mkPBranchPostStartStmts "ctl" fname ni
setDoneCtlStmt <- mkDoneCtlSetStmt pp ni afterPWaitStmts <- generateAfterStmts pwaitCtx [] pbDone <- getPBDone
@@ -1098,7 +1098,7 @@ Special case where the if has blocking call(s), but the else doesn't (an else ma
afterPWaitStmts) ni) tlBeforeStmts
afterPBranchNBStmts <- translateForCB pb (nbStmtsAfter pb) -> pushPrefix "child_ctl" +> -- pushPrefix "child_ctl" tlPBDeclInits <- translateForCB b pbDeclInits tlCtxInits <- translateForCB b ctxInitStmts setPBDone mkPBranchPostDoneStmts @@ -1106,7 +1106,7 @@ Special case where the if has blocking call(s), but the else doesn't (an else ma cp <- getPrefix branchStmts <- mkPBranchPostStmts pb pwaitName cp pp (getParentName pb) (tlPBDeclInits ++ beforeStmts ++ tlCtxInits ++ branchPostStmts) (nodeInfo branchDef) -> popPrefix +> -- popPrefix return $ branchStmts ++ pbend ++ afterPBranchNBStmts
getParallelStmts pw@(PWaitContext _ waitDef waitStmts@(w:ws) before after parent next prev) tr = do diff --git a/code/src/aesop/parser/tests/blocking/parallelfor2.ae b/code/src/aesop/parser/tests/blocking/parallelfor2.ae index bfae47f..794c5d9 100644 --- a/code/src/aesop/parser/tests/blocking/parallelfor2.ae +++ b/code/src/aesop/parser/tests/blocking/parallelfor2.ae @@ -15,7 +15,7 @@ static __blocking void run_parfor(
pwait { - int i; + pprivate int i; for (i = 0; i < 2; ++i) { pbranch hooks/post-receive -- Triton Repository
participants (1)
-
noreply@mcs.anl.gov