|
void | local_calculate () override |
|
void | print (std::ofstream &fs, HLS, int l1=0, int l2=0, int l3=0) override |
|
void | print (std::ofstream &fs, Verilog, int l1=0, int l2=0, int l3=0) override |
|
| VarAdd (imathGlobals *globals, std::string name, VarBase *p1, VarBase *p2, double range=-1, int nmax=18) |
|
| ~VarAdd () override=default |
|
void | add_cut (VarCut *cut, const bool call_set_cut_var=true) |
|
void | add_delay (int i) |
|
void | add_latency (unsigned int l) |
|
void | analyze () |
|
bool | calculate () |
|
bool | calculate (int debug_level) |
|
VarBase * | cut_var () |
|
std::string | dump () |
|
void | dump_msg () |
|
double | fval () const |
|
bool | has_delay (int i) |
|
void | inputs (std::vector< VarBase * > *vd) |
|
long int | ival () const |
|
double | K () const |
|
std::map< std::string, int > | Kmap () const |
|
std::string | kstring () const |
|
int | latency () const |
|
bool | local_passes () const |
|
void | makeready () |
|
double | maxval () const |
|
double | minval () const |
|
std::string | name () const |
|
int | nbits () const |
|
std::string | op () const |
|
VarBase * | p1 () const |
|
VarBase * | p2 () const |
|
VarBase * | p3 () const |
|
void | passes (std::map< const VarBase *, std::vector< bool > > &passes, const std::map< const VarBase *, std::vector< bool > > *const previous_passes=nullptr) const |
|
int | pipe_counter () |
|
std::string | pipe_delays (const int step) |
|
void | pipe_increment () |
|
void | print_all (std::ofstream &fs, HLS) |
|
void | print_all (std::ofstream &fs, Verilog) |
|
void | print_cuts (std::map< const VarBase *, std::set< std::string > > &cut_strings, const int step, HLS, const std::map< const VarBase *, std::set< std::string > > *const previous_cut_strings=nullptr) const |
|
void | print_cuts (std::map< const VarBase *, std::set< std::string > > &cut_strings, const int step, Verilog, const std::map< const VarBase *, std::set< std::string > > *const previous_cut_strings=nullptr) const |
|
void | print_step (int step, std::ofstream &fs, HLS) |
|
void | print_step (int step, std::ofstream &fs, Verilog) |
|
void | print_truncation (std::string &t, const std::string &o1, const int ps, HLS) const |
|
void | print_truncation (std::string &t, const std::string &o1, const int ps, Verilog) const |
|
double | range () const |
|
void | reset () |
|
int | shift () const |
|
int | step () const |
|
| VarBase (imathGlobals *globals, std::string name, VarBase *p1, VarBase *p2, VarBase *p3, int l) |
|
virtual | ~VarBase () |
|
|
static void | design_print (const std::vector< VarBase * > &v, std::ofstream &fs, HLS) |
|
static void | design_print (const std::vector< VarBase * > &v, std::ofstream &fs, Verilog) |
|
static void | hls_print (const std::vector< VarBase * > &v, std::ofstream &fs) |
|
static std::string | itos (int i) |
|
static std::string | pipe_delay (VarBase *v, int nbits, int delay) |
|
static std::string | pipe_delay_wire (VarBase *v, std::string name_delayed, int nbits, int delay) |
|
static void | verilog_print (const std::vector< VarBase * > &v, std::ofstream &fs) |
|
static struct trklet::VarBase::HLS | hls |
|
static struct trklet::VarBase::Verilog | verilog |
|
Definition at line 511 of file imath.h.
Definition at line 513 of file imath.h.
517 std::map<std::string, int> map1 =
p1->
Kmap();
518 std::map<std::string, int> map2 =
p2->
Kmap();
524 for (
const auto &it : map2) {
525 if (map1.find(it.first) == map1.end())
526 map1[it.first] = -it.second;
528 map1[it.first] = map1[it.first] - it.second;
534 for (
const auto &it : map1) {
535 if (it.second != 0) {
536 if (it.first !=
"2") {
538 slog, 100,
"VarAdd: bad units! %s^%i for variable %s", (it.first).c_str(), it.second,
name_.c_str());
542 throw cms::Exception(
"BadConfig") <<
"imath units are different!";
547 double ki1 =
p1->
K() /
pow(2, s1);
551 snprintf(slog, 100,
"VarAdd: bad constants! %f %f for variable %s", ki1, ki2,
name_.c_str());
555 throw cms::Exception(
"BadConfig") <<
"imath constants are different!";
561 int s0 = s1 <
s2 ? s1 :
s2;
567 int n0 = 1 + (n1 > n2 ? n1 : n2);
References funct::abs(), trklet::VarBase::dump_msg(), MillePedeFileConverter_cfg::e, Exception, trklet::VarBase::K(), trklet::VarBase::K_, trklet::VarBase::Kmap(), trklet::VarBase::Kmap_, n0, trklet::VarBase::name_, trklet::VarBase::nbits(), trklet::VarBase::nbits_, trklet::VarBase::op_, trklet::VarBase::p1(), trklet::VarBase::p2(), funct::pow(), ps_, trklet::VarBase::range(), indexGen::s2, shift1, and shift2.