print Q(n) and I(n)
This commit is contained in:
+5
-5
@@ -1,12 +1,12 @@
|
|||||||
# Build artifacts
|
# Build artifacts
|
||||||
*.o
|
*.o
|
||||||
*.out
|
*.out
|
||||||
|
*.csv
|
||||||
|
*.mp4
|
||||||
|
*.gif
|
||||||
|
*.log
|
||||||
sim
|
sim
|
||||||
main
|
main*
|
||||||
positions.csv
|
|
||||||
test.mp4
|
|
||||||
test_run_out.mp4
|
|
||||||
main_test_visualisation
|
|
||||||
|
|
||||||
# Editor files
|
# Editor files
|
||||||
.vscode/
|
.vscode/
|
||||||
|
|||||||
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
sudo cpupower frequency-set -u 2000000
|
||||||
|
sudo cpupower frequency-set -d 2000000
|
||||||
@@ -209,6 +209,21 @@ int main(int argc, const char *argv[]) {
|
|||||||
std::cout << P;
|
std::cout << P;
|
||||||
std::cout << " flops/cycle\n";
|
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
|
// now we wanna save the data to a csv
|
||||||
if (dump_path) {
|
if (dump_path) {
|
||||||
std::ofstream out(dump_path);
|
std::ofstream out(dump_path);
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#include "pedestrian.hpp"
|
||||||
|
#include "board.hpp"
|
||||||
|
#include <iostream>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
std::cout << sizeof(Color);
|
||||||
|
std::cout << "\n";
|
||||||
|
std::cout << sizeof(Vector2d);
|
||||||
|
std::cout << "\n";
|
||||||
|
std::cout << sizeof(Pedestrian);
|
||||||
|
std::cout << "\n";
|
||||||
|
std::cout << sizeof(Obstacle);
|
||||||
|
std::cout << "\n";
|
||||||
|
std::cout << sizeof(Board);
|
||||||
|
std::cout << "\n";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user