2021-10-12 15:04:08 +02:00
|
|
|
/*
|
2022-09-05 10:39:42 +02:00
|
|
|
* Copyright (C) 2022 NHR@FAU, University Erlangen-Nuremberg.
|
|
|
|
* All rights reserved. This file is part of MD-Bench.
|
|
|
|
* Use of this source code is governed by a LGPL-3.0
|
|
|
|
* license that can be found in the LICENSE file.
|
2021-10-12 15:04:08 +02:00
|
|
|
*/
|
|
|
|
#include <atom.h>
|
|
|
|
#include <parameter.h>
|
|
|
|
|
|
|
|
#ifndef __STATS_H_
|
|
|
|
#define __STATS_H_
|
|
|
|
typedef struct {
|
2022-02-08 00:55:27 +01:00
|
|
|
long long int calculated_forces;
|
|
|
|
long long int num_neighs;
|
|
|
|
long long int force_iters;
|
2022-02-25 14:19:48 +01:00
|
|
|
long long int atoms_within_cutoff;
|
|
|
|
long long int atoms_outside_cutoff;
|
2022-02-28 16:10:09 +01:00
|
|
|
long long int clusters_within_cutoff;
|
|
|
|
long long int clusters_outside_cutoff;
|
2021-10-12 15:04:08 +02:00
|
|
|
} Stats;
|
|
|
|
|
|
|
|
void initStats(Stats *s);
|
2021-10-12 22:39:54 +02:00
|
|
|
void displayStatistics(Atom *atom, Parameter *param, Stats *stats, double *timer);
|
2021-10-12 15:04:08 +02:00
|
|
|
|
|
|
|
#ifdef COMPUTE_STATS
|
|
|
|
# define addStat(stat, value) stat += value;
|
|
|
|
# define beginStatTimer() double Si = getTimeStamp();
|
|
|
|
# define endStatTimer(stat) stat += getTimeStamp() - Si;
|
|
|
|
#else
|
|
|
|
# define addStat(stat, value)
|
|
|
|
# define beginStatTimer()
|
|
|
|
# define endStatTimer(stat)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|