 
   cuda::copy_on_device(dev_qr, dev_matrix, matrix.size());
 
-  for (auto iter = 0; iter < 50; ++iter) {
+  for (auto k = 0; k < K_MAX; ++k) {
     // Compute QR factorization.
     solver_status = cusolverDnSgeqrf(solver_handle, n, n, dev_qr, n, dev_tau, dev_workspace, workspace_size, dev_info);
     assert(solver_status == CUSOLVER_STATUS_SUCCESS);

  }
}

int main(int argc, char* argv[])
{
  const auto n = 4;
  const std::vector<float> matrix {

  if (solver_handle) cusolverDnDestroy(solver_handle);

  cuda::device_reset();
}
