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

Method vectorSize

src/library/tools/ktest/step.cpp:474–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474std::string
475Step::vectorSize(VectorVariable *vector)
476{
477 std::stringstream size;
478
479 if (vector->nElems() == NULL) {
480 return "";
481 }
482
483 if (vector->off() != NULL) {
484 size << vector->off()->name() << " + ";
485 }
486 if (vector->inc() == NULL) {
487 size << vector->nElems()->name();
488 }
489 else {
490 size << "1 + (" << vector->nElems()->name() << " - 1) * abs("
491 << vector->inc()->name() << ")";
492 }
493 return size.str();
494}
495
496void
497Step::assignKargs(const StepKargs& map)

Callers 2

generateMainMethod · 0.80
getBufferSizeExprMethod · 0.80

Calls 3

nElemsMethod · 0.80
incMethod · 0.80
offMethod · 0.45

Tested by 2

generateMainMethod · 0.64
getBufferSizeExprMethod · 0.64