storing searchcontext on the heap instead of the stack | bench 3415609

This commit is contained in:
rektdie committed 2025-06-05 02:03:43 +02:00
1 parent 62d1c4a064
commit 5a45d29f66
6 files changed
+142 -123

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
// Stolen from Ciekce - Stormphrax
#pragma once
#include <array>
#include <stdlib.h>
namespace internal
{
template <typename T, size_t N, size_t ... Ns>
struct MultiArrayImpl
{
using Type = std::array<typename MultiArrayImpl<T, Ns...>::Type, N>;
};
template <typename T, size_t N>
struct MultiArrayImpl<T, N>
{
using Type = std::array<T, N>;
};
}
template <typename T, size_t ... Ns>
using MultiArray = typename internal::MultiArrayImpl<T, Ns...>::Type;