gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] Semeai


From: Gunnar Farneback
Subject: Re: [gnugo-devel] Semeai
Date: Sun, 27 Jan 2002 18:15:31 +0100
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode)

Dan wrote:
> > This should also be rr_set_result_move2().
> 
> Looks like that macro needed result2 in it:
> 
> /* Variation with two results. */
> #define rr_set_result_move2(rr, result1, result2, move) \
>         (rr).data2 = (((rr).data2 & 0x3ff) | (2 << 28) \
>                       | (((result1) & 0x0f) << 24) \
>                       | (((result2) & 0x0f) << 20) \
>                       | (((move) & 0x3ff) << 10))

Yes, indeed.

> What is the meaning of the 2 << 28?

It sets the status field to value 2, meaning that the computation of
the result has been finished.

|  * The data2 field packs into 32 bits the following
|  * fields:
|  *
|  * status :   2 bits (0 free, 1 open, 2 closed)
|  * result1:   4 bits
|  * result2:   4 bits
|  * move   :  10 bits
|  * str2   :  10 bits
| [...]
| #define rr_get_status(rr)      (((rr).data2 >> 28) & 0x03)

/Gunnar



reply via email to

[Prev in Thread] Current Thread [Next in Thread]