-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from tud-zih-energy/marenz.refactor-function-s…
…election Refactor Function Selection
- Loading branch information
Showing
77 changed files
with
2,347 additions
and
1,176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
9732bdb59717274f666e9c1497289d1f9a0d7858 | ||
57259a1c5dce3b90a71520abc068af8aab37bb56 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/****************************************************************************** | ||
* FIRESTARTER - A Processor Stress Test Utility | ||
* Copyright (C) 2024 TU Dresden, Center for Information Services and High | ||
* Performance Computing | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/\>. | ||
* | ||
* Contact: [email protected] | ||
*****************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#include <sstream> | ||
#include <string> | ||
#include <utility> | ||
#include <vector> | ||
|
||
namespace firestarter { | ||
|
||
/// Struct to parse selected from a string. The format is a comma delimited list of instruction value pairs. The values | ||
/// are unsigned integers. | ||
struct InstructionGroups { | ||
using InternalType = std::vector<std::pair<std::string, unsigned>>; | ||
|
||
InstructionGroups() = default; | ||
|
||
explicit InstructionGroups(InternalType Groups) | ||
: Groups(std::move(Groups)) {} | ||
|
||
explicit operator const InternalType&() const noexcept { return Groups; } | ||
|
||
friend auto operator<<(std::ostream& Stream, const InstructionGroups& IGroups) -> std::ostream&; | ||
|
||
/// Parse the instruction group string. It is a comma delimited list of instruction value pairs. The values are | ||
/// unsigned integers. | ||
/// \arg Groups The instruction groups as a string. | ||
[[nodiscard]] static auto fromString(const std::string& Groups) -> InstructionGroups; | ||
|
||
/// Combine instructions and values for these instructions into the combined instruction groups. | ||
/// \arg Instructions The vector of instructions | ||
/// \arg Values The vector of values | ||
/// \returns The combined instruction groups | ||
[[nodiscard]] static auto fromInstructionAndValues(const std::vector<std::string>& Instructions, | ||
const std::vector<unsigned>& Values) -> InstructionGroups; | ||
|
||
/// The vector of used instructions that are saved in the instruction groups | ||
[[nodiscard]] auto intructions() const -> std::vector<std::string>; | ||
|
||
private: | ||
/// The parsed instruction groups | ||
std::vector<std::pair<std::string, unsigned>> Groups; | ||
}; | ||
|
||
inline auto operator<<(std::ostream& Stream, const InstructionGroups& Groups) -> std::ostream& { | ||
std::stringstream Ss; | ||
|
||
for (auto const& [Key, Value] : static_cast<InstructionGroups::InternalType>(Groups)) { | ||
Ss << Key << ":" << Value << ","; | ||
} | ||
|
||
auto S = Ss.str(); | ||
if (!S.empty()) { | ||
S.pop_back(); | ||
} | ||
|
||
Stream << S; | ||
return Stream; | ||
} | ||
|
||
} // namespace firestarter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/****************************************************************************** | ||
* FIRESTARTER - A Processor Stress Test Utility | ||
* Copyright (C) 2024 TU Dresden, Center for Information Services and High | ||
* Performance Computing | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/\>. | ||
* | ||
* Contact: [email protected] | ||
*****************************************************************************/ | ||
|
||
#pragma once | ||
|
||
namespace firestarter { | ||
|
||
/// Abstract class that defines the methods required to check if cpu features are available. | ||
class CpuFeatures { | ||
public: | ||
CpuFeatures() = default; | ||
virtual ~CpuFeatures() = default; | ||
|
||
/// Check if this class has all features which are given in the argument. | ||
/// \arg Features The features which should be check if they are available. | ||
/// \returns true if this class has all features given in the argument. | ||
[[nodiscard]] virtual auto hasAll(const CpuFeatures& Features) const -> bool = 0; | ||
}; | ||
|
||
} // namespace firestarter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/****************************************************************************** | ||
* FIRESTARTER - A Processor Stress Test Utility | ||
* Copyright (C) 2024 TU Dresden, Center for Information Services and High | ||
* Performance Computing | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/\>. | ||
* | ||
* Contact: [email protected] | ||
*****************************************************************************/ | ||
|
||
#pragma once | ||
|
||
namespace firestarter { | ||
|
||
/// Abstract class that defines the methods required to check if one cpu model is equal to another | ||
class CpuModel { | ||
public: | ||
CpuModel() = default; | ||
virtual ~CpuModel() = default; | ||
|
||
/// \arg Other The model to which operator < should be checked. | ||
/// \return true if this is less than other | ||
[[nodiscard]] virtual auto operator<(const CpuModel& Other) const -> bool = 0; | ||
|
||
/// Check if two models match. | ||
/// \arg Other The model to which equality should be checked. | ||
/// \return true if this and the other model match | ||
[[nodiscard]] virtual auto operator==(const CpuModel& Other) const -> bool = 0; | ||
}; | ||
|
||
} // namespace firestarter |
This file was deleted.
Oops, something went wrong.
40 changes: 0 additions & 40 deletions
40
include/firestarter/Environment/X86/Platform/SkylakeConfig.hpp
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.