8#ifndef SRC_VECTOR_VECTOR_DIST_PERFORMANCE_UTIL_HPP_
9#define SRC_VECTOR_VECTOR_DIST_PERFORMANCE_UTIL_HPP_
11#include <boost/property_tree/ptree.hpp>
12#include "Plot/GoogleChart.hpp"
13#include "vector_dist_performance_common.hpp"
16#define N_VERLET_TEST 3
28template<
unsigned int dim,
size_t prp = 0,
typename T,
typename V>
double benchmark_calc_forces(T & NN, V & vd,
float r_cut)
34 calc_forces<dim,prp>(NN,vd,r_cut);
48template<
typename V>
double benchmark_reorder(V & vd,
size_t m)
70template<
typename T,
typename V>
71double benchmark_get_celllist(T & NN, V & vd,
float r_cut)
78 NN = vd.getCellList(r_cut);
92template<
typename V>
double benchmark_get_verlet(V & vd,
float r_cut)
100 auto vr = vd.getVerlet(r_cut);
117template<
unsigned int dim,
size_t prp = 0,
typename T,
typename V>
double benchmark_calc_forces_hilb(T & NN, V & vd,
float r_cut)
123 calc_forces_hilb<dim,prp>(NN,vd,r_cut);
138template<
typename T,
typename V>
double benchmark_get_celllist_hilb(T & NN, V & vd,
float r_cut)
145 NN = vd.getCellList_hilb(r_cut);
158template<
unsigned int dim,
typename v_dist>
void move_particles(v_dist & vd,
double dist)
162 const double pi = 3.14159;
164 auto it = vd.getDomainIterator();
168 phi = rand()/double(RAND_MAX);
169 theta = rand()/double(RAND_MAX);
176 vd.getPos(key)[0] += dist*sin(theta)*cos(phi);
179 vd.getPos(key)[0] += dist*sin(theta)*cos(phi);
180 vd.getPos(key)[1] += dist*sin(theta)*sin(phi);
184 vd.getPos(key)[0] += dist*sin(theta)*cos(phi);
185 vd.getPos(key)[1] += dist*sin(theta)*sin(phi);
186 vd.getPos(key)[2] += dist*cos(phi);
201extern void StandardPerformanceGraph(std::string file_mean,
202 std::string file_var,
203 std::string file_mean_save,
204 std::string file_var_save,
211 std::string x_string,
212 std::string y_string,
Small class to produce graph with Google chart in HTML.
Implementation of 1-D std::vector like structure.
Class for cpu time benchmarking.
void stop()
Stop the timer.
void start()
Start the timer.
double getwct()
Return the elapsed real time.