Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CVCUDA/CV-CUDA
/ getOrCreate
Method
getOrCreate
src/cvcuda/util/SimpleCache.hpp:69–76 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
67
68
template<typename CreateFunc>
69
T getOrCreate(CreateFunc &&create)
70
{
71
auto cached = get();
72
if (cached.has_value())
73
return std::move(cached).value();
74
else
75
return create();
76
}
77
78
void put(T &&payload)
79
{
Callers
1
TEST
Function · 0.80
Calls
1
value
Method · 0.45
Tested by
1
TEST
Function · 0.64