Esempio n. 1
0
static void FillSlab()
    {
    SlabAlloc1(uint64, AttN, 64);
    SlabAlloc1(uint64, AttK, 64);
    SlabAlloc1(uint64, AttPw, 64);
    SlabAlloc1(uint64, AttPb, 64);
    SlabAlloc1(typeMM, RookMM, 64);
    SlabAlloc1(typeMM, BishopMM, 64);
    SlabAlloc2(uint64, MMOrtho, 102400);
    SlabAlloc2(uint64, MMDiag, 5248);
    SlabAlloc1(uint64, SqSet, 64);
    SlabAlloc1(uint64, SqClear, 64);
    SlabAlloc1(uint64, NonDiag, 64);
    SlabAlloc1(uint64, NonOrtho, 64);
    SlabAlloc1(uint64, Ortho, 64);
    SlabAlloc1(uint64, Diag, 64);
    SlabAlloc1(uint64, OrthoDiag, 64);
    SlabAlloc1(uint64, OpenFileW, 64);
    SlabAlloc1(uint64, OpenFileB, 64);
    SlabAlloc1(uint64, PassedPawnW, 64);
    SlabAlloc1(uint64, PassedPawnB, 64);
    SlabAlloc1(uint64, ProtectedPawnW, 64);
    SlabAlloc1(uint64, ProtectedPawnB, 64);
    SlabAlloc1(uint64, IsolatedPawnW, 64);
    SlabAlloc1(uint64, IsolatedPawnB, 64);
    SlabAlloc1(uint64, ConnectedPawns, 64);
    SlabAlloc1(uint64, InFrontW, 8);
    SlabAlloc1(uint64, NotInFrontW, 8);
    SlabAlloc1(uint64, InFrontB, 8);
    SlabAlloc1(uint64, NotInFrontB, 8);
    SlabAlloc1(uint64, IsolatedFiles, 8);
    SlabAlloc1(uint64, FilesLeft, 8);
    SlabAlloc1(uint64, FilesRight, 8);
    SlabAlloc1(uint64, Doubled, 64);
    SlabAlloc1(uint64, Left2, 64);
    SlabAlloc1(uint64, Right2, 64);
    SlabAlloc1(uint64, Left1, 64);
    SlabAlloc1(uint64, Right1, 64);
    SlabAlloc1(uint64, Adjacent, 64);
    SlabAlloc1(uint64, LongDiag, 64);
    SlabAlloc1(uint64, Northwest, 64);
    SlabAlloc1(uint64, Southwest, 64);
    SlabAlloc1(uint64, Northeast, 64);
    SlabAlloc1(uint64, Souteast, 64);
    SlabAlloc1(uint64, QuadrantWKwtm, 64);
    SlabAlloc1(uint64, QuadrantBKwtm, 64);
    SlabAlloc1(uint64, QuadrantWKbtm, 64);
    SlabAlloc1(uint64, QuadrantBKbtm, 64);
    SlabAlloc1(uint64, ShepherdWK, 64);
    SlabAlloc1(uint64, ShepherdBK, 64);
    SlabAlloc3(uint64, Interpose, 0100 * 0100);
    SlabAlloc3(uint64, Evade, 0100 * 0100);
    SlabAlloc3(uint64, Zobrist, 0x10 * 0100);
    SlabAlloc3(sint8, Line, 0100 * 0100);
    SlabAlloc1(uint64, HashCastling, 16);
    SlabAlloc1(uint64, HashEP, 8);
    SlabAlloc1(uint64, HashRev, 16);

#ifdef MultiplePosGain
    SlabAlloc2(sint16, MaxPositionalGain, MaxCPUs * 0x10 * 010000);
#else
    SlabAlloc2(sint16, MaxPositionalGain, 0x10 * 010000);
#endif

#ifdef MultipleHistory
    SlabAlloc2(uint16, History, MaxCPUs * 0x10 * 0100);
#else
    SlabAlloc2(uint16, History, 0x10 * 0100);
#endif

    SlabAlloc2(sint32, PieceSquareValue, 0x10 * 0100);
    SlabAlloc2(typeMaterial, Material, 419904);
    ResetHistory();
    ResetPositionalGain();
    InitArrays();
    InitMaterialValue();
    InitStatic();
    }
