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) $(FORMATTER) $(SRC)
run: $(SRC) $(OUTPUT) run: $(SRC) $(OUTPUT)
OMP_NUM_THREADS=1 ./$(OUTPUT) OMP_NUM_THREADS=1 ./$(OUTPUT) && echo
./$(OUTPUT_ONE_THREAD) ./$(OUTPUT_ONE_THREAD)
time: time:

View File

@ -174,7 +174,7 @@ int main()
// array_print(dist_mixture[0], N); // array_print(dist_mixture[0], N);
// end = clock(); // 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, // ^ 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. // including e.g., loading the program into memory or smth.
// Also CLOCKS_PER_SEC in POSIX is a constant equal to 1000000. // 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); split_array_free(dist_mixture, n_threads);
// end = clock(); // 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, // ^ 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. // including e.g., loading the program into memory or smth.
// Also CLOCKS_PER_SEC in POSIX is a constant equal to 1000000. // Also CLOCKS_PER_SEC in POSIX is a constant equal to 1000000.