|
void | local_calculate () override |
|
virtual void | print (std::ofstream &fs, Verilog, int l1=0, int l2=0, int l3=0) |
|
virtual void | print (std::ofstream &fs, HLS, int l1=0, int l2=0, int l3=0) |
|
void | print (std::ofstream &fs, Verilog, int l1=0, int l2=0, int l3=0) override |
|
| VarDSPPostadd (imathGlobals *globals, std::string name, VarBase *p1, VarBase *p2, VarBase *p3, double range=-1, int nmax=18) |
|
| ~VarDSPPostadd () 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 () |
|
virtual void | print (std::ofstream &fs, HLS, int l1=0, int l2=0, int l3=0) |
|
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 850 of file imath.h.
Definition at line 852 of file imath.h.
References funct::abs(), trklet::VarBase::dump_msg(), MillePedeFileConverter_cfg::e, Exception, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, trklet::VarBase::K(), reco::ParticleMasses::k0, 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(), trklet::VarBase::p3(), funct::pow(), ps_, trklet::VarBase::range(), and shift3_.
858 std::map<std::string, int> map1 =
p1->
Kmap();
859 std::map<std::string, int> map2 =
p2->
Kmap();
860 for (
const auto &
it : map2) {
861 if (map1.find(
it.first) == map1.end())
862 map1[
it.first] =
it.second;
864 map1[
it.first] = map1[
it.first] +
it.second;
870 std::map<std::string, int> map3 =
p3->
Kmap();
875 for (
const auto &
it : map3) {
876 if (map1.find(
it.first) == map1.end())
877 map1[
it.first] = -
it.second;
879 map1[
it.first] = map1[
it.first] -
it.second;
885 for (
const auto &
it : map1) {
886 if (
it.second != 0) {
887 if (
it.first !=
"2") {
890 "VarDSPPostadd: bad units! %s^%i for variable %s",
898 throw cms::Exception(
"BadConfig") <<
"imath units are different!";
903 double ki1 =
k0 /
pow(2, s0);
904 double ki2 =
p3->
K() /
pow(2, s3);
907 snprintf(slog, 100,
"VarDSPPostadd: bad constants! %f %f for variable %s", ki1, ki2,
name_.c_str());
912 throw cms::Exception(
"BadConfig") <<
"imath constants are different!";
918 throw cms::Exception(
"BadConfig") <<
"imath VarDSPPostadd: loosing precision on C in A*B+C: " <<
shift3_;
926 int n0 = 1 + (n12 > n3 ? n12 : n3);
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)