Esempio n. 2
0
void FillSlab ()
{
  SLAB_ALLOC1 (uint64, AttN, 64);
  SLAB_ALLOC1 (uint64, AttK, 64);
  SLAB_ALLOC1 (uint64, AttPw, 64);
  SLAB_ALLOC1 (uint64, AttPb, 64);
#ifndef MAGIC_BITBOARDS
  SLAB_ALLOC3 (uint64, LineMask, 4 * 0100 * 0100);
  SLAB_ALLOC3 (int, LineShift, 4 * 0100);
  SLAB_ALLOC1 (uint64, ClearL90, 64);
  SLAB_ALLOC1 (uint64, ClearL45, 64);
  SLAB_ALLOC1 (uint64, ClearR45, 64);
  SLAB_ALLOC1 (uint64, SetL90, 64);
  SLAB_ALLOC1 (uint64, SetL45, 64);
  SLAB_ALLOC1 (uint64, SetR45, 64);
#else
  SLAB_ALLOC1 (type_MM, ROOK_MM, 64);
  SLAB_ALLOC1 (type_MM, BISHOP_MM, 64);
  SLAB_ALLOC2 (uint64, MM_ORTHO, 102400); /* SLAB 800k */
  SLAB_ALLOC2 (uint64, MM_DIAG, 5248);
#endif
  SLAB_ALLOC1 (uint64, SqSet, 64);
  SLAB_ALLOC1 (uint64, SqClear, 64);
  SLAB_ALLOC1 (uint64, NON_DIAG, 64);
  SLAB_ALLOC1 (uint64, NON_ORTHO, 64);
  SLAB_ALLOC1 (uint64, ORTHO, 64);
  SLAB_ALLOC1 (uint64, DIAG, 64);
  SLAB_ALLOC1 (uint64, ORTHO_DIAG, 64);
  SLAB_ALLOC1 (uint64, OpenFileW, 64);
  SLAB_ALLOC1 (uint64, OpenFileB, 64);
  SLAB_ALLOC1 (uint64, PassedPawnW, 64);
  SLAB_ALLOC1 (uint64, PassedPawnB, 64);
  SLAB_ALLOC1 (uint64, ProtectedPawnW, 64);
  SLAB_ALLOC1 (uint64, ProtectedPawnB, 64);
  SLAB_ALLOC1 (uint64, IsolatedPawnW, 64);
  SLAB_ALLOC1 (uint64, IsolatedPawnB, 64);
  SLAB_ALLOC1 (uint64, ConnectedPawns, 64);
  SLAB_ALLOC1 (uint64, InFrontW, 8);
  SLAB_ALLOC1 (uint64, NotInFrontW, 8);
  SLAB_ALLOC1 (uint64, InFrontB, 8);
  SLAB_ALLOC1 (uint64, NotInFrontB, 8);
  SLAB_ALLOC1 (uint64, IsolatedFiles, 8);
  SLAB_ALLOC1 (uint64, FilesLeft, 8);
  SLAB_ALLOC1 (uint64, FilesRight, 8);
  SLAB_ALLOC1 (uint64, DOUBLED, 64);
  SLAB_ALLOC1 (uint64, LEFT2, 64);
  SLAB_ALLOC1 (uint64, RIGHT2, 64);
  SLAB_ALLOC1 (uint64, LEFT1, 64);
  SLAB_ALLOC1 (uint64, RIGHT1, 64);
  SLAB_ALLOC1 (uint64, ADJACENT, 64);
  SLAB_ALLOC1 (uint64, LONG_DIAG, 64);
  SLAB_ALLOC1 (uint64, NORTHWEST, 64);
  SLAB_ALLOC1 (uint64, SOUTHWEST, 64);
  SLAB_ALLOC1 (uint64, NORTHEAST, 64);
  SLAB_ALLOC1 (uint64, SOUTHEAST, 64);
  SLAB_ALLOC1 (uint64, QuadrantWKwtm, 64);
  SLAB_ALLOC1 (uint64, QuadrantBKwtm, 64);
  SLAB_ALLOC1 (uint64, QuadrantWKbtm, 64);
  SLAB_ALLOC1 (uint64, QuadrantBKbtm, 64);
  SLAB_ALLOC1 (uint64, ShepherdWK, 64);
  SLAB_ALLOC1 (uint64, ShepherdBK, 64);
  SLAB_ALLOC3 (uint64, INTERPOSE, 0100 * 0100);
  SLAB_ALLOC3 (uint64, EVADE, 0100 * 0100);
  SLAB_ALLOC3 (uint64, ZOBRIST, 0x10 * 0100);
  SLAB_ALLOC3 (sint8, LINE, 0100 * 0100);
  SLAB_ALLOC1 (uint64, ZobristCastling, 16);
  SLAB_ALLOC1 (uint64, ZobristEP, 8);
  SLAB_ALLOC1 (uint64, ZobristRev, 16);
#ifdef MULTIPLE_POS_GAIN
  SLAB_ALLOC2 (sint16, MAX_POSITIONAL_GAIN, MAX_CPUS * 0x10 * 010000);
#else
  SLAB_ALLOC2 (sint16, MAX_POSITIONAL_GAIN, 0x10 * 010000); /* SLAB 1mb */
#endif
#ifdef MULTIPLE_HISTORY
  SLAB_ALLOC2 (uint16, HISTORY, MAX_CPUS * 0x10 * 0100); /* SLAB 64k */
#else
  SLAB_ALLOC2 (uint16, HISTORY, 0x10 * 0100);
#endif
  SLAB_ALLOC2 (sint32, PieceSquareValue, 0x10 * 0100); /* SMP read SLAB 16k */
  SLAB_ALLOC2 (typeMATERIAL, MATERIAL, 419904); /* SMP read SLAB 1.68mb */

  ResetHistory ();
  ResetPositionalGain ();
  InitArrays ();
  InitMaterialValue ();
  InitStatic ();
}