8 #ifndef SRC_VECTOR_PERFORMANCE_CL_COMP_PERFORMANCE_GRAPH_HPP_
9 #define SRC_VECTOR_PERFORMANCE_CL_COMP_PERFORMANCE_GRAPH_HPP_
11 #include "Plot/GoogleChart.hpp"
12 #include "vector_dist_performance_util.hpp"
27 template<
unsigned int dim>
void cl_comp_normal_vs_hilbert_force_time(
GoogleChart & cg,
34 double & warning_level,
37 std::string file_mean(test_dir);
38 std::string file_var(test_dir);
39 file_mean += std::string(
"/openfpm_pdata/cl_comp_norm_hilbert_mean_" + std::to_string(dim) + std::string(
"_ref"));
40 file_var += std::string(
"/openfpm_pdata/cl_comp_norm_hilbert_dev_" + std::to_string(dim) + std::string(
"_ref"));
42 std::string file_mean_save = std::string(
"cl_comp_norm_hilbert_mean_" + std::to_string(dim) + std::to_string(
"_ref"));
43 std::string file_var_save = std::string(
"cl_comp_norm_hilbert_dev_" + std::to_string(dim) + std::to_string(
"_ref"));
53 yp_mean.resize(cl_time_rand_mean.size());
54 yp_dev.resize(cl_time_rand_dev.size());
55 for (
size_t i = 0 ; i < yp_mean.
size() ; i++)
57 yp_mean.get(i).resize(cl_time_rand_mean.get(i).size());
58 yp_dev.get(i).resize(cl_time_rand_dev.get(i).size());
60 for (
size_t j = 0 ; j < yp_mean.get(i).
size() ; j++)
62 yp_mean.get(i).get(j).resize(2);
63 yp_dev.get(i).get(j).resize(2);
65 yp_mean.get(i).get(j).get(0) = cl_time_hilb_mean.get(i).get(j);
66 yp_dev.get(i).get(j).get(0) = cl_time_hilb_dev.get(i).get(j);
68 yp_mean.get(i).get(j).get(1) = cl_time_rand_mean.get(i).get(j);
69 yp_dev.get(i).get(j).get(1) = cl_time_rand_dev.get(i).get(j);
73 names.add(
"Hilbert cell list");
74 names.add(
"Random cell list");
76 for (
size_t i = 0 ; i < cl_r_cutoff.
size() ; i++)
77 gnames.add(
"Cell-list performance, cut-off radius: " + std::to_string(cl_r_cutoff.get(i)));
79 std::string y_string = std::string(
"Time to calculate forces");
80 std::string x_string = std::string(
"Number of particles");
82 std::string str(
"<h1>Cell-list " + std::to_string(dim) +
"-D performance test: </h1>");
83 str +=
"<h2> 1) Time to calculate forces</h2>";
86 StandardPerformanceGraph(file_mean,
112 template<
unsigned int dim>
void cl_comp_normal_vs_hilbert_create_time(
GoogleChart & cg,
119 double & warning_level,
122 std::string file_mean(test_dir);
123 std::string file_var(test_dir);
124 file_mean += std::string(
"/openfpm_pdata/cl_comp_create_norm_hilbert_mean_" + std::to_string(dim) + std::string(
"_ref"));
125 file_var += std::string(
"/openfpm_pdata/cl_comp_create_norm_hilbert_dev_" + std::to_string(dim) + std::string(
"_ref"));
127 std::string file_mean_save = std::string(
"cl_comp_create_norm_hilbert_mean_" + std::to_string(dim) + std::string(
"_ref"));
128 std::string file_var_save = std::string(
"cl_comp_create_norm_hilbert_dev_" + std::to_string(dim) + std::string(
"_ref"));
138 yp_mean.resize(cl_time_create_rand_mean.size());
139 yp_dev.resize(cl_time_create_rand_dev.size());
140 for (
size_t i = 0 ; i < yp_mean.
size() ; i++)
142 yp_mean.get(i).resize(cl_time_create_rand_mean.get(i).size());
143 yp_dev.get(i).resize(cl_time_create_rand_dev.get(i).size());
145 for (
size_t j = 0 ; j < yp_mean.get(i).
size() ; j++)
147 yp_mean.get(i).get(j).resize(2);
148 yp_dev.get(i).get(j).resize(2);
150 yp_mean.get(i).get(j).get(0) = cl_time_create_hilb_mean.get(i).get(j);
151 yp_dev.get(i).get(j).get(0) = cl_time_create_hilb_dev.get(i).get(j);
153 yp_mean.get(i).get(j).get(1) = cl_time_create_rand_mean.get(i).get(j);
154 yp_dev.get(i).get(j).get(1) = cl_time_create_rand_dev.get(i).get(j);
158 names.add(
"Hilbert cell list");
159 names.add(
"Random cell list");
161 for (
size_t i = 0 ; i < cl_r_cutoff.
size() ; i++)
162 gnames.add(
"Cell-list performance, cut-off radius: " + std::to_string(cl_r_cutoff.get(i)));
164 std::string y_string = std::string(
"Time to create the cell-list");
165 std::string x_string = std::string(
"Number of particles");
167 std::string str(
"<h1>Cell-list " + std::to_string(dim) +
"-D performance test: </h1>");
168 str +=
"<h2> 1) Time to create the cell-list</h2>";
171 StandardPerformanceGraph(file_mean,
void addHTML(const std::string &html)
Add HTML text.
Small class to produce graph with Google chart in HTML.