utils.cc
std::vector<uint32_t> GetOvxTransposePerm(const std::vector<uint32_t>& perm) {
  std::vector<uint32_t> perm_out(perm.rbegin(), perm.rend());
  std::vector<uint32_t> perm_in, ovx_perm;
  for (int i = perm.size() - 1; i >= 0; i--) {
    perm_in.push_back(i);
  }
  for (auto o : perm_out) {
    for (int i = 0; i < perm_in.size(); i++) {
      if (o == perm_in[i]) {
        ovx_perm.push_back(i);
        break;
      }
    }
  }

  return ovx_perm;
}
// Convert the perm in TfLite to the perm in vx-delegate when transpose.
Convert the perm in TfLite to the perm in vx-delegate when transpose.
Convert the perm in TfLite to the perm in vx - delegate when transpose .
std::vector<uint32_t> GetOvxTransposePerm(const std::vector<uint32_t>& perm) {
  std::vector<uint32_t> perm_out(perm.rbegin(), perm.rend());
  std::vector<uint32_t> perm_in, ovx_perm;
  for (int i = perm.size() - 1; i >= 0; i--) {
    perm_in.push_back(i);
  }
  for (auto o : perm_out) {
    for (int i = 0; i < perm_in.size(); i++) {
      if (o == perm_in[i]) {
        ovx_perm.push_back(i);
        break;
      }
    }
  }
  return ovx_perm;
}
std :: vector < uint32_t > GetOvxTransposePerm ( const std :: vector < uint32_t > & perm ) { std :: vector < uint32_t > perm_out ( perm . rbegin ( ) , perm . rend ( ) ) ; std :: vector < uint32_t > perm_in , ovx_perm ; for ( int i = perm . size ( ) - 1 ; i >= 0 ; i -- ) { perm_in . push_back ( i ) ; } for ( auto o : perm_out ) { for ( int i = 0 ; i < perm_in . size ( ) ; i ++ ) { if ( o == perm_in [ i ] ) { ovx_perm . push_back ( i ) ; break ; } } } return ovx_perm ; }
Convert the perm in TfLite to the perm in vx-delegate when transpose.
Convert the perm in TfLite to the perm in vx - delegate when transpose .