 
     __syncthreads();
 
-    if (k < kb) break;
-
 #pragma unroll
     for (int l = 0; l < kb; l++) {
       saxpy(A[0], b[l], x);

  k = min(m - bi, mb);
  int l = 0;
  while (k > 0) {
    __syncthreads();

#pragma unroll
    for (int j = 0; j < nb; j += by)
      b[threadIdx.x][j + threadIdx.y] = B[j * ldb];


    __syncthreads();

#pragma unroll
    for (int l = 0; l < kb; l++) {
      saxpy(B[0], a[l], x);
