mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 11:36:51 +08:00
[NNUE] Wrap aligned_alloc
For some systems std::aligned_alloc is not available even if c++17 is specified. Wrap the function and use specific solutions. Update macosx-version-min to the required minimum. No functional change.
This commit is contained in:
@@ -57,7 +57,7 @@ namespace Eval::NNUE {
|
||||
template <typename T>
|
||||
void Initialize(AlignedPtr<T>& pointer) {
|
||||
|
||||
pointer.reset(reinterpret_cast<T*>(std::aligned_alloc(alignof(T), sizeof(T))));
|
||||
pointer.reset(reinterpret_cast<T*>(std_aligned_alloc(alignof(T), sizeof(T))));
|
||||
std::memset(pointer.get(), 0, sizeof(T));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user