My Project
Functions | Variables
count_last_flip_bitscan.c File Reference
#include <x86intrin.h>

Functions

static int count_V_flip_reverse (unsigned long long P, int ofs)
 
static int count_last_flip_A1 (const unsigned long long P)
 
static int count_last_flip_B1 (const unsigned long long P)
 
static int count_last_flip_C1 (const unsigned long long P)
 
static int count_last_flip_D1 (const unsigned long long P)
 
static int count_last_flip_E1 (const unsigned long long P)
 
static int count_last_flip_F1 (const unsigned long long P)
 
static int count_last_flip_G1 (const unsigned long long P)
 
static int count_last_flip_H1 (const unsigned long long P)
 
static int count_last_flip_A2 (const unsigned long long P)
 
static int count_last_flip_B2 (const unsigned long long P)
 
static int count_last_flip_C2 (const unsigned long long P)
 
static int count_last_flip_D2 (const unsigned long long P)
 
static int count_last_flip_E2 (const unsigned long long P)
 
static int count_last_flip_F2 (const unsigned long long P)
 
static int count_last_flip_G2 (const unsigned long long P)
 
static int count_last_flip_H2 (const unsigned long long P)
 
static int count_last_flip_A3 (const unsigned long long P)
 
static int count_last_flip_B3 (const unsigned long long P)
 
static int count_last_flip_C3 (const unsigned long long P)
 
static int count_last_flip_D3 (const unsigned long long P)
 
static int count_last_flip_E3 (const unsigned long long P)
 
static int count_last_flip_F3 (const unsigned long long P)
 
static int count_last_flip_G3 (const unsigned long long P)
 
static int count_last_flip_H3 (const unsigned long long P)
 
static int count_last_flip_A4 (const unsigned long long P)
 
static int count_last_flip_B4 (const unsigned long long P)
 
static int count_last_flip_C4 (const unsigned long long P)
 
static int count_last_flip_D4 (const unsigned long long P)
 
static int count_last_flip_E4 (const unsigned long long P)
 
static int count_last_flip_F4 (const unsigned long long P)
 
static int count_last_flip_G4 (const unsigned long long P)
 
static int count_last_flip_H4 (const unsigned long long P)
 
static int count_last_flip_A5 (const unsigned long long P)
 
static int count_last_flip_B5 (const unsigned long long P)
 
static int count_last_flip_C5 (const unsigned long long P)
 
static int count_last_flip_D5 (const unsigned long long P)
 
static int count_last_flip_E5 (const unsigned long long P)
 
static int count_last_flip_F5 (const unsigned long long P)
 
static int count_last_flip_G5 (const unsigned long long P)
 
static int count_last_flip_H5 (const unsigned long long P)
 
static int count_last_flip_A6 (const unsigned long long P)
 
static int count_last_flip_B6 (const unsigned long long P)
 
static int count_last_flip_C6 (const unsigned long long P)
 
static int count_last_flip_D6 (const unsigned long long P)
 
static int count_last_flip_E6 (const unsigned long long P)
 
static int count_last_flip_F6 (const unsigned long long P)
 
static int count_last_flip_G6 (const unsigned long long P)
 
static int count_last_flip_H6 (const unsigned long long P)
 
static int count_last_flip_A7 (const unsigned long long P)
 
static int count_last_flip_B7 (const unsigned long long P)
 
static int count_last_flip_C7 (const unsigned long long P)
 
static int count_last_flip_D7 (const unsigned long long P)
 
static int count_last_flip_E7 (const unsigned long long P)
 
static int count_last_flip_F7 (const unsigned long long P)
 
static int count_last_flip_G7 (const unsigned long long P)
 
static int count_last_flip_H7 (const unsigned long long P)
 
static int count_last_flip_A8 (const unsigned long long P)
 
static int count_last_flip_B8 (const unsigned long long P)
 
static int count_last_flip_C8 (const unsigned long long P)
 
static int count_last_flip_D8 (const unsigned long long P)
 
static int count_last_flip_E8 (const unsigned long long P)
 
static int count_last_flip_F8 (const unsigned long long P)
 
static int count_last_flip_G8 (const unsigned long long P)
 
static int count_last_flip_H8 (const unsigned long long P)
 
static int count_last_flip_pass (const unsigned long long P)
 
