print Q(n) and I(n)

This commit is contained in:
Nguyen Quy Anh
2026-04-29 20:14:56 +02:00
parent 6b8d5bc94c
commit e113319083
4 changed files with 41 additions and 5 deletions
+15
View File
@@ -209,6 +209,21 @@ int main(int argc, const char *argv[]) {
std::cout << P;
std::cout << " flops/cycle\n";
long long W_per_iter = (long long)(8 + 55 * n_p - 55 + 192 + 4 + 8 + 4 + 10) * n_p;
std::cout << "W(n) per iteration: ";
std::cout << W_per_iter;
std::cout << " flops\n";
long long Q = 104 * n_p + 32 * 4 + 80;
std::cout << "Q(n) per iteration: ";
std::cout << Q;
std::cout << " bytes\n";
long long I = (long long)(8 + 55 * n_p - 55 + 192 + 4 + 8 + 4 + 10) * n_p / Q;
std::cout << "I(n): ";
std::cout << I;
std::cout << " flops/byte\n";
// now we wanna save the data to a csv
if (dump_path) {
std::ofstream out(dump_path);