Fixes AzCore for MSVC

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-09-03 14:50:26 -07:00
parent e9dfa3f8dd
commit 2e79451280
36 changed files with 274 additions and 73 deletions
+18 -2
View File
@@ -1704,7 +1704,7 @@ namespace Benchmark
static const AZ::u32 MEDIUM_NUMBER_OF_JOBS = 1024;
static const AZ::u32 LARGE_NUMBER_OF_JOBS = 16384;
void SetUp([[maybe_unused]] ::benchmark::State& state) override
void internalSetUp()
{
AllocatorInstance<PoolAllocator>::Create();
AllocatorInstance<ThreadPoolAllocator>::Create();
@@ -1749,8 +1749,16 @@ namespace Benchmark
return randomDepthDistribution(randomDepthGenerator);
});
}
void SetUp(::benchmark::State&) override
{
internalSetUp();
}
void SetUp(const ::benchmark::State&) override
{
internalSetUp();
}
void TearDown([[maybe_unused]] ::benchmark::State& state) override
void internalTearDown()
{
JobContext::SetGlobalContext(nullptr);
@@ -1763,6 +1771,14 @@ namespace Benchmark
AllocatorInstance<ThreadPoolAllocator>::Destroy();
AllocatorInstance<PoolAllocator>::Destroy();
}
void TearDown(::benchmark::State&) override
{
internalTearDown();
}
void TearDown(const ::benchmark::State&) override
{
internalTearDown();
}
protected:
inline void RunCalculatePiJob(AZ::s32 depth, AZ::s8 priority)