[all-commits] [llvm/llvm-project] a643bd: [mlir] add permutation utility

Aart Bik via All-commits all-commits at lists.llvm.org
Tue Aug 24 08:08:06 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a643bd3189aeee138187509a9bfec2f798798d76
      https://github.com/llvm/llvm-project/commit/a643bd3189aeee138187509a9bfec2f798798d76
  Author: Aart Bik <ajcbik at google.com>
  Date:   2021-08-24 (Tue, 24 Aug 2021)

  Changed paths:
    M mlir/include/mlir/IR/AffineMap.h
    M mlir/lib/IR/AffineMap.cpp

  Log Message:
  -----------
  [mlir] add permutation utility

I found myself typing this code several times at different places
by now, so time to make this a general utility instead. Given
a permutation, it returns the permuted position of the input,
for example (i,j,k) -> (k,i,j) yields position 1 for input 0.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D108347




More information about the All-commits mailing list