diff options
Diffstat (limited to 'compute_kernel_writer/src/cl/CLTile.cpp')
-rw-r--r-- | compute_kernel_writer/src/cl/CLTile.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compute_kernel_writer/src/cl/CLTile.cpp b/compute_kernel_writer/src/cl/CLTile.cpp index 556db0f47b..0cce69a9e1 100644 --- a/compute_kernel_writer/src/cl/CLTile.cpp +++ b/compute_kernel_writer/src/cl/CLTile.cpp @@ -125,6 +125,9 @@ TileVariable CLTile::vector(int32_t row) const TileVariable CLTile::vector(int32_t row, int32_t col_start, int32_t width) const { + CKW_ASSERT(col_start >= 0 && col_start < _info.width()); + CKW_ASSERT(col_start + width <= _info.width()); + // Validate the new vector length cl_validate_vector_length(width); @@ -154,7 +157,7 @@ TileVariable CLTile::vector(int32_t row, int32_t col_start, int32_t width) const { t.str = create_var_name(row); - if(_info.width() != 1) + if(_info.width() != 1 && _info.width() != width) { t.str += ".s"; for(int i = 0; i < width; ++i) |