finish 2
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 |
@@ -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
Reference in New Issue
Block a user