Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: question about using firstone in bitboard

Author: Robert Hyatt

Date: 15:06:30 01/20/03

Go up one level in this thread


On January 20, 2003 at 15:59:52, Matt Taylor wrote:

>On January 20, 2003 at 14:06:15, Uri Blass wrote:
>
>>I find in crafty 2 functions for firstone
>>
>>The first function is something has some function cntlzw that I am unable to
>>understand.
>
>The cntlzw is an intrinsic for "count leading zeros in a word." Since Dr. Hyatt
>orders his bitboards in reverse (i.e. MSB = bit 0, LSB = bit 63), the count
>leading zeros will give him the index.
>

I did this because Cray has always had the _same_ instruction.  leadz for
count leading zeros.

:)


>As far as I can tell, the least significant bit is the easiest to pull out. I've
>still got my optimized "bit scan & reset" algorithms that work for LSB = bit 0
>and MSB = bit 63. I'm working on one last variant, but I think the winner is
>already clear. Per request, I will be posting results here soon.
>
>-Matt



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.