Skip to content

Commit

Permalink
Checking for a user interrupt during registrations
Browse files Browse the repository at this point in the history
  • Loading branch information
jonclayden committed Apr 5, 2016
1 parent d27d545 commit fcd30ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/reg-lib/_reg_aladin.cpp
Expand Up @@ -602,6 +602,9 @@ void reg_aladin<T>::resolveMatrix(unsigned int iterations, const unsigned int op
this->UpdateTransformationMatrix(optimizationFlag);

iteration++;
#ifdef RNIFTYREG
Rcpp::checkUserInterrupt();
#endif
}

#ifdef RNIFTYREG
Expand Down
4 changes: 4 additions & 0 deletions src/reg-lib/_reg_base.cpp
Expand Up @@ -1272,6 +1272,10 @@ void reg_base<T>::Run()

// Update the obecjtive function variables and print some information
this->PrintCurrentObjFunctionValue(currentSize);

#ifdef RNIFTYREG
Rcpp::checkUserInterrupt();
#endif
} // while

#ifdef RNIFTYREG
Expand Down

0 comments on commit fcd30ea

Please sign in to comment.