MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / Create

Method Create

python/mod_cvcuda/nvcv/Stream.cpp:182–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182std::shared_ptr<Stream> Stream::Create()
183{
184 std::vector<std::shared_ptr<CacheItem>> vcont = Cache::Instance().fetch(Stream::Key{});
185
186 // None found?
187 if (vcont.empty())
188 {
189 std::shared_ptr<Stream> stream(new Stream());
190 Cache::Instance().add(*stream);
191 return stream;
192 }
193 else
194 {
195 // Get the first one
196 return std::static_pointer_cast<Stream>(vcont[0]);
197 }
198}
199
200Stream::Stream()
201 : m_owns(true)

Callers

nothing calls this directly

Calls 3

fetchMethod · 0.45
emptyMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected