GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 7 / 0 / 7
Functions: 100.0% 7 / 0 / 7
Branches: 90.0% 9 / 0 / 10

src/util/util/lib.hpp
Line Branch Exec Source
1 #pragma once
2 // https://github.com/Tiphereth-A/CP-lib
3 #include <bits/extc++.h>
4 // clang-format off
5 namespace tifa_libs {
6
7 #define CEXP constexpr
8 #define CEXPE constexpr explicit
9 #define CR const&
10 #define CP const*
11 #define PC *const
12 #define CPC const*const
13 #define TPN typename
14 #define NE noexcept
15 #define CNE const noexcept
16 #define ND [[nodiscard]]
17 #define cT_(...) std::conditional_t<sizeof(__VA_ARGS__) <= sizeof(size_t) * 2, __VA_ARGS__, __VA_ARGS__ CR>
18 // NOLINTNEXTLINE(misc-const-correctness)
19 #define flt_(T, i, l, r, ...) for (T i = (l), i##e = (r)__VA_OPT__(, ) __VA_ARGS__; i < i##e; ++i)
20 #define retif_(cond, if_true, ...) if cond return if_true __VA_OPT__(; else return __VA_ARGS__)
21 #ifdef ONLINE_JUDGE
22 #undef assert
23 #define assert(x) 42
24 #endif
25
26 using namespace std::ranges;
27 using namespace std::literals;
28
29 template <class T>
30
9/10
double tifa_libs::abs<double>(double):
✓ Branch 0 taken 257294109 times.
✓ Branch 1 taken 451246391 times.
float tifa_libs::abs<float>(float):
✗ Branch 0 not taken.
✓ Branch 1 taken 10000000 times.
int tifa_libs::abs<int>(int):
✓ Branch 0 taken 94231297 times.
✓ Branch 1 taken 54797 times.
long double tifa_libs::abs<long double>(long double):
✓ Branch 0 taken 2824487967 times.
✓ Branch 1 taken 2840917563 times.
long tifa_libs::abs<long>(long):
✓ Branch 0 taken 4138427433 times.
✓ Branch 1 taken 11610331674 times.
22386528477 CEXP T abs(T x) NE { retif_((x < 0), -x, x); }
31
32 } // namespace tifa_libs
33 // clang-format on
34