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

Method GetPermuteVec

src/armnn/Descriptors.cpp:523–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

521}
522
523PermutationVector BatchMatMulDescriptor::GetPermuteVec(
524 DataLayout dataLayout,
525 const TensorShape& tensorShape)
526{
527 std::vector<unsigned int> vec;
528 auto axesToMul = BatchMatMulDescriptor::GetAxesToMul(dataLayout, tensorShape);
529 for(unsigned int i = 0; i < tensorShape.GetNumDimensions(); i++)
530 {
531 if(i == axesToMul.first)
532 {
533 vec.push_back(i+1);
534 }
535 else if(i == axesToMul.second)
536 {
537 vec.push_back(i-1);
538 }
539 else
540 {
541 vec.push_back(i);
542 }
543 }
544 return PermutationVector(vec.data(),
545 static_cast<unsigned int>(vec.size()));
546}
547
548}

Callers

nothing calls this directly

Calls 5

PermutationVectorClass · 0.85
push_backMethod · 0.80
GetNumDimensionsMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected