MCPcopy Create free account
hub / github.com/Tencent/embedx / Load

Method Load

src/io/loader/loader.cc:22–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20namespace embedx {
21
22bool Loader::Load(const std::string& path, int thread_num) {
23 vec_str_t files;
24 if (!io_util::ListFile(path, &files)) {
25 return false;
26 }
27
28 thread_num = std::min(thread_num, (int)files.size());
29 if (!io_util::ParallelProcess<std::string>(
30 files,
31 [this](const vec_str_t& files, int thread_id) {
32 return LoadEntry(files, thread_id);
33 },
34 thread_num)) {
35 DXERROR("Failed to load files.");
36 return false;
37 }
38
39 return true;
40}
41
42} // namespace embedx

Callers 12

TestLocalMethod · 0.45
TestRemoteShard0Method · 0.45
TestRemoteShard1Method · 0.45
TestLocalMethod · 0.45
TestRemoteShard0Method · 0.45
TestRemoteShard1Method · 0.45
BuildMethod · 0.45
InitMethod · 0.45
TEST_FFunction · 0.45
BuildContextMethod · 0.45
BuildNodeFeatureMethod · 0.45
BuildNeighborFeatureMethod · 0.45

Calls 1

ListFileFunction · 0.85

Tested by 7

TestLocalMethod · 0.36
TestRemoteShard0Method · 0.36
TestRemoteShard1Method · 0.36
TestLocalMethod · 0.36
TestRemoteShard0Method · 0.36
TestRemoteShard1Method · 0.36
TEST_FFunction · 0.36