#include <ac_decomposition.hpp>
Definition at line 86 of file ac_decomposition.hpp.
◆ ac_decomposition_impl()
Definition at line 102 of file ac_decomposition.hpp.
103 : num_vars( num_vars ), ps( ps ), pst( pst )
104 {
105 std::iota( permutations.begin(), permutations.end(), 0 );
106 }
◆ compute_decomposition()
| int acd::ac_decomposition_impl::compute_decomposition |
( |
| ) |
|
|
inline |
Definition at line 152 of file ac_decomposition.hpp.
153 {
155 return -1;
156
157
158 std::vector<STT> isets = compute_isets();
159
160 generate_support_minimization_encodings();
161
162
163 if ( best_multiplicity <= 4u )
164 solve_min_support_exact( isets );
165 else
166 solve_min_support_heuristic( isets );
167
168
169 assert( !best_bound_sets.empty() );
170
171 return 0;
172 }
◆ get_decomposition()
| void acd::ac_decomposition_impl::get_decomposition |
( |
unsigned char * | decompArray | ) |
|
|
inline |
Definition at line 189 of file ac_decomposition.hpp.
190 {
191 if ( best_free_set > num_vars )
192 return;
193
194 generate_decomposition();
195 get_decomposition_abc( decompArray );
196 }
◆ get_profile()
| unsigned acd::ac_decomposition_impl::get_profile |
( |
| ) |
|
|
inline |
Definition at line 174 of file ac_decomposition.hpp.
175 {
176 unsigned profile = 0;
177
178 if ( best_free_set > num_vars )
179 return -1;
180
181 for (
uint32_t i = 0; i < best_free_set; ++i )
182 {
183 profile |= 1 << permutations[i];
184 }
185
186 return profile;
187 }
◆ run()
| int acd::ac_decomposition_impl::run |
( |
word * | ptt, |
|
|
unsigned | delay_profile ) |
|
inline |
Runs ACD using late arriving variables.
Definition at line 109 of file ac_decomposition.hpp.
110 {
111
112 if ( num_vars > max_num_vars )
113 {
114 return -1;
115 }
116
117 uint32_t late_arriving = __builtin_popcount( delay_profile );
118
119
120 if ( num_vars > ps.max_free_set_vars + ps.lut_size )
121 {
122 ps.max_free_set_vars = num_vars - ps.lut_size;
123 }
124 if ( late_arriving > ps.max_free_set_vars )
125 {
126 return -1;
127
128 }
129
130
131 if ( late_arriving > ps.lut_size - 1 )
132 {
133 return -1;
134 }
135
136
137 init_truth_table( ptt );
138
139
140 reposition_late_arriving_variables( delay_profile, late_arriving );
141
142
143 if ( !find_decomposition( delay_profile, late_arriving ) )
144 {
145 return -1;
146 }
147
148
149 return delay_profile == 0 ? 2 : 1;
150 }
The documentation for this class was generated from the following file: