1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

Silence a good bunch of Intel warnings

Note that some pawns and material info has been switched
to int from int8_t.

This is a waste of space but it is not clear if we have a
faster or slower code (or nothing changed), some test should be
needed.

Few warnings still are alive.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2009-03-15 18:07:28 +01:00
parent fcecc5212e
commit b870f5a091
6 changed files with 8 additions and 16 deletions

View file

@ -89,7 +89,7 @@ void generate_kpk_bitbase(uint8_t bitbase[]) {
int i, j, b;
for(i = 0; i < 24576; i++) {
for(b = 0, j = 0; j < 8; b |= (compress_result(Bitbase[8*i+j]) << j), j++);
bitbase[i] = b;
bitbase[i] = (uint8_t)b;
}
// Release allocated memory:

View file

@ -490,7 +490,7 @@ void init_eval(int threads) {
}
for (Bitboard b = 0ULL; b < 256ULL; b++)
BitCount8Bit[b] = count_1s(b);
BitCount8Bit[b] = (uint8_t)count_1s(b);
}

View file

@ -65,7 +65,7 @@ private:
uint8_t factor[2];
EndgameEvaluationFunctionBase* evaluationFunction;
EndgameScalingFunctionBase* scalingFunction[2];
uint8_t spaceWeight;
int spaceWeight;
};

View file

@ -1854,15 +1854,14 @@ Value Position::compute_value() const {
Value Position::compute_non_pawn_material(Color c) const {
Value result = Value(0);
Square s;
for (PieceType pt = KNIGHT; pt <= QUEEN; pt++)
{
Bitboard b = pieces_of_color_and_type(c, pt);
while(b)
while (b)
{
s = pop_1st_bit(&b);
assert(piece_on(s) == piece_of_color_and_type(c, pt));
assert(piece_on(first_1(b)) == piece_of_color_and_type(c, pt));
pop_1st_bit(&b);
result += piece_value_midgame(pt);
}
}

View file

@ -193,7 +193,6 @@ namespace {
// Iteration counters
int Iteration;
bool LastIterations;
BetaCounterType BetaCounter;
// Scores and number of times the best move changed for each iteration:
@ -207,7 +206,7 @@ namespace {
int SearchStartTime;
int MaxNodes, MaxDepth;
int MaxSearchTime, AbsoluteMaxSearchTime, ExtraSearchTime;
Move BestRootMove, PonderMove, EasyMove;
Move EasyMove;
int RootMoveNumber;
bool InfiniteSearch;
bool PonderSearch;
@ -369,8 +368,6 @@ void think(const Position &pos, bool infinite, bool ponder, int side_to_move,
// Initialize global search variables
Idle = false;
SearchStartTime = get_system_time();
BestRootMove = MOVE_NONE;
PonderMove = MOVE_NONE;
EasyMove = MOVE_NONE;
for (int i = 0; i < THREAD_MAX; i++)
{
@ -661,7 +658,6 @@ namespace {
ValueByIteration[0] = Value(0);
ValueByIteration[1] = rml.get_move_score(0);
Iteration = 1;
LastIterations = false;
EasyMove = rml.scan_for_easy_move();
@ -716,9 +712,6 @@ namespace {
ExtraSearchTime = BestMoveChangesByIteration[Iteration] * (MaxSearchTime / 2)
+ BestMoveChangesByIteration[Iteration-1] * (MaxSearchTime / 3);
// Try to guess if the current iteration is the last one or the last two
LastIterations = (current_search_time() > ((MaxSearchTime + ExtraSearchTime)*58) / 128);
// Stop search if most of MaxSearchTime is consumed at the end of the
// iteration. We probably don't have enough time to search the first
// move at the next iteration anyway.

View file

@ -207,4 +207,4 @@ TTEntry::TTEntry() {
TTEntry::TTEntry(Key k, Value v, ValueType t, Depth d, Move m,
int generation) :
key_ (k), data((m & 0x7FFFF) | (t << 20) | (generation << 23)),
value_(v), depth_(int16_t(d)) {}
value_(int16_t(v)), depth_(int16_t(d)) {}