MCPcopy Create free account
hub / github.com/ARM-software/armnn / ClBackendModelContext

Method ClBackendModelContext

src/backends/cl/ClBackendModelContext.cpp:34–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32{
33
34ClBackendModelContext::ClBackendModelContext(const ModelOptions& modelOptions)
35 : m_CachedNetworkFilePath(""), m_IsFastMathEnabled(false), m_SaveCachedNetwork(false), m_CachedFileDescriptor(-1)
36{
37 if (!modelOptions.empty())
38 {
39 ParseOptions(modelOptions, "GpuAcc", [&](std::string name, const BackendOptions::Var& value)
40 {
41 if (name == "FastMathEnabled")
42 {
43 m_IsFastMathEnabled |= ParseBool(value, false);
44 }
45 if (name == "SaveCachedNetwork")
46 {
47 m_SaveCachedNetwork |= ParseBool(value, false);
48 }
49 if (name == "CachedNetworkFilePath")
50 {
51 m_CachedNetworkFilePath = ParseFile(value, "");
52 }
53 if (name == "CachedFileDescriptor")
54 {
55 m_CachedFileDescriptor = armnn::ParseIntBackendOption(value, -1);
56 }
57 });
58 }
59}
60
61std::string ClBackendModelContext::GetCachedNetworkFilePath() const
62{

Callers

nothing calls this directly

Calls 5

ParseFileFunction · 0.85
ParseIntBackendOptionFunction · 0.85
emptyMethod · 0.80
ParseBoolFunction · 0.70
ParseOptionsFunction · 0.50

Tested by

no test coverage detected