#include <chrono>
#include <benchmark/benchmark.h>
#include "benchmarks/utilities.h"
#include "purify/operators.h"
Go to the source code of this file.
◆ Args()
Args |
( |
{1024, 1000000, 4} |
| ) |
-> Args({1024, 10000000, 4}) ->UseManualTime() ->Repetitions(10) ->Unit(benchmark::kMillisecond) |
◆ BENCHMARK_DEFINE_F() [1/2]
Definition at line 123 of file measurement_operator.cc.
125 if ((m_counter % 10) == 1) {
126 m_image = m_degridOperator->adjoint() * m_uv_data.vis;
128 while (state.KeepRunning()) {
129 auto start = std::chrono::high_resolution_clock::now();
130 m_image = m_degridOperator->adjoint() * m_uv_data.vis;
131 auto end = std::chrono::high_resolution_clock::now();
135 state.SetBytesProcessed(int64_t(state.iterations()) * (state.range(1) + m_imsizey * m_imsizex) *
double duration(std::chrono::high_resolution_clock::time_point start, std::chrono::high_resolution_clock::time_point end)
References b_utilities::duration().
◆ BENCHMARK_DEFINE_F() [2/2]
Definition at line 107 of file measurement_operator.cc.
109 if ((m_counter % 10) == 1) {
110 m_uv_data.vis = (*m_degridOperator) * Image<t_complex>::Map(m_image.data(), m_image.size(), 1);
112 while (state.KeepRunning()) {
113 auto start = std::chrono::high_resolution_clock::now();
114 m_uv_data.vis = (*m_degridOperator) * Image<t_complex>::Map(m_image.data(), m_image.size(), 1);
115 auto end = std::chrono::high_resolution_clock::now();
119 state.SetBytesProcessed(int64_t(state.iterations()) * (state.range(1) + m_imsizey * m_imsizex) *
References b_utilities::duration().
◆ BENCHMARK_MAIN()
◆ degrid_operator_ctor()
void degrid_operator_ctor |
( |
benchmark::State & |
state | ) |
|
Definition at line 10 of file measurement_operator.cc.
12 t_int
const rows = state.range(0);
13 t_int
const cols = state.range(0);
14 t_int
const number_of_vis = state.range(1);
18 const t_real cellsize = FoV / cols * 60. * 60.;
21 static t_uint counter = 0;
24 if ((counter % 10) == 1) {
25 auto sky_measurements = measurementoperator::init_degrid_operator_2d<Vector<t_complex>>(
26 uv_data, rows, cols, cellsize, cellsize, 2, kernels::kernel::kb, state.range(2),
29 while (state.KeepRunning()) {
30 auto start = std::chrono::high_resolution_clock::now();
31 auto sky_measurements = measurementoperator::init_degrid_operator_2d<Vector<t_complex>>(
32 uv_data, rows, cols, cellsize, cellsize, 2, kernels::kernel::kb, state.range(2),
34 auto end = std::chrono::high_resolution_clock::now();
39 state.SetBytesProcessed(int64_t(state.iterations()) * (number_of_vis + rows * cols) *
utilities::vis_params random_measurements(t_int size, const t_real max_w, const t_int id, const bool cache_visibilities)
References b_utilities::duration(), purify::kernels::kb, and b_utilities::random_measurements().