This is an archive of the discontinued LLVM Phabricator instance.

[mlir] add permutation utility
ClosedPublic

Authored by aartbik on Aug 18 2021, 6:09 PM.

Details

Summary

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.

Diff Detail

Event Timeline

aartbik created this revision.Aug 18 2021, 6:09 PM
aartbik requested review of this revision.Aug 18 2021, 6:09 PM
aartbik updated this revision to Diff 368270.Aug 23 2021, 9:44 PM

rebase with main

ftynse accepted this revision.Aug 24 2021, 1:43 AM
This revision is now accepted and ready to land.Aug 24 2021, 1:43 AM
This revision was automatically updated to reflect the committed changes.