|
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 () |
|
bool | calculate (int debug_level) |
|
bool | calculate () |
|
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 598 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 600 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(), funct::pow(), ps_, trklet::VarBase::range(), shift1, and shift2.
604 std::map<std::string, int> map1 =
p1->
Kmap();
605 std::map<std::string, int> map2 =
p2->
Kmap();
610 for (
const auto &it : map2) {
611 if (map1.find(it.first) == map1.end())
612 map1[it.first] = -it.second;
614 map1[it.first] = map1[it.first] - it.second;
620 for (
const auto &it : map1) {
621 if (it.second != 0) {
622 if (it.first !=
"2") {
624 slog, 100,
"VarAdd: bad units! %s^%i for variable %s", (it.first).c_str(), it.second,
name_.c_str());
628 throw cms::Exception(
"BadConfig") <<
"imath units are different!";
633 double ki1 =
p1->
K() /
pow(2, s1);
634 double ki2 =
p2->
K() /
pow(2, s2);
637 snprintf(slog, 100,
"VarAdd: bad constants! %f %f for variable %s", ki1, ki2,
name_.c_str());
641 throw cms::Exception(
"BadConfig") <<
"imath constants are different!";
647 int s0 = s1 < s2 ? s1 : s2;
653 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_
Power< A, B >::type pow(const A &a, const B &b)