Skip to content

Correct stride pseudocode in p27#240

Open
dunnoconnor wants to merge 1 commit intomainfrom
mdoc/27
Open

Correct stride pseudocode in p27#240
dunnoconnor wants to merge 1 commit intomainfrom
mdoc/27

Conversation

@dunnoconnor
Copy link
Copy Markdown
Member

This pull request updates the reduction loop in the block-wide reduction examples for both the English and Korean versions of Puzzle 27. The main change is replacing the Python for loop with a while loop that halves the stride at each iteration, making the reduction logic clearer and more idiomatic for parallel programming.

Reduction loop logic update:

  • Replaced the for stride in range(64, 0, -1): loop with a while stride > 0: loop, initializing stride = 64 and halving it each iteration using stride //= 2, in both the English (book/src/puzzle_27/puzzle_27.md) and Korean (book/i18n/ko/src/puzzle_27/puzzle_27.md) documentation. [1] [2] [3] [4]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant