Add environment variable OMP_ADAPTIVE
@@ -39,6 +39,7 @@ static int openblas_env_block_factor=0;
static int openblas_env_openblas_num_threads=0;
static int openblas_env_goto_num_threads=0;
static int openblas_env_omp_num_threads=0;
+static int openblas_env_omp_adaptive=0;
int openblas_verbose() { return openblas_env_verbose;}
unsigned int openblas_thread_timeout() { return openblas_env_thread_timeout;}
@@ -46,6 +47,7 @@ int openblas_block_factor() { return openblas_env_block_factor;}
int openblas_num_threads_env() { return openblas_env_openblas_num_threads;}
int openblas_goto_num_threads_env() { return openblas_env_goto_num_threads;}
int openblas_omp_num_threads_env() { return openblas_env_omp_num_threads;}
+int openblas_omp_adaptive_env() { return openblas_env_omp_adaptive;}
void openblas_read_env() {
int ret=0;
@@ -79,6 +81,11 @@ void openblas_read_env() {
if(ret<0) ret=0;
openblas_env_omp_num_threads=ret;
+ ret=0;
+ if (readenv(p,"OMP_ADAPTIVE")) ret = atoi(p);
+ if(ret<0) ret=0;
+ openblas_env_omp_adaptive=ret;
+
}
