MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / SearchItemStorage

Class SearchItemStorage

dnn/test/common/fast_run_cache.h:11–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9namespace test {
10class FastRunCache {
11 struct SearchItemStorage {
12 std::string data_hold;
13 size_t hash = 0;
14
15 SearchItemStorage(const Algorithm::SearchItem& item);
16
17 SearchItemStorage& init_hash() {
18 hash = XXHash64CT::hash(data_hold.data(), data_hold.size(), 20201225);
19 return *this;
20 }
21
22 bool operator==(const SearchItemStorage& rhs) const {
23 return data_hold == rhs.data_hold;
24 }
25
26 struct Hash {
27 size_t operator()(const SearchItemStorage& s) const { return s.hash; }
28 };
29 };
30
31 std::unordered_map<
32 SearchItemStorage, Algorithm::Info::Desc, SearchItemStorage::Hash>

Callers

nothing calls this directly

Calls 3

hashFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected