2#include "plumbing/timing.h"
12int main(
int argc,
char **argv) {
14 struct timeval start, end;
19 lattice.
setup(latsize);
29 onsites(
ALL) { d[X].random(); }
35 for (n_runs = 1; timing < mintime;) {
37 gettimeofday(&start, NULL);
38 for (
int i = 0; i < n_runs; i++) {
42 gettimeofday(&end, NULL);
43 timing = timediff(start, end);
46 timing = timing / (double)n_runs;
47 hila::out0 <<
"FFT double precision : " << timing <<
" ms \n";
53 onsites(
ALL) { f[X].random(); }
56 for (n_runs = 1; timing < mintime;) {
58 gettimeofday(&start, NULL);
59 for (
int i = 0; i < n_runs; i++) {
63 gettimeofday(&end, NULL);
64 timing = timediff(start, end);
67 timing = timing / (double)n_runs;
68 hila::out0 <<
"FFT single precision : " << timing <<
" ms \n";
The field class implements the standard methods for accessing Fields. Hilapp replaces the parity acce...
Matrix class which defines matrix operations.
void setup(const CoordinateVector &siz)
General lattice setup.
constexpr Parity ALL
bit pattern: 011
void FFT_field(const Field< T > &input, Field< T > &result, const CoordinateVector &directions, fft_direction fftdir=fft_direction::forward)
std::ostream out0
This writes output only from main process (node 0)
void initialize(int argc, char **argv)
Read in command line arguments. Initialise default stream and MPI communication.
void seed_random(uint64_t seed, bool device_rng=true)
Seed random generators with 64-bit unsigned value. On MPI shuffles the seed so that different MPI ran...
T broadcast(T &var, int rank=0)
Broadcast the value of var to all MPI ranks from rank (default=0).
void finishrun()
Normal, controlled exit - all nodes must call this. Prints timing information and information about c...