mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Fix the alignment of the transformer buffer
Fixes the issue mentioned in
584d9efedc (r138417600)
.
Thanks to @cj5716 and @peregrineshahin for
spotting this!
closes https://github.com/official-stockfish/Stockfish/pull/5042
No functional change
This commit is contained in:
parent
96837bc439
commit
9699f4f79a
1 changed files with 4 additions and 5 deletions
|
@ -197,11 +197,10 @@ Value evaluate(const Position& pos, bool adjusted, int* complexity) {
|
|||
constexpr int delta = 24;
|
||||
|
||||
#if defined(ALIGNAS_ON_STACK_VARIABLES_BROKEN)
|
||||
TransformedFeatureType
|
||||
transformedFeaturesUnaligned[FeatureTransformer < Small ? TransformedFeatureDimensionsSmall
|
||||
: TransformedFeatureDimensionsBig,
|
||||
nullptr
|
||||
> ::BufferSize + alignment / sizeof(TransformedFeatureType)];
|
||||
TransformedFeatureType transformedFeaturesUnaligned
|
||||
[FeatureTransformer < Net_Size == Small ? TransformedFeatureDimensionsSmall
|
||||
: TransformedFeatureDimensionsBig,
|
||||
nullptr > ::BufferSize + alignment / sizeof(TransformedFeatureType)];
|
||||
|
||||
auto* transformedFeatures = align_ptr_up<alignment>(&transformedFeaturesUnaligned[0]);
|
||||
#else
|
||||
|
|
Loading…
Add table
Reference in a new issue