30 typedef uint64_t mask_t;
32 void output(
int from,
int to, mask_t mask)
37 std::cout <<
" {CW_MASK_T_CONST(0x" << std::hex << std::setfill(
'0') << std::setw(16) << mask << std::dec <<
")},";
47 for (
int from = 0; from < 64; ++from)
49 int from_col = from & 7;
50 int from_row = from >> 3;
51 for (
int to = 0; to < 64; ++to)
55 output(from, to, CW_MASK_T_CONST(0));
60 int col_diff = abs(from_col - to_col);
61 int row_diff = abs(from_row - to_row);
62 if (col_diff != 0 && row_diff != 0 && col_diff != row_diff)
64 output(from, to, CW_MASK_T_CONST(0));
67 int dcol = (to_col - from_col);
70 int drow = (to_row - from_row);
78 mask |= CW_MASK_T_CONST(1) << ((r << 3) | c);
82 while (c != to_col || r != to_row);
83 output(from, to, mask);