MCPcopy Create free account
hub / github.com/alibaba/MNN / root

Method root

test/model/SqueezeNetTest.cpp:26–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24 virtual ~SqueezeNetTest() = default;
25
26 std::string root() {
27#ifdef __APPLE__
28 auto bundle = CFBundleGetMainBundle();
29 auto url = CFBundleCopyBundleURL(bundle);
30 auto string = CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle);
31 CFRelease(url);
32 auto cstring = CFStringGetCStringPtr(string, kCFStringEncodingUTF8);
33 auto css = std::string(cstring);
34 CFRelease(string);
35 return css;
36#else
37 return "../resource"; // assume run in build dir
38#endif
39 }
40
41 std::string path() {
42 return this->root() + "/model/SqueezeNet";

Callers 1

pathMethod · 0.95

Calls 1

stringFunction · 0.50

Tested by

no test coverage detected