int count_last_flip (const int x, const unsigned long long P)
 

Variables

static const char COUNT_FLIP_R [128]
 
static const char COUNT_FLIP_2 [256]
 
static const char COUNT_FLIP_3 [256]
 
static const char COUNT_FLIP_4 [256]
 
static const char COUNT_FLIP_5 [256]
 
static const char COUNT_FLIP_L [128]
 
int(* COUNT_LAST_FLIP [])(const unsigned long long)
 

Detailed Description

A function is provided to count the number of fipped disc of the last move for each square of the board. These functions are gathered into an array of functions, so that a fast access to each function is allowed. The generic form of the function take as input the player bitboard and return twice the number of flipped disc of the last move.

The basic principle is to read into an array a precomputed result. Doing this is easy for a single line ; as we can use arrays of the form:

With 135 degree merge, instead of Valery ClaudePierre's modification.

For top to bottom flip, LS1B isolation (http://chessprogramming.wikispaces.com/ General+Setwise+Operations) is used to get the outflank bit.

Date
1998 - 2017
Author
Richard Delorme
Toshihiko Okuhara
Version
4.4

Function Documentation

◆ count_last_flip()

int count_last_flip ( const int  x,
const unsigned long long  P 
)

◆ count_last_flip_A1()

static int count_last_flip_A1 ( const unsigned long long  P)
static

Count last flipped discs when playing on square A1.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_A2()

static int count_last_flip_A2 ( const unsigned long long  P)
static

Count last flipped discs when playing on square A2.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_A3()

static int count_last_flip_A3 ( const unsigned long long  P)
static

Count last flipped discs when playing on square A3.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_A4()

static int count_last_flip_A4 ( const unsigned long long  P)
static

Count last flipped discs when playing on square A4.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_A5()

static int count_last_flip_A5 ( const unsigned long long  P)
static

Count last flipped discs when playing on square A5.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_A6()

static int count_last_flip_A6 ( const unsigned long long  P)
static

Count last flipped discs when playing on square A6.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_A7()

static int count_last_flip_A7 ( const unsigned long long  P)
static

Count last flipped discs when playing on square A7.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_A8()

static int count_last_flip_A8 ( const unsigned long long  P)
static

Count last flipped discs when playing on square A8.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_B1()

static int count_last_flip_B1 ( const unsigned long long  P)
static

Count last flipped discs when playing on square B1.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_B2()

static int count_last_flip_B2 ( const unsigned long long  P)
static

Count last flipped discs when playing on square B2.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_B3()

static int count_last_flip_B3 ( const unsigned long long  P)
static

Count last flipped discs when playing on square B3.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_B4()

static int count_last_flip_B4 ( const unsigned long long  P)
static

Count last flipped discs when playing on square B4.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_B5()

static int count_last_flip_B5 ( const unsigned long long  P)
static

Count last flipped discs when playing on square B5.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_B6()

static int count_last_flip_B6 ( const unsigned long long  P)
static

Count last flipped discs when playing on square B6.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_B7()

static int count_last_flip_B7 ( const unsigned long long  P)
static

Count last flipped discs when playing on square B7.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_B8()

static int count_last_flip_B8 ( const unsigned long long  P)
static

Count last flipped discs when playing on square B8.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_C1()

static int count_last_flip_C1 ( const unsigned long long  P)
static

Count last flipped discs when playing on square C1.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_C2()

static int count_last_flip_C2 ( const unsigned long long  P)
static

Count last flipped discs when playing on square C2.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_C3()

static int count_last_flip_C3 ( const unsigned long long  P)
static

Count last flipped discs when playing on square C3.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_C4()

static int count_last_flip_C4 ( const unsigned long long  P)
static

Count last flipped discs when playing on square C4.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_C5()

static int count_last_flip_C5 ( const unsigned long long  P)
static

Count last flipped discs when playing on square C5.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_C6()

static int count_last_flip_C6 ( const unsigned long long  P)
static

Count last flipped discs when playing on square C6.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_C7()

static int count_last_flip_C7 ( const unsigned long long  P)
static

Count last flipped discs when playing on square C7.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_C8()

static int count_last_flip_C8 ( const unsigned long long  P)
static

Count last flipped discs when playing on square C8.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_D1()

static int count_last_flip_D1 ( const unsigned long long  P)
static

Count last flipped discs when playing on square D1.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_D2()

static int count_last_flip_D2 ( const unsigned long long  P)
static

Count last flipped discs when playing on square D2.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_D3()

static int count_last_flip_D3 ( const unsigned long long  P)
static

Count last flipped discs when playing on square D3.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_D4()

static int count_last_flip_D4 ( const unsigned long long  P)
static

Count last flipped discs when playing on square D4.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_D5()

static int count_last_flip_D5 ( const unsigned long long  P)
static

Count last flipped discs when playing on square D5.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_D6()

static int count_last_flip_D6 ( const unsigned long long  P)
static

Count last flipped discs when playing on square D6.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_D7()

static int count_last_flip_D7 ( const unsigned long long  P)
static

Count last flipped discs when playing on square D7.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_D8()

static int count_last_flip_D8 ( const unsigned long long  P)
static

Count last flipped discs when playing on square D8.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_E1()

static int count_last_flip_E1 ( const unsigned long long  P)
static

Count last flipped discs when playing on square E1.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_E2()

static int count_last_flip_E2 ( const unsigned long long  P)
static

Count last flipped discs when playing on square E2.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_E3()

static int count_last_flip_E3 ( const unsigned long long  P)
static

Count last flipped discs when playing on square E3.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_E4()

static int count_last_flip_E4 ( const unsigned long long  P)
static

Count last flipped discs when playing on square E4.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_E5()

static int count_last_flip_E5 ( const unsigned long long  P)
static

Count last flipped discs when playing on square E5.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_E6()

static int count_last_flip_E6 ( const unsigned long long  P)
static

Count last flipped discs when playing on square E6.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_E7()

static int count_last_flip_E7 ( const unsigned long long  P)
static

Count last flipped discs when playing on square E7.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_E8()

static int count_last_flip_E8 ( const unsigned long long  P)
static

Count last flipped discs when playing on square E8.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_F1()

static int count_last_flip_F1 ( const unsigned long long  P)
static

Count last flipped discs when playing on square F1.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_F2()

static int count_last_flip_F2 ( const unsigned long long  P)
static

Count last flipped discs when playing on square F2.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_F3()

static int count_last_flip_F3 ( const unsigned long long  P)
static

Count last flipped discs when playing on square F3.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_F4()

static int count_last_flip_F4 ( const unsigned long long  P)
static

Count last flipped discs when playing on square F4.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_F5()

static int count_last_flip_F5 ( const unsigned long long  P)
static

Count last flipped discs when playing on square F5.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_F6()

static int count_last_flip_F6 ( const unsigned long long  P)
static

Count last flipped discs when playing on square F6.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_F7()

static int count_last_flip_F7 ( const unsigned long long  P)
static

Count last flipped discs when playing on square F7.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_F8()

static int count_last_flip_F8 ( const unsigned long long  P)
static

Count last flipped discs when playing on square F8.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_G1()

static int count_last_flip_G1 ( const unsigned long long  P)
static

Count last flipped discs when playing on square G1.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_G2()

static int count_last_flip_G2 ( const unsigned long long  P)
static

Count last flipped discs when playing on square G2.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_G3()

static int count_last_flip_G3 ( const unsigned long long  P)
static

Count last flipped discs when playing on square G3.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_G4()

static int count_last_flip_G4 ( const unsigned long long  P)
static

Count last flipped discs when playing on square G4.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_G5()

static int count_last_flip_G5 ( const unsigned long long  P)
static

Count last flipped discs when playing on square G5.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_G6()

static int count_last_flip_G6 ( const unsigned long long  P)
static

Count last flipped discs when playing on square G6.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_G7()

static int count_last_flip_G7 ( const unsigned long long  P)
static

Count last flipped discs when playing on square G7.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_G8()

static int count_last_flip_G8 ( const unsigned long long  P)
static

Count last flipped discs when playing on square G8.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_H1()

static int count_last_flip_H1 ( const unsigned long long  P)
static

Count last flipped discs when playing on square H1.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_H2()

static int count_last_flip_H2 ( const unsigned long long  P)
static

Count last flipped discs when playing on square H2.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_H3()

static int count_last_flip_H3 ( const unsigned long long  P)
static

Count last flipped discs when playing on square H3.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_H4()

static int count_last_flip_H4 ( const unsigned long long  P)
static

Count last flipped discs when playing on square H4.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_H5()

static int count_last_flip_H5 ( const unsigned long long  P)
static

Count last flipped discs when playing on square H5.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_H6()

static int count_last_flip_H6 ( const unsigned long long  P)
static

Count last flipped discs when playing on square H6.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_H7()

static int count_last_flip_H7 ( const unsigned long long  P)
static

Count last flipped discs when playing on square H7.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_H8()

static int count_last_flip_H8 ( const unsigned long long  P)
static

Count last flipped discs when playing on square H8.

Parameters
Pplayer's disc pattern.
Returns
flipped disc count.

◆ count_last_flip_pass()

static int count_last_flip_pass ( const unsigned long long  P)
static

Count last flipped discs when plassing.

Parameters
Pplayer's disc pattern (unused).
Returns
zero.

◆ count_V_flip_reverse()

static int count_V_flip_reverse ( unsigned long long  P,
int  ofs 
)
inlinestatic

Variable Documentation

◆ COUNT_FLIP_2

const char COUNT_FLIP_2[256]
static
Initial value:
= {
0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 2, 4, 2, 2, 2, 4, 2, 2, 0, 2, 0, 0, 0, 2, 0, 0,
4, 6, 4, 4, 4, 6, 4, 4, 0, 2, 0, 0, 0, 2, 0, 0, 2, 4, 2, 2, 2, 4, 2, 2, 0, 2, 0, 0, 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, 10, 10, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}

◆ COUNT_FLIP_R

const char COUNT_FLIP_R[128]
static
Initial value:
= {
0, 0, 2, 0, 4, 0, 2, 0, 6, 0, 2, 0, 4, 0, 2, 0,
8, 0, 2, 0, 4, 0, 2, 0, 6, 0, 2, 0, 4, 0, 2, 0,
10, 0, 2, 0, 4, 0, 2, 0, 6, 0, 2, 0, 4, 0, 2, 0,
8, 0, 2, 0, 4, 0, 2, 0, 6, 0, 2, 0, 4, 0, 2, 0,
12, 0, 2, 0, 4, 0, 2, 0, 6, 0, 2, 0, 4, 0, 2, 0,
8, 0, 2, 0, 4, 0, 2, 0, 6, 0, 2, 0, 4, 0, 2, 0,
10, 0, 2, 0, 4, 0, 2, 0, 6, 0, 2, 0, 4, 0, 2, 0,
8, 0, 2, 0, 4, 0, 2, 0, 6, 0, 2, 0, 4, 0, 2, 0
}

precomputed count flip array

◆ COUNT_LAST_FLIP

int(* COUNT_LAST_FLIP[])(const unsigned long long) ( const unsigned long long  )
Initial value:
= {
}
static int count_last_flip_G3(const unsigned long long P)
Definition: count_last_flip_bitscan.c:543
static int count_last_flip_E1(const unsigned long long P)
Definition: count_last_flip_bitscan.c:197
static int count_last_flip_D6(const unsigned long long P)
Definition: count_last_flip_bitscan.c:915
static int count_last_flip_A4(const unsigned long long P)
Definition: count_last_flip_bitscan.c:583
static int count_last_flip_F3(const unsigned long long P)
Definition: count_last_flip_bitscan.c:525
static int count_last_flip_C3(const unsigned long long P)
Definition: count_last_flip_bitscan.c:471
static int count_last_flip_G1(const unsigned long long P)
Definition: count_last_flip_bitscan.c:235
static int count_last_flip_H1(const unsigned long long P)
Definition: count_last_flip_bitscan.c:255
static int count_last_flip_D5(const unsigned long long P)
Definition: count_last_flip_bitscan.c:775
static int count_last_flip_B8(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1156
static int count_last_flip_G5(const unsigned long long P)
Definition: count_last_flip_bitscan.c:829
static int count_last_flip_H3(const unsigned long long P)
Definition: count_last_flip_bitscan.c:563
static int count_last_flip_F4(const unsigned long long P)
Definition: count_last_flip_bitscan.c:671
static int count_last_flip_A5(const unsigned long long P)
Definition: count_last_flip_bitscan.c:723
static int count_last_flip_A8(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1139
static int count_last_flip_F1(const unsigned long long P)
Definition: count_last_flip_bitscan.c:216
static int count_last_flip_C6(const unsigned long long P)
Definition: count_last_flip_bitscan.c:897
static int count_last_flip_A1(const unsigned long long P)
Definition: count_last_flip_bitscan.c:119
static int count_last_flip_H2(const unsigned long long P)
Definition: count_last_flip_bitscan.c:411
static int count_last_flip_C4(const unsigned long long P)
Definition: count_last_flip_bitscan.c:617
static int count_last_flip_H5(const unsigned long long P)
Definition: count_last_flip_bitscan.c:846
static int count_last_flip_B5(const unsigned long long P)
Definition: count_last_flip_bitscan.c:740
static int count_last_flip_C1(const unsigned long long P)
Definition: count_last_flip_bitscan.c:159
static int count_last_flip_E8(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1207
static int count_last_flip_B1(const unsigned long long P)
Definition: count_last_flip_bitscan.c:139
static int count_last_flip_C5(const unsigned long long P)
Definition: count_last_flip_bitscan.c:757
static int count_last_flip_G7(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1105
static int count_last_flip_D8(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1190
static int count_last_flip_E6(const unsigned long long P)
Definition: count_last_flip_bitscan.c:933
static int count_last_flip_H6(const unsigned long long P)
Definition: count_last_flip_bitscan.c:986
static int count_last_flip_B2(const unsigned long long P)
Definition: count_last_flip_bitscan.c:295
static int count_last_flip_pass(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1275
static int count_last_flip_E5(const unsigned long long P)
Definition: count_last_flip_bitscan.c:793
static int count_last_flip_A7(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1003
static int count_last_flip_H7(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1122
static int count_last_flip_D7(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1054
static int count_last_flip_B3(const unsigned long long P)
Definition: count_last_flip_bitscan.c:451
static int count_last_flip_C7(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1037
static int count_last_flip_D2(const unsigned long long P)
Definition: count_last_flip_bitscan.c:334
static int count_last_flip_E7(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1071
static int count_last_flip_A3(const unsigned long long P)
Definition: count_last_flip_bitscan.c:431
static int count_last_flip_G8(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1241
static int count_last_flip_F6(const unsigned long long P)
Definition: count_last_flip_bitscan.c:951
static int count_last_flip_E3(const unsigned long long P)
Definition: count_last_flip_bitscan.c:507
static int count_last_flip_G4(const unsigned long long P)
Definition: count_last_flip_bitscan.c:689
static int count_last_flip_F5(const unsigned long long P)
Definition: count_last_flip_bitscan.c:811
static int count_last_flip_E4(const unsigned long long P)
Definition: count_last_flip_bitscan.c:653
static int count_last_flip_B4(const unsigned long long P)
Definition: count_last_flip_bitscan.c:600
static int count_last_flip_F8(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1224
static int count_last_flip_H4(const unsigned long long P)
Definition: count_last_flip_bitscan.c:706
static int count_last_flip_A6(const unsigned long long P)
Definition: count_last_flip_bitscan.c:863
static int count_last_flip_F2(const unsigned long long P)
Definition: count_last_flip_bitscan.c:372
static int count_last_flip_D4(const unsigned long long P)
Definition: count_last_flip_bitscan.c:635
static int count_last_flip_D1(const unsigned long long P)
Definition: count_last_flip_bitscan.c:178
static int count_last_flip_F7(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1088
static int count_last_flip_B7(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1020
static int count_last_flip_G6(const unsigned long long P)
Definition: count_last_flip_bitscan.c:969
static int count_last_flip_E2(const unsigned long long P)
Definition: count_last_flip_bitscan.c:353
static int count_last_flip_H8(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1258
static int count_last_flip_G2(const unsigned long long P)
Definition: count_last_flip_bitscan.c:391
static int count_last_flip_C8(const unsigned long long P)
Definition: count_last_flip_bitscan.c:1173
static int count_last_flip_A2(const unsigned long long P)
Definition: count_last_flip_bitscan.c:275
static int count_last_flip_B6(const unsigned long long P)
Definition: count_last_flip_bitscan.c:880
static int count_last_flip_D3(const unsigned long long P)
Definition: count_last_flip_bitscan.c:489
static int count_last_flip_C2(const unsigned long long P)
Definition: count_last_flip_bitscan.c:315

Array of functions to count flipped discs of the last move