mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-17 15:46:24 +08:00
Introduce bitcount.h
It will be used for POPCNT intrinsics. For now no bianry and functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "bitboard.h"
|
||||
#include "bitcount.h"
|
||||
#include "direction.h"
|
||||
|
||||
|
||||
@@ -460,7 +461,7 @@ namespace {
|
||||
|
||||
|
||||
Bitboard index_to_bitboard(int index, Bitboard mask) {
|
||||
int i, j, bits = count_1s(mask);
|
||||
int i, j, bits = count_1s<false>(mask);
|
||||
Bitboard result = 0ULL;
|
||||
for(i = 0; i < bits; i++) {
|
||||
j = pop_1st_bit(&mask);
|
||||
|
||||
Reference in New Issue
Block a user