mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Simplify popcnt
Also a speedup(about 1%) on 64-bit w/o hardware popcnt Retire Max15 and Full template parameters (Contributed by Marco Costalba) Now that we have just SW and HW versions, use template default parameter to get rid of explicit template parameters. Retire bitcount.h and move the only defined function to bitboard.h No functional change Resolves #620
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
|
||||
#include "bitcount.h"
|
||||
#include "bitboard.h"
|
||||
#include "misc.h"
|
||||
#include "movegen.h"
|
||||
#include "position.h"
|
||||
@@ -1170,7 +1170,7 @@ bool Position::pos_is_ok(int* failedStep) const {
|
||||
for (Color c = WHITE; c <= BLACK; ++c)
|
||||
for (PieceType pt = PAWN; pt <= KING; ++pt)
|
||||
{
|
||||
if (pieceCount[c][pt] != popcount<Full>(pieces(c, pt)))
|
||||
if (pieceCount[c][pt] != popcount(pieces(c, pt)))
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < pieceCount[c][pt]; ++i)
|
||||
|
||||
Reference in New Issue
Block a user