GCC Code Coverage Report


Directory: ./
File: tasks/lopatin_a_trapezoidal_integration/common/include/common.hpp
Date: 2026-01-09 01:27:18
Exec Total Coverage
Lines: 2 2 100.0%
Functions: 0 0 -%
Branches: 12 27 44.4%

Line Branch Exec Source
1 #pragma once
2
3 #include <functional>
4 #include <utility>
5
6 #include "task/include/task.hpp"
7
8 namespace lopatin_a_trapezoidal_integration {
9
10
11/25
✓ Branch 1 taken 50 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 10 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 10 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 10 times.
✗ Branch 12 not taken.
✓ Branch 13 taken 10 times.
✗ Branch 14 not taken.
✓ Branch 15 taken 10 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 10 times.
✗ Branch 19 not taken.
✓ Branch 20 taken 10 times.
✗ Branch 22 not taken.
✓ Branch 23 taken 10 times.
✗ Branch 24 not taken.
✓ Branch 25 taken 10 times.
✗ Branch 27 not taken.
✗ Branch 28 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
150 struct IntegrationData {
11 // boundaries of the rectangular integration region
12 double a, b;
13 double c, d;
14 // integrand
15 std::function<double(double, double)> f;
16 // grid dimension
17 int n;
18
19 explicit IntegrationData(double a = 0.0, double b = 0.0, double c = 0.0, double d = 0.0,
20 std::function<double(double, double)> &&f = [](double, double) { return 0.0; },
21 int n = 0) noexcept
22
1/2
✓ Branch 1 taken 50 times.
✗ Branch 2 not taken.
100 : a(a), b(b), c(c), d(d), f(std::move(f)), n(n) {};
23 };
24
25 using InType = IntegrationData;
26 using OutType = double;
27 using TestType = int;
28 using BaseTask = ppc::task::Task<InType, OutType>;
29
30 } // namespace lopatin_a_trapezoidal_integration
31