Skip to content

Commit

Permalink
Retire CACHE_LINE_ALIGNMENT
Browse files Browse the repository at this point in the history
Speed tests showed no benefit.

No functional change.

Resolves #97
  • Loading branch information
lucasart authored and glinscott committed Nov 7, 2014
1 parent 8e98bd6 commit 375797d
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
4 changes: 0 additions & 4 deletions src/bitboard.cpp
Expand Up @@ -24,8 +24,6 @@
#include "bitcount.h"
#include "rkiss.h"

CACHE_LINE_ALIGNMENT

Bitboard RMasks[SQUARE_NB];
Bitboard RMagics[SQUARE_NB];
Bitboard* RAttacks[SQUARE_NB];
Expand Down Expand Up @@ -58,8 +56,6 @@ namespace {
const uint64_t DeBruijn_64 = 0x3F79D71B4CB0A89ULL;
const uint32_t DeBruijn_32 = 0x783A9B23;

CACHE_LINE_ALIGNMENT

int MS1BTable[256];
Square BSFTable[SQUARE_NB];
Bitboard RTable[0x19000]; // Storage space for rook attacks
Expand Down
2 changes: 0 additions & 2 deletions src/bitboard.h
Expand Up @@ -57,8 +57,6 @@ const Bitboard Rank6BB = Rank1BB << (8 * 5);
const Bitboard Rank7BB = Rank1BB << (8 * 6);
const Bitboard Rank8BB = Rank1BB << (8 * 7);

CACHE_LINE_ALIGNMENT

extern Bitboard RMasks[SQUARE_NB];
extern Bitboard RMagics[SQUARE_NB];
extern Bitboard* RAttacks[SQUARE_NB];
Expand Down
2 changes: 0 additions & 2 deletions src/position.cpp
Expand Up @@ -34,8 +34,6 @@

using std::string;

CACHE_LINE_ALIGNMENT

Value PieceValue[PHASE_NB][PIECE_NB] = {
{ VALUE_ZERO, PawnValueMg, KnightValueMg, BishopValueMg, RookValueMg, QueenValueMg },
{ VALUE_ZERO, PawnValueEg, KnightValueEg, BishopValueEg, RookValueEg, QueenValueEg } };
Expand Down
7 changes: 0 additions & 7 deletions src/types.h
Expand Up @@ -65,11 +65,6 @@
# endif

#define CACHE_LINE_SIZE 64
#if defined(_MSC_VER) || defined(__INTEL_COMPILER)
# define CACHE_LINE_ALIGNMENT __declspec(align(CACHE_LINE_SIZE))
#else
# define CACHE_LINE_ALIGNMENT __attribute__ ((aligned(CACHE_LINE_SIZE)))
#endif

#ifdef _MSC_VER
# define FORCE_INLINE __forceinline
Expand Down Expand Up @@ -326,8 +321,6 @@ inline Score operator/(Score s, int i) {
return make_score(mg_value(s) / i, eg_value(s) / i);
}

CACHE_LINE_ALIGNMENT

extern Value PieceValue[PHASE_NB][PIECE_NB];

struct ExtMove {
Expand Down

0 comments on commit 375797d

Please sign in to comment.