Developer Reference for Intel® oneAPI Math Kernel Library for C
mkl_sparse_set_memory_hint
Allows the user to set any internal memory allocation limitations for performance optimization purposes when used in conjunction with mkl_sparse_optimize.
Syntax
sparse_status_t mkl_sparse_set_memory_hint ( const sparse_matrix_t A,
const sparse_memory_usage_t policy );
Include Files
mkl_spblas.h
Description
The mkl_sparse_set_memory_hint routine allows the user to advise on use of additional memory allocations for further performance optimization purposes. All such hints must be called before mkl_sparse_optimize which will allow the library to perform some internal analysis to optimize these operations.
Input Parameters
policy
Specify memory utilization policy for optimization routine using these types:
SPARSE_MEMORY_NONE |
Library optimization routines can allocate memory only for auxiliary structures (such as for workload balancing); the amount of memory is proportional to vector size. |
SPARSE_MEMORY_AGGRESSIVE |
(Default) Library optimization routines can allocate memory proportional to the size of matrix A for converting into the appropriate sparse format. |
Output Parameters
A
Handle containing internal sparse matrix data.
Return Values
Value indicating whether the operation was successful, and if not, why:
SPARSE_STATUS_SUCCESS |
The operation was successful. |
SPARSE_STATUS_NOT_INITIALIZED |
The routine encountered an empty handle or matrix array. |
SPARSE_STATUS_ALLOC_FAILED |
Internal memory allocation failed. |
SPARSE_STATUS_INVALID_VALUE |
The input parameters contain an invalid value. |
SPARSE_STATUS_EXECUTION_FAILED |
Execution failed. |
SPARSE_STATUS_INTERNAL_ERROR |
An error in algorithm implementation occurred. |
SPARSE_STATUS_NOT_SUPPORTED |
The requested operation is not supported. |