Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Source/CTest/cmCTestBinPacker.h
4998 views
1
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2
file LICENSE.rst or https://cmake.org/licensing for details. */
3
#pragma once
4
5
#include <cstddef>
6
#include <map>
7
#include <string>
8
#include <vector>
9
10
#include "cmCTestResourceAllocator.h"
11
12
struct cmCTestBinPackerAllocation
13
{
14
std::size_t ProcessIndex;
15
int SlotsNeeded;
16
std::string Id;
17
18
bool operator==(cmCTestBinPackerAllocation const& other) const;
19
bool operator!=(cmCTestBinPackerAllocation const& other) const;
20
};
21
22
bool cmAllocateCTestResourcesRoundRobin(
23
std::map<std::string, cmCTestResourceAllocator::Resource> const& resources,
24
std::vector<cmCTestBinPackerAllocation>& allocations);
25
26
bool cmAllocateCTestResourcesBlock(
27
std::map<std::string, cmCTestResourceAllocator::Resource> const& resources,
28
std::vector<cmCTestBinPackerAllocation>& allocations);
29
30