MAGMA  2.3.0 Matrix Algebra for GPU and Multicore Architectures

## Classes

TODO: replace with OpenMP tasks. More...

## Functions

Sets the number of threads to use for LAPACK and BLAS. More...

Sets the number of threads to use for parallel section. More...

magma_int_t magma_yield ()
Yield the CPU to let another thread of lower priority run, for example, for I/O.

## Function Documentation

Returns
Number of threads to use for parallel sections of MAGMA. Typically, it is initially set by the environment variables OMP_NUM_THREADS or MAGMA_NUM_THREADS.

If MAGMA_NUM_THREADS is set, this returns min( num_cores, MAGMA_NUM_THREADS ); else if MAGMA is compiled with OpenMP, this queries OpenMP and returns min( num_cores, OMP_NUM_THREADS ); else this returns num_cores.

For the number of cores, if MAGMA is compiled with hwloc, this queries hwloc; else it queries sysconf (on Unix) or GetSystemInfo (on Windows).

Returns
Number of threads currently used for LAPACK and BLAS.

If MAGMA is compiled with MAGMA_WITH_MKL, this queries MKL; else if MAGMA is compiled with OpenMP, this queries OpenMP; else this returns 1.

Sets the number of threads to use for LAPACK and BLAS.

This is often used to set BLAS to be single-threaded during sections where MAGMA uses explicit pthread parallelism. Example use:

nthread_save = magma_get_lapack_numthreads();



If MAGMA is compiled with MAGMA_WITH_MKL, this sets MKL threads; else if MAGMA is compiled with OpenMP, this sets OpenMP threads; else this does nothing.

Parameters
Returns
Number of threads currently used for OMP sections. Typically, the number of threads is initially set by the environment variable OMP_NUM_THREADS.

Sets the number of threads to use for parallel section.

This is often used to set BLAS to be single-threaded during sections where MAGMA uses explicit pthread parallelism. Example use:

nthread_save = magma_get_omp_numthreads();