Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
ID
766686
Date
4/28/2026
Public
Getting Help and Support
What’s New
Notational Conventions
oneMKL Library Overview
OpenMP* Offload
BLAS Routines
Sparse BLAS Routines
LAPACK Routines
ScaLAPACK Routines
Sparse Solver Routines
Extended Eigensolver Routines
Vector Mathematical Functions
Statistical Functions
Fourier Transform Functions
PBLAS Routines
Partial Differential Equations Support
Nonlinear Optimization Problem Solvers
Support Functions
BLACS Routines
Data Fitting Functions
Appendix A: Linear Solvers Basics
Appendix B: Routine and Function Arguments
Appendix C: Specific Features of Fortran 95 Interfaces for LAPACK Routines
Appendix D: FFTW Interface to Intel® oneMKL
Appendix E: Code Examples
Appendix F: oneMKL Functionality
Bibliography
Glossary
Notices and Disclaimers
?axpby
?axpy_batch
?axpy_batch_strided
?copy_batch
?copy_batch_strided
?dgmm_batch
?dgmm_batch_strided
?gem2vc
?gem2vu
?gemm_batch
?gemm_batch_strided
gemm_*
?gemm_compute
gemm_*_compute
?gemm_pack
gemm_*_pack
?gemm_pack_get_size , gemm_*_pack_get_size
?gemm3m
?gemm3m_batch
?gemm3m_batch_strided
?gemmt
?gemv_batch
?gemv_batch_strided
?trsm_batch
?trsm_batch_strided
mkl_?imatcopy
mkl_?imatcopy_batch
mkl_?imatcopy_batch_strided
mkl_?omatadd
mkl_?omatadd_batch_strided
mkl_?omatcopy
mkl_?omatcopy_batch
mkl_?omatcopy_batch_strided
mkl_?omatcopy2
mkl_jit_create_?gemm
mkl_jit_destroy
mkl_jit_get_?gemm_ptr
Naming Conventions in Inspector-Executor Sparse BLAS Routines
Sparse Matrix Storage Formats for Inspector-executor Sparse BLAS Routines
Supported Inspector-Executor Sparse BLAS Operations
Two-stage Algorithm in Inspector-Executor Sparse BLAS Routines
Sparse BLAS Reference Types
Matrix Manipulation Routines
Inspector-Executor Sparse BLAS Analysis Routines
Inspector-Executor Sparse BLAS Execution Routines
mkl_sparse_?_create_csr
mkl_sparse_?_create_csc
mkl_sparse_?_create_coo
mkl_sparse_?_create_bsr
mkl_sparse_copy
mkl_sparse_destroy
mkl_sparse_convert_csr
mkl_sparse_convert_csc
mkl_sparse_convert_coo
mkl_sparse_convert_bsr
mkl_sparse_?_dense2csr
mkl_sparse_?_dense2csc
mkl_sparse_?_dense2coo
mkl_sparse_?_dense2bsr
mkl_sparse_?_convert_dense
mkl_sparse_?_export_csr
mkl_sparse_?_export_csc
mkl_sparse_?_export_coo
mkl_sparse_?_export_bsr
mkl_sparse_?_set_value
mkl_sparse_?_update_values
mkl_sparse_order
mkl_sparse_?_lu_smoother
mkl_sparse_?_mv
mkl_sparse_?_trsv
mkl_sparse_?_mm
mkl_sparse_?_trsm
mkl_sparse_?_add
mkl_sparse_spmm
mkl_sparse_?_spmmd
mkl_sparse_sp2m
mkl_sparse_?_sp2md
mkl_sparse_sypr
mkl_sparse_?_syprd
mkl_sparse_?_symgs
mkl_sparse_?_symgs_mv
mkl_sparse_syrk
mkl_sparse_?_syrkd
mkl_sparse_?_dotmv
mkl_sparse_?_sorv
Naming Conventions for LAPACK Routines
Fortran 95 Interface Conventions for LAPACK Routines
Matrix Storage Schemes for LAPACK Routines
Mathematical Notation for LAPACK Routines
Error Analysis
LAPACK Linear Equation Routines
LAPACK Least Squares and Eigenvalue Problem Routines
LAPACK Auxiliary Routines
LAPACK Utility Functions and Routines
LAPACK Test Functions and Routines
Additional LAPACK Routines (Included for Compatibility with Netlib LAPACK)
Matrix Factorization: LAPACK Computational Routines
Solving Systems of Linear Equations: LAPACK Computational Routines
Estimating the Condition Number: LAPACK Computational Routines
Refining the Solution and Estimating Its Error: LAPACK Computational Routines
Matrix Inversion: LAPACK Computational Routines
Matrix Equilibration: LAPACK Computational Routines
?getrf
?getrf_batch
?getrf_batch_strided
mkl_?getrfnp
?getrfnp_batch_strided
mkl_?getrfnpi
?getrf2
?getri_oop_batch
?getri_oop_batch_strided
?gbtrf
?gttrf
?dttrfb
?potrf
?potrf2
?pstrf
?pftrf
?pptrf
?pbtrf
?pttrf
?sytrf
?sytrf_aa
?sytrf_rook
?sytrf_rk
?hetrf
?hetrf_aa
?hetrf_rook
?hetrf_rk
?sptrf
?hptrf
mkl_?spffrt2 , mkl_?spffrtx
Orthogonal Factorizations: LAPACK Computational Routines
Singular Value Decomposition: LAPACK Computational Routines
Symmetric Eigenvalue Problems: LAPACK Computational Routines
Generalized Symmetric-Definite Eigenvalue Problems: LAPACK Computational Routines
Nonsymmetric Eigenvalue Problems: LAPACK Computational Routines
Generalized Nonsymmetric Eigenvalue Problems: LAPACK Computational Routines
Generalized Singular Value Decomposition: LAPACK Computational Routines
Cosine-Sine Decomposition: LAPACK Computational Routines
Linear Least Squares (LLS) Problems: LAPACK Driver Routines
Generalized Linear Least Squares (LLS) Problems: LAPACK Driver Routines
Symmetric Eigenvalue Problems: LAPACK Driver Routines
Nonsymmetric Eigenvalue Problems: LAPACK Driver Routines
Singular Value Decomposition: LAPACK Driver Routines
Cosine-Sine Decomposition: LAPACK Driver Routines
Generalized Symmetric Definite Eigenvalue Problems: LAPACK Driver Routines
Generalized Nonsymmetric Eigenvalue Problems: LAPACK Driver Routines
?lacgv
?lacrm
?lacrt
?laesy
?rot
?spmv
?spr
?syconv
?symv
?syr
i?max1
?sum1
?gbtf2
?gebd2
?gehd2
?gelq2
?gelqt3
?geql2
?geqr2
?geqr2p
?geqrt2
?geqrt3
?gerq2
?gesc2
?getc2
?getf2
?gtts2
?isnan
?laisnan
?labrd
?lacn2
?lacon
?lacpy
?ladiv
?lae2
?laebz
?laed0
?laed1
?laed2
?laed3
?laed4
?laed5
?laed6
?laed7
?laed8
?laed9
?laeda
?laein
?laev2
?laexc
?lag2
?lags2
?lagtf
?lagtm
?lagts
?lagv2
?lahqr
?lahrd
?lahr2
?laic1
?lakf2
?laln2
?lals0
?lalsa
?lalsd
?lamrg
?lamswlq
?lamtsqr
?laneg
?langb
?lange
?langt
?lanhs
?lansb
?lanhb
?lansp
?lanhp
?lanst/?lanht
?lansy
?lanhe
?lantb
?lantp
?lantr
?lanv2
?lapll
?lapmr
?lapmt
?lapy2
?lapy3
?laqgb
?laqge
?laqhb
?laqp2
?laqps
?laqr0
?laqr1
?laqr2
?laqr3
?laqr4
?laqr5
?laqsb
?laqsp
?laqsy
?laqtr
?laqz0
?lar1v
?lar2v
?laran
?larf
?larfb
?larfg
?larfgp
?larft
?larfx
?larfy
?large
?largv
?larnd
?larnv
?laror
?larot
?larra
?larrb
?larrc
?larrd
?larre
?larrf
?larrj
?larrk
?larrr
?larrv
?lartg
?lartgp
?lartgs
?lartv
?laruv
?larz
?larzb
?larzt
?las2
?lascl
?lasd0
?lasd1
?lasd2
?lasd3
?lasd4
?lasd5
?lasd6
?lasd7
?lasd8
?lasd9
?lasda
?lasdq
?lasdt
?laset
?lasq1
?lasq2
?lasq3
?lasq4
?lasq5
?lasq6
?lasr
?lasrt
?lassq
?lasv2
?laswlq
?laswp
?lasy2
?lasyf
?lasyf_aa
?lasyf_rook
?lahef
?lahef_aa
?lahef_rook
?latbs
?latm1
?latm2
?latm3
?latm5
?latm6
?latme
?latmr
?latdf
?latps
?latrd
?latrs
?latrs3
?latrz
?latsqr
?lauu2
?lauum
?orbdb1/?unbdb1
?orbdb2/?unbdb2
?orbdb3/?unbdb3
?orbdb4/?unbdb4
?orbdb5/?unbdb5
?orbdb6/?unbdb6
?org2l/?ung2l
?org2r/?ung2r
?orgl2/?ungl2
?orgr2/?ungr2
?orm2l/?unm2l
?orm2r/?unm2r
?orml2/?unml2
?ormr2/?unmr2
?ormr3/?unmr3
?pbtf2
?potf2
?ptts2
?rscl
?syswapr
?heswapr
?syswapr1
?sygs2/?hegs2
?sytd2/?hetd2
?sytf2
?sytf2_rook
?hetf2
?hetf2_rook
?tgex2
?tgsy2
?trti2
clag2z
dlag2s
slag2d
zlag2c
?larfp
ila?lc
ila?lr
?gsvj0
?gsvj1
?sfrk
?hfrk
?tfsm
?lansf
?lanhf
?tfttp
?tfttr
?tplqt2
?tpqrt2
?tprfb
?tpttf
?tpttr
?trttf
?trttp
?pstf2
dlat2s
zlat2c
?lacp2
?la_gbamv
?la_gbrcond
?la_gbrcond_c
?la_gbrcond_x
?la_gbrfsx_extended
?la_gbrpvgrw
?la_geamv
?la_gercond
?la_gercond_c
?la_gercond_x
?la_gerfsx_extended
?la_heamv
?la_hercond_c
?la_hercond_x
?la_herfsx_extended
?la_herpvgrw
?la_lin_berr
?la_porcond
?la_porcond_c
?la_porcond_x
?la_porfsx_extended
?la_porpvgrw
?laqhe
?laqhp
?larcm
?la_gerpvgrw
?larscl2
?lascl2
?la_syamv
?la_syrcond
?la_syrcond_c
?la_syrcond_x
?la_syrfsx_extended
?la_syrpvgrw
?la_wwaddw
mkl_?tppack
mkl_?tpunpack
Additional LAPACK Routines
Systems of Linear Equations: ScaLAPACK Computational Routines
Matrix Factorization: ScaLAPACK Computational Routines
Solving Systems of Linear Equations: ScaLAPACK Computational Routines
Estimating the Condition Number: ScaLAPACK Computational Routines
Refining the Solution and Estimating Its Error: ScaLAPACK Computational Routines
Matrix Inversion: ScaLAPACK Computational Routines
Matrix Equilibration: ScaLAPACK Computational Routines
Orthogonal Factorizations: ScaLAPACK Computational Routines
Symmetric Eigenvalue Problems: ScaLAPACK Computational Routines
Nonsymmetric Eigenvalue Problems: ScaLAPACK Computational Routines
Singular Value Decomposition: ScaLAPACK Driver Routines
Generalized Symmetric-Definite Eigenvalue Problems: ScaLAPACK Computational Routines
b?laapp
b?laexc
b?trexc
p?lacgv
p?max1
pilaver
pmpcol
pmpim2
?combamax1
p?sum1
p?dbtrsv
p?dttrsv
p?gebal
p?gebd2
p?gehd2
p?gelq2
p?geql2
p?geqr2
p?gerq2
p?getf2
p?labrd
p?lacon
p?laconsb
p?lacp2
p?lacp3
p?lacpy
p?laevswp
p?lahrd
p?laiect
p?lamve
p?lange
p?lanhs
p?lansy , p?lanhe
p?lantr
p?lapiv
p?lapv2
p?laqge
p?laqr0
p?laqr1
p?laqr2
p?laqr3
p?laqr4
p?laqr5
p?laqsy
p?lared1d
p?lared2d
p?larf
p?larfb
p?larfc
p?larfg
p?larft
p?larz
p?larzb
p?larzc
p?larzt
p?lascl
p?lase2
p?laset
p?lasmsub
p?lasrt
p?lassq
p?laswp
p?latra
p?latrd
p?latrs
p?latrz
p?lauu2
p?lauum
p?lawil
p?org2l/p?ung2l
p?org2r/p?ung2r
p?orgl2/p?ungl2
p?orgr2/p?ungr2
p?orm2l/p?unm2l
p?orm2r/p?unm2r
p?orml2/p?unml2
p?ormr2/p?unmr2
p?pbtrsv
p?pttrsv
p?potf2
p?rot
p?rscl
p?sygs2/p?hegs2
p?sytd2/p?hetd2
p?trord
p?trsen
p?trti2
?lahqr2
?lamsh
?lapst
?laqr6
?lar1va
?laref
?larrb2
?larrd2
?larre2
?larre2a
?larrf2
?larrv2
?lasorte
?lasrt2
?stegr2
?stegr2a
?stegr2b
?stein2
?dbtf2
?dbtrf
?dttrf
?dttrsv
?pttrsv
?steqr2
?trmvt
pilaenv
pilaenvx
pjlaenv
Additional ScaLAPACK Routines
Intel® oneMKL PARDISO - Parallel Direct Sparse Solver Interface
Intel® MKL Parallel Direct Sparse Solver for Clusters
Direct Sparse Solver (DSS) Interface Routines
Iterative Sparse Solvers based on Reverse Communication Interface (RCI ISS)
Preconditioners based on Incomplete LU Factorization Technique
Sparse Matrix Checker Routines
pardiso
pardisoinit
pardiso_64
mkl_pardiso_pivot
pardiso_getdiag
pardiso_export
pardiso_handle_store
pardiso_handle_restore
pardiso_handle_delete
pardiso_handle_store_64
pardiso_handle_restore_64
pardiso_handle_delete_64
Intel® oneMKL PARDISO Parameters in Tabular Form
pardiso iparm Parameter
PARDISO_DATA_TYPE
vslNewStream
vslNewStreamEx
vsliNewAbstractStream
vsldNewAbstractStream
vslsNewAbstractStream
vslDeleteStream
vslCopyStream
vslCopyStreamState
vslSaveStreamF
vslLoadStreamF
vslSaveStreamM
vslLoadStreamM
vslGetStreamSize
vslLeapfrogStream
vslSkipAheadStream
vslSkipAheadStreamEx
vslGetStreamStateBrng
vslGetNumRegBrngs
Convolution and Correlation Naming Conventions
Convolution and Correlation Data Types
Convolution and Correlation Parameters
Convolution and Correlation Task Status and Error Reporting
Convolution and Correlation Task Constructors
Convolution and Correlation Task Editors
Task Execution Routines
Convolution and Correlation Task Destructors
Convolution and Correlation Task Copiers
Convolution and Correlation Mathematical Notation and Definitions
Convolution and Correlation Data Allocation
Summary Statistics Naming Conventions
Summary Statistics Data Types
Summary Statistics Parameters
Summary Statistics Task Status and Error Reporting
Summary Statistics Task Constructors
Summary Statistics Task Editors
Summary Statistics Task Computation Routines
Summary Statistics Task Destructor
Summary Statistics Usage Examples
Summary Statistics Mathematical Notation and Definitions
DFTI_PRECISION
DFTI_FORWARD_DOMAIN
DFTI_DIMENSION, DFTI_LENGTHS
DFTI_PLACEMENT
DFTI_FORWARD_SCALE, DFTI_BACKWARD_SCALE
DFTI_NUMBER_OF_USER_THREADS
DFTI_THREAD_LIMIT
DFTI_INPUT_STRIDES, DFTI_OUTPUT_STRIDES
DFTI_NUMBER_OF_TRANSFORMS
DFTI_INPUT_DISTANCE, DFTI_OUTPUT_DISTANCE
DFTI_COMPLEX_STORAGE, DFTI_REAL_STORAGE, DFTI_CONJUGATE_EVEN_STORAGE
DFTI_PACKED_FORMAT
DFTI_WORKSPACE
DFTI_COMMIT_STATUS
DFTI_ORDERING
Data Fitting Function Naming Conventions
Data Fitting Function Data Types
Mathematical Conventions for Data Fitting Functions
Data Fitting Usage Model
Data Fitting Usage Examples
C Example of Linear Spline Construction
C Example of Cubic Spline-Based Interpolation
C Example of Cell Search
Data Fitting Function Task Status and Error Reporting
Data Fitting Task Creation and Initialization Routines
Task Configuration Routines
Data Fitting Computational Routines
Data Fitting Task Destructors
df?construct1d df?Construct1D
df?interpolate1d/df?interpolateex1d df?Interpolate1D/df?InterpolateEx1D
df?integrate1d/df?integrateex1d df?Integrate1D/df?IntegrateEx1D
df?searchcells1d/df?searchcellsex1d df?SearchCells1D/df?SearchCellsEx1D
df?interpcallback df?InterpCallBack
df?integrcallback df?IntegrCallBack
df?searchcellscallback df?SearchCellsCallBack
DSS Symmetric Matrix Storage
DSS Nonsymmetric Matrix Storage
DSS Structurally Symmetric Matrix Storage
DSS Distributed Symmetric Matrix Storage
Sparse BLAS CSR Matrix Storage Format
Sparse BLAS CSC Matrix Storage Format
Sparse BLAS Coordinate Matrix Storage Format
Sparse BLAS BSR Matrix Storage Format
Data Fitting Usage Examples
You can get Fortran source code in the .examplesdatafittingf subdirectory of the Intel® oneAPI Math Kernel Library (oneMKL) installation directory.
C Example of Linear Spline Construction
#include "mkl.h"
#define N 500 /* Size of partition, number of breakpoints */
#define SPLINE_ORDER DF_PP_LINEAR /* Linear spline to construct */
int main()
{
int status; /* Status of a Data Fitting operation */
DFTaskPtr task; /* Data Fitting operations are task based */
/* Parameters describing the partition */
MKL_INT nx; /* The size of partition x */
double x[N]; /* Partition x */
MKL_INT xhint; /* Additional information about the structure of breakpoints */
/* Parameters describing the function */
MKL_INT ny; /* Function dimension */
double y[N]; /* Function values at the breakpoints */
MKL_INT yhint; /* Additional information about the function */
/* Parameters describing the spline */
MKL_INT s_order; /* Spline order */
MKL_INT s_type; /* Spline type */
MKL_INT ic_type; /* Type of internal conditions */
double* ic; /* Array of internal conditions */
MKL_INT bc_type; /* Type of boundary conditions */
double* bc; /* Array of boundary conditions */
double scoeff[(N-1)* SPLINE_ORDER]; /* Array of spline coefficients */
MKL_INT scoeffhint; /* Additional information about the coefficients */
/* Initialize the partition */
nx = N;
/* Set values of partition x */
...
xhint = DF_NO_HINT; /* No additional information about the function is provided.
By default, the partition is non-uniform. */
/* Initialize the function */
ny = 1; /* The function is scalar. */
/* Set function values */
...
yhint = DF_NO_HINT; /* No additional information about the function is provided. */
/* Create a Data Fitting task */
status = dfdNewTask1D( &task, nx, x, xhint, ny, y, yhint );
/* Check the Data Fitting operation status */
...
/* Initialize spline parameters */
s_order = DF_PP_LINEAR; /* Spline is of the second order. */
s_type = DF_PP_DEFAULT; /* Spline is of the default type. */
/* Define internal conditions for linear spline construction (none in this example) */
ic_type = DF_NO_IC;
ic = NULL;
/* Define boundary conditions for linear spline construction (none in this example) */
bc_type = DF_NO_BC;
bc = NULL;
scoeffhint = DF_NO_HINT; /* No additional information about the spline. */
/* Set spline parameters in the Data Fitting task */
status = dfdEditPPSpline1D( task, s_order, s_type, bc_type, bc, ic_type,
ic, scoeff, scoeffhint );
/* Check the Data Fitting operation status */
...
/* Use a standard computation method to construct a linear spline: */
/* P_{i}(x) = c_{i,0}+c_{i,1}(x-x_{i}), i=0,..., N-2 */
/* The library packs spline coefficients to array scoeff. */
/* scoeff[2*i+0]=c_{i,0} and scoeff[2*i+1]=c_{i,1}, i=0,..., N-2 */
status = dfdConstruct1D( task, DF_PP_SPLINE, DF_METHOD_STD );
/* Check the Data Fitting operation status */
...
/* Process spline coefficients */
...
/* Deallocate Data Fitting task resources */
status = dfDeleteTask( &task ) ;
/* Check the Data Fitting operation status */
...
return 0 ;
}
C Example of Cubic Spline-Based Interpolation
#include "mkl.h"
#define NX 100 /* Size of partition, number of breakpoints */
#define NSITE 1000 /* Number of interpolation sites */
#define SPLINE_ORDER DF_PP_CUBIC /* A cubic spline to construct */
int main()
{
int status; /* Status of a Data Fitting operation */
DFTaskPtr task; /* Data Fitting operations are task based */
/* Parameters describing the partition */
MKL_INT nx; /* The size of partition x */
double x[NX]; /* Partition x */
MKL_INT xhint; /* Additional information about the structure of breakpoints */
/* Parameters describing the function */
MKL_INT ny; /* Function dimension */
double y[NX]; /* Function values at the breakpoints */
MKL_INT yhint; /* Additional information about the function */
/* Parameters describing the spline */
MKL_INT s_order; /* Spline order */
MKL_INT s_type; /* Spline type */
MKL_INT ic_type; /* Type of internal conditions */
double* ic; /* Array of internal conditions */
MKL_INT bc_type; /* Type of boundary conditions */
double* bc; /* Array of boundary conditions */
double scoeff[(NX-1)* SPLINE_ORDER]; /* Array of spline coefficients */
MKL_INT scoeffhint; /* Additional information about the coefficients */
/* Parameters describing interpolation computations */
MKL_INT nsite; /* Number of interpolation sites */
double site[NSITE]; /* Array of interpolation sites */
MKL_INT sitehint; /* Additional information about the structure of
interpolation sites */
MKL_INT ndorder, dorder; /* Parameters defining the type of interpolation */
double* datahint; /* Additional information on partition and interpolation sites */
double r[NSITE]; /* Array of interpolation results */
MKL_INT rhint; /* Additional information on the structure of the results */
MKL_INT* cell; /* Array of cell indices */
/* Initialize the partition */
nx = NX;
/* Set values of partition x */
...
xhint = DF_NON_UNIFORM_PARTITION; /* The partition is non-uniform. */
/* Initialize the function */
ny = 1; /* The function is scalar. */
/* Set function values */
...
yhint = DF_NO_HINT; /* No additional information about the function is provided. */
/* Create a Data Fitting task */
status = dfdNewTask1D( &task, nx, x, xhint, ny, y, yhint );
/* Check the Data Fitting operation status */
...
/* Initialize spline parameters */
s_order = DF_PP_CUBIC; /* Spline is of the fourth order (cubic spline). */
s_type = DF_PP_BESSEL; /* Spline is of the Bessel cubic type. */
/* Define internal conditions for cubic spline construction (none in this example) */
ic_type = DF_NO_IC;
ic = NULL;
/* Use not-a-knot boundary conditions. In this case, the is first and the last
interior breakpoints are inactive, no additional values are provided. */
bc_type = DF_BC_NOT_A_KNOT;
bc = NULL;
scoeffhint = DF_NO_HINT; /* No additional information about the spline. */
/* Set spline parameters in the Data Fitting task */
status = dfdEditPPSpline1D( task, s_order, s_type, bc_type, bc, ic_type,
ic, scoeff, scoeffhint );
/* Check the Data Fitting operation status */
...
/* Use a standard method to construct a cubic Bessel spline: */
/* P_{i}(x) = c_{i,0} + c_{i,1}(x - x_{}_{i}) + c_{i,2}(x - x_{}_{i})^{2} + c_{i,3}(x - x_{i})^{3}, */
/* The library packs spline coefficients to array scoeff: */
/* scoeff[4*i+0] = c_{i,0}, scoef[4*i+1] = c_{i,1}, */
/* scoeff[4*i+2] = c_{i,2}, scoef[4*i+1] = c_{i,3}, */
/* i=0,...,N-2 */
status = dfdConstruct1D( task, DF_PP_SPLINE, DF_METHOD_STD );
/* Check the Data Fitting operation status */
...
/* Initialize interpolation parameters */
nsite = NSITE;
/* Set site values */
...
sitehint = DF_NON_UNIFORM_PARTITION; /* Partition of sites is non-uniform */
/* Request to compute spline values */
ndorder = 1;
dorder = 1;
datahint = DF_NO_APRIORI_INFO; /* No additional information about breakpoints or
sites is provided. */
rhint = DF_MATRIX_STORAGE_ROWS; /* The library packs interpolation results
in row-major format. */
cell = NULL; /* Cell indices are not required. */
/* Solve interpolation problem using the default method: compute the spline values
at the points site(i), i=0,..., nsite-1 and place the results to array r */
status = dfdInterpolate1D( task, DF_INTERP, DF_METHOD_PP, nsite, site,
sitehint, ndorder, &dorder, datahint, r, rhint, cell );
/* Check Data Fitting operation status */
...
/* De-allocate Data Fitting task resources */
status = dfDeleteTask( &task );
/* Check Data Fitting operation status */
...
return 0;
}
C Example of Cell Search
#include "mkl.h"
#define NX 100 /* Size of partition, number of breakpoints */
#define NSITE 1000 /* Number of interpolation sites */
int main()
{
int status; /* Status of a Data Fitting operation */
DFTaskPtr task; /* Data Fitting operations are task based */
/* Parameters describing the partition */
MKL_INT nx; /* The size of partition x */
float x[2]; /* Partition x is uniform and holds endpoints
of interpolation interval [a, b] */
MKL_INT xhint; /* Additional information about the structure of breakpoints */
/* Parameters describing the function */
MKL_INT ny; /* Function dimension */
float *y; /* Function values at the breakpoints */
MKL_INT yhint; /* Additional information about the function */
/* Parameters describing cell search */
MKL_INT nsite; /* Number of interpolation sites */
float site[NSITE]; /* Array of interpolation sites */
MKL_INT sitehint; /* Additional information about the structure of sites */
float* datahint; /* Additional information on partition and interpolation sites */
MKL_INT cell[NSITE]; /* Array for cell indices */
/* Initialize a uniform partition */
nx = NX;
/* Set values of partition x: for uniform partition, */
/* provide end-points of the interpolation interval [-1.0,1.0] */
x[0] = -1.0f; x[1] = 1.0f;
xhint = DF_UNIFORM_PARTITION; /* Partition is uniform */
/* Initialize function parameters */
/* In cell search, function values are not necessary and are set to zero/NULL values */
ny = 0;
y = NULL;
yhint = DF_NO_HINT;
/* Create a Data Fitting task */
status = dfsNewTask1D( &task, nx, x, xhint, ny, y, yhint );
/* Check Data Fitting operation status */
...
/* Initialize interpolation (cell search) parameters */
nsite = NSITE;
/* Set sites in the ascending order */
...
sitehint = DF_SORTED_DATA; /* Sites are provided in the ascending order. */
datahint = DF_NO_APRIORI_INFO; /* No additional information
about breakpoints/sites is provided.*/
/* Use a standard method to compute indices of the cells that contain
interpolation sites. The library places the index of the cell containing
site(i) to the cell(i), i=0,...,nsite-1 */
status = dfsSearchCells1D( task, DF_METHOD_STD, nsite, site, sitehint,
datahint, cell );
/* Check Data Fitting operation status */
...
/* Process cell indices */
...
/* Deallocate Data Fitting task resources */
status = dfDeleteTask( &task );
/* Check Data Fitting operation status */
...
return 0;
}