mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-24 21:57:14 +00:00
HQ attacks for AVX2
passed STC (https://tests.stockfishchess.org/tests/view/6a1157dc818cacc1db0ac172): LLR: 2.93 (-2.94,2.94) <0.00,2.00> Total: 29792 W: 7759 L: 7465 D: 14568 Ptnml(0-2): 75, 3206, 8033, 3514, 68 Also passed STC after cleanups https://tests.stockfishchess.org/tests/view/6a121beb818cacc1db0ac35e vondele's local test: Result of 100 runs base (./stockfish.master ) = 1136025 +/- 2816 test (./stockfish.patch2 ) = 1171370 +/- 2848 diff = +35346 +/- 3275 speedup = +0.0311 P(speedup > 0) = 1.0000 Basically we just do hyperbola quintessence in parallel. AVX2 doesn't have efficient bit reversal so we only do it for file and bishop attacks, then do rank attacks separately with a lookup table. This LUT is much smaller which is why this seems to be faster than standard magics. closes https://github.com/official-stockfish/Stockfish/pull/6845 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
41f3557db9
commit
77a8f6ccf3
@@ -544,6 +544,14 @@ void move_to_front(std::vector<T>& vec, Predicate pred) {
|
||||
#define sf_unreachable()
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define RESTRICT __restrict__
|
||||
#elif defined(_MSC_VER)
|
||||
#define RESTRICT __restrict
|
||||
#else
|
||||
#define RESTRICT
|
||||
#endif
|
||||
|
||||
} // namespace Stockfish
|
||||
|
||||
template<std::size_t N>
|
||||
|
||||
Reference in New Issue
Block a user