Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port barrier tests from Lift #220

Merged
merged 4 commits into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ object AdjustArraySizesForAllocations {

case Map(_, _, _, _, _, a) => visitAndGatherInformation(a, parallInfo)

// TODO: think more about these two, what about the indices?
case Gather(_, _, _, indices, a) => visitAndGatherInformation(a, parallInfo)
case Scatter(_, _, _, indices, a) => visitAndGatherInformation(a, parallInfo)

case pattern => throw new Exception(s"this should not happen for now: $pattern")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ object InsertMemoryBarriers {
collectWrites(a, allocs, writes); collectWrites(b, allocs, writes)
case TakeAcc(_, _, _, a) => collectWrites(a, allocs, writes)
case TransposeAcc(_, _, _, a) => collectWrites(a, allocs, writes)
// TODO: collect reads in indices?
case ScatterAcc(_, _, _, indices, a) =>
/* collectReads(indices, allocs, reads); */ collectWrites(a, allocs, writes)
case UnzipAcc(_, _, _, a) => collectWrites(a, allocs, writes)
case _ => throw new Exception(s"did not expect $a")
}
}
Expand Down
Loading