Skip to content

Add --end flag - #34

Open
tobfal wants to merge 1 commit into
MinecraftAtHome:mainfrom
tobfal:feat/end-flag
Open

Add --end flag#34
tobfal wants to merge 1 commit into
MinecraftAtHome:mainfrom
tobfal:feat/end-flag

Conversation

@tobfal

@tobfal tobfal commented Aug 1, 2026

Copy link
Copy Markdown

Closes #12.

Adds --end <seed> to bound the searched range.

SeedIterator takes an optional upper bound. next() returns an empty optional once the range is used up, the GPU loop breaks on that before dispatching, and the main loop stops once the range has been handed out. Without --end nothing changes.

Bounds are compared by distance from the start rather than by absolute position, so a range may cross zero or 2^63. --end requires --start and must differ from it.

Seeds are handed out in blocks of 2^28, so a range is rounded up to the next block boundary.

"Total seeds checked" overcounts by one block per GPU thread, since each performs a final fetch_add before seeing the empty optional. Left that as is at the moment.

Verified on Windows across both boundaries.

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.

--end flag

1 participant