The Sparta Modeling Framework
Loading...
Searching...
No Matches
File.hpp
Go to the documentation of this file.
1// <File> -*- C++ -*-
2
3
10#pragma once
11
12#include <cstdint>
13#include <vector>
14#include <string>
15
16namespace sparta
17{
18 namespace utils
19 {
20
21 static constexpr char COUT_FILENAME[] = "1";
22 static constexpr char CERR_FILENAME[] = "2";
23
24
26
27
38 std::string computeOutputFilename(const std::string& name,
39 const std::string& location,
40 uint32_t idx,
41 const std::string& sim_name);
42
53 std::string findArchitectureConfigFile(const std::vector<std::string>& search_dirs,
54 const std::string& name);
55 static constexpr char ARCH_OPTIONS_RESOLUTION_RULES[] = \
56 "<arch> may be specified as a '.yaml'/'.yml' file in <arch-search-dir>. The yaml suffix is "
57 "not required and will be appended automatically if matchines files exists. If a directory "
58 "with a name matching <arch> exists in <arch-search-dir>, then the search continues into "
59 "that directory for a file named <arch>.yaml (or .yml). If no such file is found or there "
60 "was no directory name matching <arch> then, architecture config resolution fails.";
61
62 } // namespace utils
63} // namespace sparta
64
65
std::string computeOutputFilename(const std::string &name, const std::string &location, uint32_t idx, const std::string &sim_name)
Computes a filename based on the input name replacing it with one of several variables.
std::string findArchitectureConfigFile(const std::vector< std::string > &search_dirs, const std::string &name)
Look up the location of an architecture config file fiven a searchpp dir and a name refering to a con...
Macros for handling exponential backoff.