|
void | local_calculate () override |
|
void | print (std::ofstream &fs, Verilog, int l1=0, int l2=0, int l3=0) override |
|
void | print (std::ofstream &fs, HLS, int l1=0, int l2=0, int l3=0) override |
|
| VarSubtract (imathGlobals *globals, std::string name, VarBase *p1, VarBase *p2, double range=-1, int nmax=18) |
|
| ~VarSubtract () 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 () |
|
void | calcDebug (int debug_level, long int ival_prev, bool &all_ok) |
|
bool | calculate (int debug_level=0) |
|
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, Verilog) |
|
void | print_all (std::ofstream &fs, HLS) |
|
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_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_step (int step, std::ofstream &fs, Verilog) |
|
void | print_step (int step, std::ofstream &fs, HLS) |
|
void | print_truncation (std::string &t, const std::string &o1, const int ps, Verilog) const |
|
void | print_truncation (std::string &t, const std::string &o1, const int ps, HLS) 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, Verilog) |
|
static void | design_print (const std::vector< VarBase *> &v, std::ofstream &fs, HLS) |
|
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 599 of file imath.h.
trklet::VarSubtract::VarSubtract |
( |
imathGlobals * |
globals, |
|
|
std::string |
name, |
|
|
VarBase * |
p1, |
|
|
VarBase * |
p2, |
|
|
double |
range = -1 , |
|
|
int |
nmax = 18 |
|
) |
| |
|
inline |
Definition at line 601 of file imath.h.
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(), conifer::pow(), ps_, trklet::VarBase::range(), shift1, and shift2.
605 std::map<std::string, int> map1 =
p1->
Kmap();
606 std::map<std::string, int> map2 =
p2->
Kmap();
611 for (
const auto &it : map2) {
612 if (map1.find(it.first) == map1.end())
613 map1[it.first] = -it.second;
615 map1[it.first] = map1[it.first] - it.second;
621 for (
const auto &it : map1) {
622 if (it.second != 0) {
623 if (it.first !=
"2") {
625 slog, 100,
"VarAdd: bad units! %s^%i for variable %s", (it.first).c_str(), it.second,
name_.c_str());
629 throw cms::Exception(
"BadConfig") <<
"imath units are different!";
634 double ki1 =
p1->
K() /
pow(2, s1);
635 double ki2 =
p2->
K() /
pow(2, s2);
638 snprintf(slog, 100,
"VarAdd: bad constants! %f %f for variable %s", ki1, ki2,
name_.c_str());
642 throw cms::Exception(
"BadConfig") <<
"imath constants are different!";
648 int s0 = s1 < s2 ? s1 : s2;
654 int n0 = 1 + (n1 > n2 ? n1 : n2);
Log< level::Info, true > LogVerbatim
VarBase(imathGlobals *globals, std::string name, VarBase *p1, VarBase *p2, VarBase *p3, int l)
std::map< std::string, int > Kmap() const
Abs< T >::type abs(const T &t)
std::map< std::string, int > Kmap_