MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator / PerformMainTests

Function PerformMainTests

src/Tests.cpp:7686–7947  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7684}
7685
7686static void PerformMainTests(FILE* file)
7687{
7688 wprintf(L"MAIN TESTS:\n");
7689
7690 uint32_t repeatCount = 1;
7691 if(ConfigType >= CONFIG_TYPE_MAXIMUM) repeatCount = 3;
7692
7693 Config config{};
7694 config.RandSeed = 65735476;
7695 config.MemUsageProbability[0] = 1; // VMA_MEMORY_USAGE_GPU_ONLY
7696 config.FreeOrder = FREE_ORDER::FORWARD;
7697
7698 size_t threadCountCount = 1;
7699 switch(ConfigType)
7700 {
7701 case CONFIG_TYPE_MINIMUM: threadCountCount = 1; break;
7702 case CONFIG_TYPE_SMALL: threadCountCount = 2; break;
7703 case CONFIG_TYPE_AVERAGE: threadCountCount = 3; break;
7704 case CONFIG_TYPE_LARGE: threadCountCount = 5; break;
7705 case CONFIG_TYPE_MAXIMUM: threadCountCount = 7; break;
7706 default: assert(0);
7707 }
7708
7709 const size_t strategyCount = GetAllocationStrategyCount();
7710
7711 for(size_t threadCountIndex = 0; threadCountIndex < threadCountCount; ++threadCountIndex)
7712 {
7713 std::string desc1;
7714
7715 switch(threadCountIndex)
7716 {
7717 case 0:
7718 desc1 += "1_thread";
7719 config.ThreadCount = 1;
7720 config.ThreadsUsingCommonAllocationsProbabilityPercent = 0;
7721 break;
7722 case 1:
7723 desc1 += "16_threads+0%_common";
7724 config.ThreadCount = 16;
7725 config.ThreadsUsingCommonAllocationsProbabilityPercent = 0;
7726 break;
7727 case 2:
7728 desc1 += "16_threads+50%_common";
7729 config.ThreadCount = 16;
7730 config.ThreadsUsingCommonAllocationsProbabilityPercent = 50;
7731 break;
7732 case 3:
7733 desc1 += "16_threads+100%_common";
7734 config.ThreadCount = 16;
7735 config.ThreadsUsingCommonAllocationsProbabilityPercent = 100;
7736 break;
7737 case 4:
7738 desc1 += "2_threads+0%_common";
7739 config.ThreadCount = 2;
7740 config.ThreadsUsingCommonAllocationsProbabilityPercent = 0;
7741 break;
7742 case 5:
7743 desc1 += "2_threads+50%_common";

Callers 1

TestFunction · 0.85

Calls 6

MainTestFunction · 0.85
TESTEnum · 0.85
WriteMainTestResultFunction · 0.85
clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected