onnxruntime/core/providers/cpu/tensor/transpose.cc
void DoTransposeEltWise(int64_t num_axes, const std::vector<int64_t>& target_dims,
                        size_t num_blocks,
                        const std::vector<size_t>& stride,
                        float* target, const float* source) {
  // index used to iterate over target iteration-space
  std::vector<int64_t> target_index(num_axes, 0);
  for (size_t i = 0; i < num_blocks; ++i) {
    // convert target_index into an offset in source data
    size_t source_offset = ComputeOffset(target_index, stride, num_axes);

    // copy
    *target = *(source + source_offset);

    // increment target_index:
    IncrementIndex(target_index, target_dims, num_axes);
    target++;
  }
}
// DoTransposeEltWise: specialization of DoTranspose for the num_elts_in_block=1 case.
// copies source tensor to target, transposing elements.
// The stride vector indicates the transposition.
specialization of DoTranspose for the num_elts_in_block=1 case.
copies source tensor to target, transposing elements.
The stride vector indicates the transposition.
specialization of DoTranspose for the num_elts_in_block = 1 case . copies source tensor to target transposing elements . The stride vector indicates the transposition .
void DoTransposeEltWise(int64_t num_axes, const std::vector<int64_t>& target_dims,
                        size_t num_blocks,
                        const std::vector<size_t>& stride,
                        float* target, const float* source) {
  std::vector<int64_t> target_index(num_axes, 0);
  for (size_t i = 0; i < num_blocks; ++i) {
    size_t source_offset = ComputeOffset(target_index, stride, num_axes);
    *target = *(source + source_offset);
    IncrementIndex(target_index, target_dims, num_axes);
    target++;
  }
}
void DoTransposeEltWise ( int64_t num_axes , const std :: vector < int64_t > & target_dims , size_t num_blocks , const std :: vector < size_t > & stride , float * target , const float * source ) { std :: vector < int64_t > target_index ( num_axes , 0 ) ; for ( size_t i = 0 ; i < num_blocks ; ++ i ) { size_t source_offset = ComputeOffset ( target_index , stride , num_axes ) ; * target = * ( source + source_offset ) ; IncrementIndex ( target_index , target_dims , num_axes ) ; target ++ ; } }
DoTransposeEltWise: specialization of DoTranspose for the num_elts_in_block=1 case.
DoTransposeEltWise : specialization of DoTranspose for the num_elts_in_block = 1 case .
// index used to iterate over target iteration-space // convert target_index into an offset in source data // copy // increment target_index: