MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / get

Method get

src/library/blas/gens/kprintf.cpp:58–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57
58kprintf::fmt_t kprintf::get(const char *key)
59{
60 std::vector<struct fmt>::iterator t;
61 int l, knownLength, lengthKeyMax = -1;
62 struct fmt retval;
63
64 retval.key=NULL; retval.value=NULL;
65 knownLength = (int)strlen(key);
66
67 for(t = v.begin(); t != v.end(); t++)
68 {
69 l = (int)strlen((*t).key);
70 if (l > knownLength)
71 {
72 continue;
73 }
74 if (strncmp(key, (*t).key, l) == 0)
75 {
76 if (l > lengthKeyMax)
77 {
78 retval = (*t);
79 lengthKeyMax = l;
80 }
81 }
82 }
83 return retval;
84}
85
86
87const char * kprintf::findType(char *type)

Callers 2

GetTimeFunction · 0.45
mainFunction · 0.45

Calls 2

beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected