Go to the documentation of this file.
11 #ifndef __USERARCHS__H__
12 #define __USERARCHS__H__
27 std::function<ArchGenFunctionSig>
gen;
39 return gen(std::move(conf));
74 {
"num_const_addresses",
"0"},
79 {
"pred_scheme",
"partial"},
105 {
"num_const_addresses",
"0"},
109 {
"pred_scheme",
"partial"},
132 {
"eb_enable",
"true"},
157 make_and_throw<cgrame_error>([&](
auto&& s) {
158 s <<
"id `" << identifer <<
"' has no associated architecture generator";
161 return search_result->second;
178 struct XY : std::pair<int,int> {
179 using std::pair<int,int>::pair;
180 auto x() {
return first; }
181 auto y() {
return second; }
184 inline std::string
xyName(
const std::string& prefix,
XY xy) {
186 s << prefix <<
"_c" << xy.
x() <<
"_r" << xy.
y();
190 inline std::string
xyidName(
const std::string& prefix,
XY xy,
int id) {
std::function< ArchGenFunctionSig > gen
std::string xyidName(const std::string &prefix, XY xy, int id)
ConfigStore & override_all(ConfigStore &into, const ConfigStore &from)
std::vector< std::string > all_identifiers
static std::unique_ptr< CGRA > createHyCUBEArch(const ConfigStore &args)
std::string string_from_stream(F &&f)
std::string xyName(const std::string &prefix, XY xy)
static std::unique_ptr< CGRA > createAdresArch(const ConfigStore &args)
const ArchitectureGenerator & getGenerator(const std::string &identifer) const
std::map< std::string, ArchitectureGenerator > generator_storage
void registerGenerator(std::string identifer, ArchitectureGenerator generator)
std::unique_ptr< CGRA >(const ConfigStore &) ArchGenFunctionSig
ConfigStore args_and_defaults
static std::unique_ptr< CGRA > createElasticRIKENArch(const ConfigStore &args)
std::unique_ptr< CGRA > operator()(const ConfigStore &overrides={}) const