ilaenv
ilaenv
Environmental enquiry function that returns values for tuning algorithmic performance.
Syntax
MKL_INT
ilaenv
(
const
MKL_INT
*
ispec
,
const
char
*
name
,
const
char
*
opts
,
const
MKL_INT
*
n1
,
const
MKL_INT
*
n2
,
const
MKL_INT
*
n3
,
const
MKL_INT
*
n4
);
Include Files
- mkl.h
Description
The enquiry function
ilaenv
is called from the LAPACK routines to choose problem-dependent parameters for the local environment. See ispec
below for a description of the parameters.This version provides a set of parameters that should give good, but not optimal, performance on many of the currently available computers.
Optimization Notice
|
---|
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804
|
This notice covers the following instruction sets: SSE2, SSE4.2, AVX2, AVX-512.
Input Parameters
- ispec
- Specifies the parameter to be returned as the value ofilaenv:= 1: the optimal blocksize; if this value is 1, an unblocked algorithm will give the best performance.= 2: the minimum block size for which the block routine should be used; if the usable block size is less than this value, an unblocked routine should be used.= 3: the crossover point (in a block routine, fornless than this value, an unblocked routine should be used)= 4: the number of shifts, used in the nonsymmetric eigenvalue routines (deprecated)= 5: the minimum column dimension for blocking to be used; rectangular blocks must have dimension at leastk-by-m, wherekis given byandilaenv(2,...)mbyilaenv(5,...)= 6: the crossover point for the SVD (when reducing anm-by-nmatrix to bidiagonal form, ifmax(exceeds this value, am,n)/min(m,n)QRfactorization is used first to reduce the matrix to a triangular form.)= 7: the number of processors= 8: the crossover point for the multishiftQRandQZmethods for nonsymmetric eigenvalue problems (deprecated).= 9: maximum size of the subproblems at the bottom of the computation tree in the divide-and-conquer algorithm (used by?gelsdand?gesdd)=10: ieee NaN arithmetic can be trusted not to trap=11: infinity arithmetic can be trusted not to trap12 ≤ispec≤ 16:?hseqror one of its subroutines, seeiparmqfor detailed explanation.
- name
- The name of the calling subroutine, in either upper case or lower case.
- opts
- The character options to the subroutinename, concatenated into a single character string. For example,,uplo='U', andtrans='T'for a triangular routine would be specified asdiag='N'.opts='UTN'Use only uppercase characters for theoptsstring.
- n1,n2,n3,n4
- Problem dimensions for the subroutinename; these may not all be required.
Output Parameters
- value
- If: the value of the parameter specified byvalue≥0ispec;If: thevalue= -k< 0k-th argument had an illegal value.
Return Values
ilaenv returns
value
.If : the value of the parameter specified by
value
≥
0ispec
;If : the
value
= -k
< 0k
-th argument had an illegal value.Application Notes
The following conventions have been used when calling
ilaenv
from the LAPACK routines:- optsis a concatenation of all of the character options to subroutinename, in the same order that they appear in the argument list forname, even if they are not used in determining the value of the parameter specified byispec.
- The problem dimensionsn1,n2,n3,n4are specified in the order that they appear in the argument list forname.n1is used first,n2second, and so on, and unused problem dimensions are passed a value of -1.
- The parameter value returned byilaenvis checked for validity in the calling subroutine. For example,ilaenvis used to retrieve the optimal blocksize forstrtrias follows:nb := ilaenv( 1, 'strtri', strcat (uplo, diag), n, -1, -1, -1> ); if( nb <= 1 ) { nb := max( 1, n ); }
Below is an example of
ilaenv
usage in C language:#include <stdio.h> #include "mkl.h" int main(void) { int size = 1000; int ispec = 1; int dummy = -1; int blockSize1 = ilaenv(&ispec, "dsytrd", "U", &size, &dummy, &dummy, &dummy); int blockSize2 = ilaenv(&ispec, "dormtr", "LUN", &size, &size, &dummy, &dummy); printf("DSYTRD blocksize = %d\n", blockSize1); printf("DORMTR blocksize = %d\n", blockSize2); return 0; }