Add useful data volume calculation for force kernel

Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com>
This commit is contained in:
Rafael Ravedutti
2021-10-11 16:57:02 +02:00
parent 4e0390404a
commit f295f54fca
5 changed files with 20 additions and 12 deletions

View File

@@ -16,7 +16,7 @@
#define LATTICE_DISTANCE 10.0
#define NEIGH_DISTANCE 1.0
extern double computeForce(Parameter*, Atom*, Neighbor*, int, int, int);
extern double computeForce(Parameter*, Atom*, Neighbor*, int, int);
void init(Parameter *param) {
param->epsilon = 1.0;
@@ -207,12 +207,12 @@ int main(int argc, const char *argv[]) {
DEBUG("Building neighbor lists...\n");
buildNeighbor(atom, &neighbor);
DEBUG("Computing forces...\n");
computeForce(&param, atom, &neighbor, 1, 0, param.every);
computeForce(&param, atom, &neighbor, 1, 0);
double S, E;
S = getTimeStamp();
for(int i = 0; i < param.ntimes; i++) {
computeForce(&param, atom, &neighbor, 0, i + 1, param.every);
computeForce(&param, atom, &neighbor, 0, i + 1);
}
E = getTimeStamp();
double T_accum = E-S;