mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Let prefetch to be enabled by default on Windows
When compiling with MSVC we don't use the Makefile so tweak a bit the Makefile to allow to let prefetch in by default so that it works under Windows. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
efdd1e697a
commit
cab8b78846
2 changed files with 8 additions and 3 deletions
|
@ -64,6 +64,7 @@ OBJS = application.o bitboard.o pawns.o material.o endgame.o evaluate.o main.o \
|
||||||
### 2.1. General
|
### 2.1. General
|
||||||
debug = no
|
debug = no
|
||||||
optimize = yes
|
optimize = yes
|
||||||
|
no_prefetch = yes
|
||||||
|
|
||||||
### 2.2 Architecture specific
|
### 2.2 Architecture specific
|
||||||
|
|
||||||
|
@ -278,7 +279,11 @@ endif
|
||||||
|
|
||||||
### 3.8 prefetch
|
### 3.8 prefetch
|
||||||
ifeq ($(prefetch),yes)
|
ifeq ($(prefetch),yes)
|
||||||
CXXFLAGS += -msse -DUSE_PREFETCH
|
no_prefetch = no
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(no_prefetch),yes)
|
||||||
|
CXXFLAGS += -msse -DNO_PREFETCH
|
||||||
DEPENDFLAGS += -msse
|
DEPENDFLAGS += -msse
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#if defined(USE_PREFETCH)
|
#if !defined(NO_PREFETCH)
|
||||||
# include <xmmintrin.h>
|
# include <xmmintrin.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ TTEntry* TranspositionTable::retrieve(const Key posKey) const {
|
||||||
/// to be loaded from RAM, that can be very slow. When we will
|
/// to be loaded from RAM, that can be very slow. When we will
|
||||||
/// subsequently call retrieve() the TT data will be already
|
/// subsequently call retrieve() the TT data will be already
|
||||||
/// quickly accessible in L1/L2 CPU cache.
|
/// quickly accessible in L1/L2 CPU cache.
|
||||||
#if !defined(USE_PREFETCH)
|
#if defined(NO_PREFETCH)
|
||||||
void TranspositionTable::prefetch(const Key) const {}
|
void TranspositionTable::prefetch(const Key) const {}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue