This commit is contained in:
kai
2025-04-26 13:37:18 +02:00
parent 5df59e9376
commit 66504888c3
5 changed files with 2015 additions and 10004 deletions

View File

@@ -45,7 +45,7 @@ bench_result benchmark(int numThreads, int64_t N, double function(int64_t)) {
auto end = std::chrono::system_clock::now();
std::chrono::duration<double, std::milli> diff = end - start;
result.time = diff.count() / maxNumExec;
result.threads = numThreads;
result.threads = omp_get_thread_num();
return result;
}

View File

@@ -1,4 +1,3 @@
#include "matrix.h"
#include <chrono>
#include <cstdint>
#include <fstream>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -20,8 +20,20 @@ data_single["error"] = data_single.apply(lambda x: calculate_error(x["pi"]), axi
data_multi["error"] = data_multi.apply(lambda x: calculate_error(x["pi"]), axis=1)
plt.figure(figsize=(8, 5))
plt.plot(data_multi["error"], color="red", label="multi", linewidth=0.1)
plt.plot(data_single["error"], color="blue", label="single", linewidth=0.1)
plt.plot(
data_single["error"].index * 1000,
data_single["error"],
color="blue",
label="single",
linewidth=0.1,
)
plt.plot(
data_multi["error"].index * 5000,
data_multi["error"],
color="red",
label="multi",
linewidth=0.1,
)
plt.xlabel("time")
plt.ylabel("error")
plt.title("pin Monte Carlo Benchmark")

File diff suppressed because it is too large Load Diff