Author: Uri Blass
Date: 12:39:05 01/20/03
Go up one level in this thread
On January 20, 2003 at 15:33:28, Robert Hyatt 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.
>
>That is because that is not used on the X86 machines. :)
>
>That is only useful on the macintosh or something based on the power-pc
>chip.
>
>
>>
>>int FirstOne(register BITBOARD a) {
>> register unsigned long i;
>>
>> if (i = a >> 32)
>> return(__cntlzw(i));
>> if (i = (unsigned int) a)
>> return(__cntlzw(i) + 32);
>> return(64);
>>}
>>
>>I can understand only the second one.
>>
>>int FirstOne(BITBOARD arg1) {
>> if (arg1>>48)
>> return (first_ones[arg1>>48]);
>> if ((arg1>>32)&65535)
>> return (first_ones[(arg1>>32)&65535]+16);
>> if ((arg1>>16)&65535)
>> return (first_ones[(arg1>>16)&65535]+32);
>> return (first_ones[arg1&65535]+48);
>>}
>>
>>I also want to know if there is a faster algorithm to find all 1's if I do not
>>care about the order when in most cases there is a small number of 1's.
>
>find all 1's?? do you mean "count all ones?"
No
I want to evaluate weak pawns but I want to find their squares.
I have a bitboard with the isolated pawns and I want to evaluate only the
isolated pawns(not based on the number of ones).
I can go in a loop on all the pawns but it is waste of time if I do nothing when
the pawn is not isolated.
Uri
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.