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

bmi2 codepath for nthsetbit #171

Open
Sopel97 opened this issue Apr 3, 2022 · 0 comments
Open

bmi2 codepath for nthsetbit #171

Sopel97 opened this issue Apr 3, 2022 · 0 comments

Comments

@Sopel97
Copy link
Member

Sopel97 commented Apr 3, 2022

https://github.com/glinscott/nnue-pytorch/blob/7d47cad764a95d4ad69f1b14a4a0722f1db63911/lib/nnue_training_data_formats.h#L264

revoof on discord suggested:

nthSetBitIndex could be _tzcnt_u64(_pdep_u64(1ULL << n, v)) if fast bmi2 is available

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

No branches or pull requests

1 participant