Better naming in endgame code

And small clean-up of magic bitboards code.

No functional change.

Closes #1138
This commit is contained in:
Marco Costalba
2017-06-04 11:03:23 +02:00
committed by Joona Kiiski
parent f907d5b7d9
commit 27ba611a3d
8 changed files with 75 additions and 92 deletions
+2 -2
View File
@@ -531,14 +531,14 @@ int decompress_pairs(PairsData* d, uint64_t idx) {
//
// I(k) = k * d->span + d->span / 2 (1)
// First step is to get the 'k' of the I(k) nearest to our idx, using defintion (1)
// First step is to get the 'k' of the I(k) nearest to our idx, using definition (1)
uint32_t k = idx / d->span;
// Then we read the corresponding SparseIndex[] entry
uint32_t block = number<uint32_t, LittleEndian>(&d->sparseIndex[k].block);
int offset = number<uint16_t, LittleEndian>(&d->sparseIndex[k].offset);
// Now compute the difference idx - I(k). From defintion of k we know that
// Now compute the difference idx - I(k). From definition of k we know that
//
// idx = k * d->span + idx % d->span (2)
//