mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-peak.git
synced 2025-09-29 06:37:33 +00:00
Fix asserts for get_index
This commit is contained in:
@@ -329,7 +329,8 @@ float matrix::operator[](uint16_t i) {
|
||||
}
|
||||
|
||||
uint16_t matrix::get_idx(uint8_t r, uint8_t c) {
|
||||
STA_ASSERT_MSG(r * c <= get_size(), "Index out of bounds get_idx");
|
||||
STA_ASSERT_MSG(c < get_cols(), "Column index out of bounds get_idx");
|
||||
STA_ASSERT_MSG(r < get_rows(), "Row index out of bounds get_idx");
|
||||
|
||||
return (r * get_cols()) + c;
|
||||
|
||||
|
Reference in New Issue
Block a user