Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Hyukjin Jeong <[email protected]>
Co-authored-by: SaeHie Park <[email protected]>
  • Loading branch information
3 people authored Jan 21, 2025
1 parent ba9b962 commit 17c9dcf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions compiler/luci/pass/src/helpers/ArrayIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace luci
{

/// @brief Index class for 4D tensor to calculate linear index from multi-dimensional indices.
class Array4DIndex
class Array4DIndex final
{
public:
Array4DIndex(uint32_t d0, uint32_t d1, uint32_t d2, uint32_t d3);
Expand All @@ -37,7 +37,7 @@ class Array4DIndex
/// @brief Get stride of the given axis.
uint32_t stride(uint32_t axis) const;

protected:
private:
uint32_t _dim[4];
uint32_t _strides[4];
};
Expand Down
2 changes: 1 addition & 1 deletion compiler/luci/pass/src/helpers/ArrayIndex.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TEST(LuciPassHelpersArrayIndex, array_index_4d)
EXPECT_EQ(idx(4, 3, 2, 1), 4 * 4 * 3 * 2 + 3 * 3 * 2 + 2 * 2 + 1);
}

TEST(LuciPassHelpersArrayIndex, array_index_4d_NEG)
TEST(LuciPassHelpersArrayIndex, array_invalid_index_4d_NEG)
{
luci::Array4DIndex idx(4, 4, 3, 2);

Expand Down

0 comments on commit 17c9dcf

Please sign in to comment.