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

Update barrier_arrive_tx.md docs #1147

Merged
merged 2 commits into from
Nov 24, 2023
Merged
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
@@ -16,7 +16,7 @@ cuda::device::barrier_arrive_tx(
ptrdiff_t transaction_count_update);
```

Arrives at a barrier in shared memory, updating both the arrival count and
Arrives at a barrier in shared memory, decrementing the arrival count and incrementing the expected
transaction count.

## Preconditions
@@ -29,7 +29,7 @@ transaction count.
## Effects

* This function constructs an arrival_token object associated with the phase
synchronization point for the current phase. Then, decrements the expected
synchronization point for the current phase. Then, decrements the
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "expected arrival count" - the value the barrier is reset to after a phase change - is only decremented by arrive_and_drop, arrive decrements the arrival count (the count that is tested against zero, and on a phase change is reseted to the "expected arrival count").

arrival count by `arrive_count_update` and increments the expected transaction
count by `transaction_count_update`.
* This function executes atomically. The call to this function strongly
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ void cuda::device::barrier_expect_tx(
ptrdiff_t transaction_count_update);
```

Updates the expected transaction count of a barrier in shared memory.
Increments the expected transaction count of a barrier in shared memory.

## Preconditions