AIETargetModel.h: Function descriptions don't match their behaviour
AndraBisca opened this issue · 1 comments
AndraBisca commented
Assuming that tile(0,0)
is in the bottom-left corner of the AIE array, the function descriptions below don't match their output. For example, isWest
"Returns true if src is West of dst" but the test srcCol == dstCol + 1
indicates that srcCol is larger than dstCol, which means that it is dst that is West of src. Similar for the other functions.
/// Return true if src is West of dst
bool isWest(int srcCol, int srcRow, int dstCol, int dstRow) const {
return srcCol == dstCol + 1 && srcRow == dstRow;
}
/// Return true if src is East of dst
bool isEast(int srcCol, int srcRow, int dstCol, int dstRow) const {
return srcCol == dstCol - 1 && srcRow == dstRow;
}
/// Return true if src is North of dst
bool isNorth(int srcCol, int srcRow, int dstCol, int dstRow) const {
return srcCol == dstCol && srcRow == dstRow - 1;
}
/// Return true if src is South of dst
bool isSouth(int srcCol, int srcRow, int dstCol, int dstRow) const {
return srcCol == dstCol && srcRow == dstRow + 1;
}
AndraBisca commented
These functions are used in #974.