GCC Code Coverage Report


Directory: ./
File: tasks/liulin_y_integ_mnog_func_monte_carlo/common/include/common.hpp
Date: 2026-01-10 02:40:41
Exec Total Coverage
Lines: 6 6 100.0%
Functions: 0 0 -%
Branches: 4 7 57.1%

Line Branch Exec Source
1 #pragma once
2
3 #include <cstdint>
4 #include <functional>
5 #include <string>
6 #include <tuple>
7 #include <utility>
8
9 #include "task/include/task.hpp"
10
11 namespace liulin_y_integ_mnog_func_monte_carlo {
12
13
3/5
✓ Branch 1 taken 100 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 100 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 100 times.
400 struct TaskInput {
14 double x_min = 0.0;
15 double x_max = 0.0;
16 double y_min = 0.0;
17 double y_max = 0.0;
18 std::function<double(double, double)> f;
19 int64_t num_points = 0;
20
21 TaskInput() = default;
22
23 TaskInput(double x_min_val, double x_max_val, double y_min_val, double y_max_val,
24 std::function<double(double, double)> func, int64_t n_points)
25 100 : x_min(x_min_val),
26 100 x_max(x_max_val),
27 100 y_min(y_min_val),
28
1/2
✓ Branch 0 taken 100 times.
✗ Branch 1 not taken.
100 y_max(y_max_val),
29 f(std::move(func)),
30 100 num_points(n_points) {}
31 };
32
33 using InType = TaskInput;
34 using OutType = double;
35 using TestType = std::tuple<int, std::string>;
36 using BaseTask = ppc::task::Task<InType, OutType>;
37
38 } // namespace liulin_y_integ_mnog_func_monte_carlo
39