File: utilities.h

package info (click to toggle)
purify 4.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 182,264 kB
  • sloc: cpp: 16,485; python: 449; xml: 182; makefile: 7; sh: 6
file content (49 lines) | stat: -rw-r--r-- 2,020 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef BENCHMARK_UTILITIES_H
#define BENCHMARK_UTILITIES_H

#include <chrono>
#include <benchmark/benchmark.h>
#include "purify/uvw_utilities.h"
#ifdef PURIFY_MPI
#include <sopt/mpi/communicator.h>
#endif

using namespace purify;

namespace b_utilities {

void Arguments(benchmark::internal::Benchmark* b);

double duration(std::chrono::high_resolution_clock::time_point start,
                std::chrono::high_resolution_clock::time_point end);

bool updateImage(t_uint newSize, Image<t_complex>& image, t_uint& sizex, t_uint& sizey);
bool updateEmptyImage(t_uint newSize, Vector<t_complex>& image, t_uint& sizex, t_uint& sizey);

bool updateMeasurements(t_uint newSize, utilities::vis_params& data);
bool updateMeasurements(t_uint newSize, utilities::vis_params& data, t_real& epsilon, bool newImage,
                        Image<t_complex>& image);

std::tuple<utilities::vis_params, t_real> dirty_measurements(
    Image<t_complex> const& ground_truth_image, t_uint number_of_vis, t_real snr,
    const t_real& cellsize);

utilities::vis_params random_measurements(t_int size, const t_real max_w = 100, const t_int id = 0);
#ifdef PURIFY_MPI
double duration(std::chrono::high_resolution_clock::time_point start,
                std::chrono::high_resolution_clock::time_point end,
                sopt::mpi::Communicator const& comm);
bool updateMeasurements(t_uint newSize, utilities::vis_params& data, sopt::mpi::Communicator& comm);
bool updateMeasurements(t_uint newSize, utilities::vis_params& data, t_real& epsilon, bool newImage,
                        Image<t_complex>& image, sopt::mpi::Communicator& comm);
std::tuple<utilities::vis_params, t_real> dirty_measurements(
    Image<t_complex> const& ground_truth_image, t_uint number_of_vis, t_real snr,
    const t_real& cellsize, sopt::mpi::Communicator const& comm);
utilities::vis_params random_measurements(t_int size, sopt::mpi::Communicator const& comm);

void update_comm(sopt::mpi::Communicator& comm);

#endif
}  // namespace b_utilities

#endif