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

Function FindKernelNameFromString

src/library/tools/bingen/bingen.cpp:305–327  ·  view source on GitHub ↗

we know the input string will be in the form :static const char* kernelname = \"

Source from the content-addressed store, hash-verified

303
304//we know the input string will be in the form :static const char* kernelname = \"
305string FindKernelNameFromString(string inputLine)
306{
307 string result;
308 size_t pos = inputLine.find( '*' );
309
310 size_t StartKernelName = 1+pos;
311 char space = inputLine[StartKernelName];
312 while(space==' ')
313 {
314 StartKernelName++;
315 space = inputLine[StartKernelName];
316 }
317
318 size_t endKernelName = StartKernelName+1;
319 space = inputLine[endKernelName];
320 while(space!=' ')
321 {
322 endKernelName++;
323 space = inputLine[endKernelName];
324 }
325 result = inputLine.substr(StartKernelName,endKernelName-StartKernelName );
326 return result;
327}
328
329
330int main( int argc, char *argv[] )

Callers 1

mainFunction · 0.85

Calls 1

findMethod · 0.80

Tested by

no test coverage detected