| 521 | } |
| 522 | |
| 523 | PermutationVector 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 | } |
nothing calls this directly
no test coverage detected