projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
bd354c5
)
Implement negation for 128bit Bitboard
author
Fabian Fichter
<ianfab@users.noreply.github.com>
Sat, 22 May 2021 12:49:20 +0000 (14:49 +0200)
committer
Fabian Fichter
<ianfab@users.noreply.github.com>
Sat, 22 May 2021 12:49:20 +0000 (14:49 +0200)
src/types.h
patch
|
blob
|
history
diff --git
a/src/types.h
b/src/types.h
index
628e00c
..
4f4aee7
100644
(file)
--- a/
src/types.h
+++ b/
src/types.h
@@
-183,6
+183,10
@@
struct Bitboard {
return Bitboard(~b64[0], ~b64[1]);
}
+ constexpr Bitboard operator - () const {
+ return Bitboard(-b64[0] - (b64[1] > 0), -b64[1]);
+ }
+
constexpr Bitboard operator | (const Bitboard x) const {
return Bitboard(b64[0] | x.b64[0], b64[1] | x.b64[1]);
}