MCPcopy Create free account
hub / github.com/apache/singa / GetInstance

Method GetInstance

src/utils/channel.cc:46–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46Channel* ChannelManager::GetInstance(const std::string& channel) {
47 // find the channel
48 if (name2ptr_.find(channel) == name2ptr_.end()) {
49 // create new channel
50 Channel* chn = new Channel(channel);
51 chn->SetDestFilePath(dir_ + channel);
52 chn->EnableDestFile(true);
53 name2ptr_[channel] = chn;
54 }
55 return name2ptr_[channel];
56}
57
58Channel::Channel(const std::string& name) { name_ = name; }
59

Callers 1

GetChannelFunction · 0.45

Calls 3

SetDestFilePathMethod · 0.80
EnableDestFileMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected