Skip to content

File param_parser.h

File List > bindings > simtix > param_parser.h

Go to the documentation of this file

#pragma once

#include <simtix/param.h>
#include <simtix/sm.h>

#include <sol/table.hpp>

namespace simtix {
struct from_table_t final {
  const sol::table &table;

  from_table_t(const sol::table &tbl) : table(tbl) {}

  operator ArchParam() const;
  operator mem::Cache::Param() const;
  operator mem::BankedMemory::Param() const;
  operator pipelined::PipelinedSM::Param() const;
};

inline from_table_t FromTable(const sol::table &table) {
  return from_table_t{table};
}

}  // namespace simtix