cmCTestBinPacker.h 858 B

12345678910111213141516171819202122232425262728
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include <cstddef>
  5. #include <map>
  6. #include <string>
  7. #include <vector>
  8. #include "cmCTestResourceAllocator.h"
  9. struct cmCTestBinPackerAllocation
  10. {
  11. std::size_t ProcessIndex;
  12. int SlotsNeeded;
  13. std::string Id;
  14. bool operator==(const cmCTestBinPackerAllocation& other) const;
  15. bool operator!=(const cmCTestBinPackerAllocation& other) const;
  16. };
  17. bool cmAllocateCTestResourcesRoundRobin(
  18. const std::map<std::string, cmCTestResourceAllocator::Resource>& resources,
  19. std::vector<cmCTestBinPackerAllocation>& allocations);
  20. bool cmAllocateCTestResourcesBlock(
  21. const std::map<std::string, cmCTestResourceAllocator::Resource>& resources,
  22. std::vector<cmCTestBinPackerAllocation>& allocations);