GCC Code Coverage Report


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

src/str/hash/substr2/lib.hpp
Line Branch Exec Source
1 #pragma once
2
3 #include "../substr/lib.hpp"
4
5 namespace tifa_libs {
6
7 template <class mint0, class mint1, u32 base = 131>
8 class hash_substr2 {
9 hash_substr<mint0, base> h0;
10 hash_substr<mint1, base> h1;
11
12 public:
13 606 CEXP void set(strnv s) NE { h0.set(s), h1.set(s); }
14 267705456 ND CEXP u32 size() CNE { return h0.size(); }
15 4810505208 CEXP std::pair<mint0, mint1> get(u32 pos, u32 len = -1_u32) CNE { return {h0.get(pos, len), h1.get(pos, len)}; }
16 };
17
18 } // namespace tifa_libs
19