Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: questions about using popcount function to count bitboard

Author: Bas Hamstra

Date: 08:12:14 01/11/03

Go up one level in this thread


On January 11, 2003 at 01:16:43, Dieter Buerssner wrote:

>On January 10, 2003 at 15:31:05, Bas Hamstra wrote:
>
>>inline int PopCnt(BB BitBoard)
>>
>>{    unsigned char* p = (unsigned char*) BitBoard;
>
>Unless BB is a pointer type, you will need an adress of:
>
>      unsigned char* p = (unsigned char*) &BitBoard;
>
>
>>     return PopCnt8[p[0]] + PopCnt8[p[1]] ... + PopCnt8[p[7]];
>>}
>
>Regards,
>Dieter

Yes Dieter, thanks for the correction.

Bas.



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.