My Project
|
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <limits.h>
Macros | |
#define | MERGE_DIAGONALS 3 |
#define | foreach_bits(i, b) for (i = first_one(b); b; i = next_one(&b, i)) |
#define | print_bitarray(a) (print_bitarray_)(f, a, (sizeof a)/(sizeof a[0]), #a) |
Typedefs | |
typedef unsigned long long | uint64 |
typedef unsigned char | uint8 |
Enumerations | |
enum | { A1 , B1 , C1 , D1 , E1 , F1 , G1 , H1 , A2 , B2 , C2 , D2 , E2 , F2 , G2 , H2 , A3 , B3 , C3 , D3 , E3 , F3 , G3 , H3 , A4 , B4 , C4 , D4 , E4 , F4 , G4 , H4 , A5 , B5 , C5 , D5 , E5 , F5 , G5 , H5 , A6 , B6 , C6 , D6 , E6 , F6 , G6 , H6 , A7 , B7 , C7 , D7 , E7 , F7 , G7 , H7 , A8 , B8 , C8 , D8 , E8 , F8 , G8 , H8 } |
Functions | |
int | first_one (uint64 b) |
int | next_one (uint64 *b, int x) |
int | count (uint64 b) |
uint64 | P (uint64 mask, const uint64 flat) |
void | print_bitboard (uint64 b, FILE *f) |
void | print_bitline (uint8 l, FILE *f) |
uint64 | h_mask (int x, int a, int b) |
uint64 | v_mask (int x, int a, int b) |
uint64 | d7_mask (int x, int a, int b) |
uint64 | d9_mask (int x, int a, int b) |
uint64 | d_mask (int x, int a, int b) |
uint64 | d_add (int x, int a, int b) |
uint8 | h_to_line (uint64 b, int x) |
uint8 | v_to_line (uint64 b, int x) |
uint8 | d7_to_line (uint64 b, int x) |
uint8 | d9_to_line (uint64 b, int x) |
uint8 | d_to_line (uint64 b, int x) |
int | flip_index_h (int x) |
int | v_flip_index (int x) |
int | d7_flip_index (int x) |
int | d9_flip_index (int x) |
int | d_flip_index (int x) |
int | flip_count (int l, int x) |
int | outflank (int o, int x) |
int | flip (int of, int x) |
char * | h_name (int x) |
char * | v_name (int x) |
char * | d7_name (int x) |
int | d7_shift_index (int x) |
char * | d9_name (int x) |
int | d9_shift_index (int x) |
char * | d_name (const int x) |
void | init_index_to_bitarray () |
void | print_bitarray_ (FILE *f, uint64 array[], int size, char *name) |
int | main () |
#define MERGE_DIAGONALS 3 |
#define print_bitarray | ( | a | ) | (print_bitarray_)(f, a, (sizeof a)/(sizeof a[0]), #a) |
typedef unsigned long long uint64 |
typedef unsigned char uint8 |
anonymous enum |
|
inline |
int d7_flip_index | ( | int | x | ) |
uint64 d7_mask | ( | int | x, |
int | a, | ||
int | b | ||
) |
char * d7_name | ( | int | x | ) |
int d7_shift_index | ( | int | x | ) |
int d9_flip_index | ( | int | x | ) |
uint64 d9_mask | ( | int | x, |
int | a, | ||
int | b | ||
) |
char * d9_name | ( | int | x | ) |
int d9_shift_index | ( | int | x | ) |
uint64 d_add | ( | int | x, |
int | a, | ||
int | b | ||
) |
int d_flip_index | ( | int | x | ) |
uint64 d_mask | ( | int | x, |
int | a, | ||
int | b | ||
) |
char * d_name | ( | const int | x | ) |
int first_one | ( | uint64 | b | ) |
int flip | ( | int | of, |
int | x | ||
) |
int flip_count | ( | int | l, |
int | x | ||
) |
int flip_index_h | ( | int | x | ) |
uint64 h_mask | ( | int | x, |
int | a, | ||
int | b | ||
) |
char * h_name | ( | int | x | ) |
void init_index_to_bitarray | ( | ) |
int main | ( | ) |
|
inline |
int outflank | ( | int | o, |
int | x | ||
) |
void print_bitarray_ | ( | FILE * | f, |
uint64 | array[], | ||
int | size, | ||
char * | name | ||
) |
void print_bitboard | ( | uint64 | b, |
FILE * | f | ||
) |
void print_bitline | ( | uint8 | l, |
FILE * | f | ||
) |
int v_flip_index | ( | int | x | ) |
uint64 v_mask | ( | int | x, |
int | a, | ||
int | b | ||
) |
char * v_name | ( | int | x | ) |
uint64 A2A7[64] |
uint64 B1G1[64] |
uint64 B2A3E7[64] |
uint64 B2B2[2] |
uint64 B2B7[64] |
uint64 B2C1G5[64] |
uint64 B2G2[64] |
uint64 B2G7[64] |
uint64 B3C2G6[64] |
uint64 B3D1G4[64] |
uint64 B3F7[32] |
uint64 B3F7G6[64] |
uint64 B3G3[64] |
uint64 B4D2G5[64] |
uint64 B4E1G3[64] |
uint64 B4E7[16] |
uint64 B4E7G5[64] |
uint64 B4F8G7[64] |
uint64 B4G4[64] |
uint64 B5D7[8] |
uint64 B5D7G4[64] |
uint64 B5E2G4[64] |
uint64 B5E8G6[64] |
uint64 B5F1G2[64] |
uint64 B5G5[64] |
uint64 B6C7[4] |
uint64 B6C7G3[64] |
uint64 B6D8G5[64] |
uint64 B6F2G3[64] |
uint64 B6G6[64] |
uint64 B7B7[2] |
uint64 B7C8G4[64] |
uint64 B7G7[64] |
uint64 B8G8[64] |
const uint64 BIT[64] |
uint64 C2A4D7[64] |
uint64 C2B3[4] |
uint64 C2B3F7[64] |
uint64 C2C7[64] |
uint64 C2G6[32] |
uint64 C2G6F7[64] |
uint64 D2A5C7[64] |
uint64 D2B4[8] |
uint64 D2B4E7[64] |
uint64 D2D7[64] |
uint64 D2G5[16] |
uint64 D2G5E7[64] |
uint64 D2H6G7[64] |
uint64 E2A6B7[64] |
uint64 E2B5[16] |
uint64 E2B5D7[64] |
uint64 E2E7[64] |
uint64 E2G4[8] |
uint64 E2G4D7[64] |
uint64 E2H5F7[64] |
uint64 F2B6[32] |
uint64 F2B6C7[64] |
uint64 F2F7[64] |
uint64 F2G3[4] |
uint64 F2G3C7[64] |
uint64 F2H4E7[64] |
uint64 G2B7[64] |
uint64 G2G2[2] |
uint64 G2G7[64] |
uint64 G2H3D7[64] |
uint64 G3C7[32] |
uint64 G4D7[16] |
uint64 G5E7[8] |
uint64 G6F7[4] |
uint64 G7G7[2] |
uint64 H2H7[64] |