PandA-2024.02
DiscrepancyOpInfo.hpp
Go to the documentation of this file.
1 /*
2  *
3  * _/_/_/ _/_/ _/ _/ _/_/_/ _/_/
4  * _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/
5  * _/_/_/ _/_/_/_/ _/ _/_/ _/ _/ _/_/_/_/
6  * _/ _/ _/ _/ _/ _/ _/ _/ _/
7  * _/ _/ _/ _/ _/ _/_/_/ _/ _/
8  *
9  * ***********************************************
10  * PandA Project
11  * URL: http://panda.dei.polimi.it
12  * Politecnico di Milano - DEIB
13  * System Architectures Group
14  * ***********************************************
15  * Copyright (C) 2004-2024 Politecnico di Milano
16  *
17  * This file is part of the PandA framework.
18  *
19  * The PandA framework is free software; you can redistribute it and/or modify
20  * it under the terms of the GNU General Public License as published by
21  * the Free Software Foundation; either version 3 of the License, or
22  * (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program. If not, see <http://www.gnu.org/licenses/>.
31  *
32  */
38 #ifndef DISCREPANCY_INFO_HPP
39 #define DISCREPANCY_INFO_HPP
40 
41 #include "custom_set.hpp"
42 
43 // include from utility/
44 #include "refcount.hpp"
45 #include <string>
46 
48 {
50  DISCR_ADDR = 1 << 0,
51  DISCR_REAL = 1 << 1,
52  DISCR_COMPLEX = 1 << 2,
53  DISCR_VECTOR = 1 << 3,
54 };
55 
57 {
58  return static_cast<discrepancy_type_mask>(static_cast<int>(a) & static_cast<int>(b));
59 }
60 
62 {
63  a = a & b;
64  return a;
65 }
66 
68 {
69  return static_cast<discrepancy_type_mask>(static_cast<int>(a) | static_cast<int>(b));
70 }
71 
73 {
74  a = a | b;
75  return a;
76 }
77 
78 /*
79  * Data structure used to store parsing data
80  */
82 {
83  public:
84  unsigned long n_cycles;
85  unsigned int stg_fun_id;
86  unsigned int op_id;
87  unsigned int ssa_name_node_id;
88  unsigned int bitsize;
89  unsigned int vec_base_bitsize;
95  std::string ssa_name;
96 };
97 
98 bool operator!=(const DiscrepancyOpInfo& a, const DiscrepancyOpInfo& b);
99 bool operator==(const DiscrepancyOpInfo& a, const DiscrepancyOpInfo& b);
100 bool operator<(const DiscrepancyOpInfo& a, const DiscrepancyOpInfo& b);
101 bool operator<=(const DiscrepancyOpInfo& a, const DiscrepancyOpInfo& b);
102 bool operator>(const DiscrepancyOpInfo& a, const DiscrepancyOpInfo& b);
103 bool operator>=(const DiscrepancyOpInfo& a, const DiscrepancyOpInfo& b);
104 #endif
bool operator<(const DiscrepancyOpInfo &a, const DiscrepancyOpInfo &b)
CustomOrderedSet< unsigned int > start_states
unsigned long n_cycles
static discrepancy_type_mask & operator &=(discrepancy_type_mask &a, const discrepancy_type_mask &b)
CustomOrderedSet< unsigned int > exec_states
static discrepancy_type_mask operator|(const discrepancy_type_mask &a, const discrepancy_type_mask &b)
bool operator>=(const DiscrepancyOpInfo &a, const DiscrepancyOpInfo &b)
bool operator>(const DiscrepancyOpInfo &a, const DiscrepancyOpInfo &b)
discrepancy_type_mask
bool operator!=(const DiscrepancyOpInfo &a, const DiscrepancyOpInfo &b)
static discrepancy_type_mask & operator|=(discrepancy_type_mask &a, const discrepancy_type_mask &b)
bool operator==(const DiscrepancyOpInfo &a, const DiscrepancyOpInfo &b)
unsigned int vec_base_bitsize
static discrepancy_type_mask operator &(const discrepancy_type_mask &a, const discrepancy_type_mask &b)
redefinition of set to manage ordered/unordered structures
Template definition of refcount.
bool operator<=(const DiscrepancyOpInfo &a, const DiscrepancyOpInfo &b)
unsigned int ssa_name_node_id
CustomOrderedSet< unsigned int > end_states
enum discrepancy_type_mask type

Generated on Mon Feb 12 2024 13:02:55 for PandA-2024.02 by doxygen 1.8.13