Commit 8874151b authored by tadej's avatar tadej
Browse files

fixes according to review

Showing with 10 additions and 10 deletions
+10 -10
......@@ -47,13 +47,13 @@ static const char *sub_block_kernel_code = STRINGIFY(
unsigned int dst_offset_j, unsigned int size_i, unsigned int size_j,
unsigned int src_rows, unsigned int src_cols, unsigned int dst_rows,
unsigned int dst_cols, unsigned int partial_view) {
int i = get_global_id(0);
int j = get_global_id(1);
const int i = get_global_id(0);
const int j = get_global_id(1);
int src_idx_i = i + src_offset_i;
int src_idx_j = j + src_offset_j;
int dst_idx_i = i + dst_offset_i;
int dst_idx_j = j + dst_offset_j;
const int src_idx_i = i + src_offset_i;
const int src_idx_j = j + src_offset_j;
const int dst_idx_i = i + dst_offset_i;
const int dst_idx_j = j + dst_offset_j;
if (src_idx_i < src_rows && src_idx_j < src_cols && dst_idx_i < dst_rows
&& dst_idx_j < dst_cols) {
......
......@@ -62,14 +62,14 @@ inline void matrix_cl<T, enable_if_arithmetic<T>>::sub_block(
this->rows(), this->cols(), A.partial_view());
}
// calculation of extreme sub- and super- diagonal written
int diag_in_copy = A_i - A_j;
int copy_low = is_not_diagonal(A.partial_view(), PartialViewCL::Lower)
const int diag_in_copy = A_i - A_j;
const int copy_low = is_not_diagonal(A.partial_view(), PartialViewCL::Lower)
? 1 - nrows
: diag_in_copy;
int copy_high = is_not_diagonal(A.partial_view(), PartialViewCL::Upper)
const int copy_high = is_not_diagonal(A.partial_view(), PartialViewCL::Upper)
? ncols - 1
: diag_in_copy;
int start = this_j - this_i;
const int start = this_j - this_i;
if (start + copy_low < 0) {
this->partial_view_ = this->partial_view_ + PartialViewCL::Lower;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment