tweak: time-printing tweaks.

This commit is contained in:
NunoSempere 2023-05-29 20:05:18 -04:00
parent 7be18ff7cb
commit 2d4eea8956
3 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ format: $(SRC)
$(FORMATTER) $(SRC)
run: $(SRC) $(OUTPUT)
OMP_NUM_THREADS=1 ./$(OUTPUT)
OMP_NUM_THREADS=1 ./$(OUTPUT) && echo
./$(OUTPUT_ONE_THREAD)
time:

View File

@ -174,7 +174,7 @@ int main()
// array_print(dist_mixture[0], N);
// end = clock();
// printf("Time (ms): %f\n", ((double)(end - start)) / (CLOCKS_PER_SEC * 10) * 1000);
// printf("Time (ms): %f\n", ((double)(end - start)) / (CLOCKS_PER_SEC * 1000));
// ^ Will only measure how long it takes the inner main to run, not the whole program,
// including e.g., loading the program into memory or smth.
// Also CLOCKS_PER_SEC in POSIX is a constant equal to 1000000.

View File

@ -273,7 +273,7 @@ int main()
split_array_free(dist_mixture, n_threads);
// end = clock();
// printf("Time (ms): %f\n", ((double)(end - start)) / (CLOCKS_PER_SEC * 10) * 1000);
// printf("Time (ms): %f\n", ((double)(end - start)) / (CLOCKS_PER_SEC) * 1000);
// ^ Will only measure how long it takes the inner main to run, not the whole program,
// including e.g., loading the program into memory or smth.
// Also CLOCKS_PER_SEC in POSIX is a constant equal to 1000000.