Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is there a bitscan forward/reverse in CUDA

Slight odd situation I had but I wish to use the BSF/BSR instruction inside CUDA. Just wondering if there’s any way to run this instruction in CUDA without a lot of overhead.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

The list of integer intrinsics is available in the documentation. You can use the __clz intrinsic for example to mimic BSR. For BSF, I think __ffs should do most of the job.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading