summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestBinPacker.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmCTestBinPacker.h')
-rw-r--r--Source/CTest/cmCTestBinPacker.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestBinPacker.h b/Source/CTest/cmCTestBinPacker.h
new file mode 100644
index 0000000..54f03d7
--- /dev/null
+++ b/Source/CTest/cmCTestBinPacker.h
@@ -0,0 +1,31 @@
+/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+ file Copyright.txt or https://cmake.org/licensing for details. */
+#ifndef cmCTestBinPacker_h
+#define cmCTestBinPacker_h
+
+#include <cstddef>
+#include <map>
+#include <string>
+#include <vector>
+
+#include "cmCTestHardwareAllocator.h"
+
+struct cmCTestBinPackerAllocation
+{
+ std::size_t ProcessIndex;
+ int SlotsNeeded;
+ std::string Id;
+
+ bool operator==(const cmCTestBinPackerAllocation& other) const;
+ bool operator!=(const cmCTestBinPackerAllocation& other) const;
+};
+
+bool cmAllocateCTestHardwareRoundRobin(
+ const std::map<std::string, cmCTestHardwareAllocator::Resource>& hardware,
+ std::vector<cmCTestBinPackerAllocation>& allocations);
+
+bool cmAllocateCTestHardwareBlock(
+ const std::map<std::string, cmCTestHardwareAllocator::Resource>& hardware,
+ std::vector<cmCTestBinPackerAllocation>& allocations);
+
+#endif