Skip to content

Instantly share code, notes, and snippets.

@niklasfi
Created July 26, 2013 11:17
Show Gist options
  • Save niklasfi/6088110 to your computer and use it in GitHub Desktop.
Save niklasfi/6088110 to your computer and use it in GitHub Desktop.
void set_threads(){
#ifdef SCSL
openblas_set_num_threads(1);
#elifdef SCPL
openblas_set_num_threads(num_threads());
#elifdef PCSL
openblas_set_num_threads(1);
#else
_Static_assert (0, "you did not pass appropriate compiler flags. Make sure that either SCSL, SCPL or PCSL is set.");
#endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment