Skip to content

Commit

Permalink
enabled sync statement to use ATMI
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwinma committed Jun 14, 2017
1 parent 49b3883 commit b764626
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/AST/build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2940,7 +2940,11 @@ buildSyncStmt(Expr* stmt) {
block->insertAtTail(new CallExpr(PRIM_MOVE, endCountSave, new CallExpr(PRIM_GET_END_COUNT)));
block->insertAtTail(new CallExpr(PRIM_SET_END_COUNT, new CallExpr("_endCountAlloc", /* forceLocalTypes= */gFalse)));
block->insertAtTail(stmt);
#ifndef TARGET_HSA
block->insertAtTail(new CallExpr("_waitEndCount"));
#else
block->insertAtTail(new CallExpr("_finalizeTaskGroup"));
#endif
block->insertAtTail(new CallExpr("_endCountFree", new CallExpr(PRIM_GET_END_COUNT)));
block->insertAtTail(new CallExpr(PRIM_SET_END_COUNT, endCountSave));
return block;
Expand Down

0 comments on commit b764626

Please sign in to comment.