Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions include/matx/operators/remap.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,12 @@ namespace matx

// convert variadic type to tuple so we can read/update
std::array<index_t, Rank()> ind{indices...};
// get current index for dim
auto i = ind[DIM];

// remap current index for dim
if constexpr (IdxType::Rank() == 0) {
ind[DIM] = idx_();
} else {
ind[DIM] = idx_(i);
ind[DIM] = idx_(ind[DIM]);
}
//return op_(ind);
return mapply(op_, ind);
Expand All @@ -93,13 +92,12 @@ namespace matx

// convert variadic type to tuple so we can read/update
std::array<index_t, Rank()> ind{indices...};
// get current index for dim
auto i = ind[DIM];

// remap current index for dim
if constexpr (IdxType::Rank() == 0) {
ind[DIM] = idx_();
} else {
ind[DIM] = idx_(i);
ind[DIM] = idx_(ind[DIM]);
}
//return op_(ind);
return mapply(op_, ind);
Expand Down