MCPcopy Create free account
hub / github.com/data61/MP-SPDZ / process_line

Method process_line

Processor/DataPositions.cpp:153–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153void DataPositions::process_line(long long items_used, const char* name,
154 ifstream& file, bool print_verbose, double& total_cost,
155 bool& reading_field, string suffix) const
156{
157 double cost_per_item = 0;
158 if (reading_field)
159 file >> cost_per_item;
160 if (cost_per_item < 0)
161 {
162 reading_field = false;
163 cost_per_item = 0;
164 }
165 double cost = items_used * cost_per_item;
166 total_cost += cost;
167 cerr.fill(' ');
168 if (items_used)
169 {
170 cerr << " ";
171 if (print_verbose)
172 cerr << setw(10) << cost << " = ";
173 cerr << setw(10) << items_used << " " << setw(14)
174 << name;
175 if (print_verbose)
176 cerr << " @ " << setw(11) << cost_per_item;
177 cerr << suffix << endl;
178 }
179}
180
181bool DataPositions::empty() const
182{

Callers

nothing calls this directly

Calls 1

fillMethod · 0.45

Tested by

no test coverage detected