Apple Accelerate libSparse performance

I've created a Julia interface for Apple Accelerate's libSparse, via calling the library functions as if they were C (@ccall). I'm interested in using this in the context of power systems, where the sparse matrix is the Jacobian or the ABA matrix from a sparse grid network. However, I'm puzzled by the performance.

I ran a sampling profiler on repeated in-place solves of Ax = b for a large sparse matrix A and random dense vectors b. (A is size 30k, positive definite so Cholesky factorization.) The 2 functions with the largest impact are _SparseConvertFromCoordinate_Double from libSparse.dylib, and BLASStateRelease from libBLAS.dylib. That strikes me as bizarre. This is an in-place solve: there should be minimal overheard from allocating/deallocating memory. Also, it seems strange that the library would repeatedly convert from coordinate form. Is this expected behavior?

Thinking it might be an artifact of the Julia-C interface, I wrote up a similar program in C/Objective-C. I didn't profile it, but timing the same operation (repeated in-place solves of Ax = b for random vectors b, with the same matrix A as in the Julia) gave the same duration. I've attached the C/Objective-C below.

#include 
#include 
#include 
#include 

// these read-input-from-file functions were made with the help of chatGPT.
void readDoublesFromFile(const char *filePath, double *numbers, size_t numberOfNumbers) {
    FILE *file = fopen(filePath, "r");
    
    if (file == NULL) {
        printf("Error opening the file: %s\n", filePath);
        exit(1);
    }
    
    for (size_t i = 0; i < numberOfNumbers; i++) {
        int result = fscanf(file, "%lf", &numbers[i]);
        if (result != 1) {
            printf("Error reading double from file at index %zu, result = %d\n", i, result);
            fclose(file);
            exit(1);
        }
    }
    
    fclose(file);
}

void readIntsFromFile(const char *filePath, int *numbers, size_t numberOfNumbers) {
    FILE *file = fopen(filePath, "r");
    
    if (file == NULL) {
        printf("Error opening the file: %s\n", filePath);
        exit(1);
    }
    
    for (size_t i = 0; i < numberOfNumbers; i++) {
        int result = fscanf(file, "%d", &numbers[i]);
        if (result != 1) {
            printf("Error reading int from file at index %zu, result = %d\n", i, result);
            fclose(file);
            exit(1);
        }
    }
    
    fclose(file);
}

void readLongsFromFile(const char *filePath, long *numbers, size_t numberOfNumbers) {
    FILE *file = fopen(filePath, "r");
    
    if (file == NULL) {
        printf("Error opening the file: %s\n", filePath);
        exit(1);
    }

    for (size_t i = 0; i < numberOfNumbers; i++) {
        int result = fscanf(file, "%ld", &numbers[i]);
        if (result != 1) {
            printf("Error reading long from file at index %zu, result = %d\n", i, result);
            fclose(file);
            exit(1);
        }
    }
    
    fclose(file);
}

int main() {
    const char *rowvalPath = "pglib_opf_case30000_rowval.txt";
    const char *colptrPath = "pglib_opf_case30000_colptr.txt";
    const char *nzvalPath = "pglib_opf_case30000_nzval.txt";
    size_t numberOfNumbers = 65231;
    size_t colptrLen = 30000;
    size_t N = colptrLen - 1;

    int *rowval = (int *)malloc(numberOfNumbers * sizeof(int));
    long *colptr = (long *)malloc(colptrLen * sizeof(long));
    double *nzval = (double *)malloc(numberOfNumbers * sizeof(double));
    
    if (rowval == NULL || colptr == NULL || nzval == NULL) {
        printf("Memory allocation failed.\n");
        return 1;
    }

    readIntsFromFile(rowvalPath, rowval, numberOfNumbers);
    readLongsFromFile(colptrPath, colptr, colptrLen);
    readDoublesFromFile(nzvalPath, nzval, numberOfNumbers);

    SparseMatrixStructure s = {
        .rowCount     = N,
        .columnCount  = N,
        .columnStarts = colptr,
        .rowIndices   = rowval,
        .attributes = {
            .triangle = SparseLowerTriangle,
            .kind = SparseSymmetric,
        },
        .blockSize = 1,
    };

    SparseMatrix_Double ABA = {
        .structure = s,
        .data = nzval
    };
    
    clock_t start1, end1;
    start1 = clock();
    SparseOpaqueFactorization_Double f = SparseFactor(SparseFactorizationCholesky, ABA);
    end1 = clock();
    printf("time for factoring: %lf\n", ((double) (end1 - start1)) / CLOCKS_PER_SEC);

    size_t M = 10000;
    double* randomVs = (double *)malloc(M*N * sizeof(double));
    if (randomVs == NULL){
        printf("allocation failed");
        return 1;
    }

    srand(time(NULL));
    for (int i = 0; i < M*N; ++i)
        randomVs[i] = ((double) rand())/RAND_MAX;

    clock_t start2, end2;
    start2 = clock();
    for (int i = 0; i < M*N; i += N){
        DenseVector_Double b = {
            .count = N,
            .data = randomVs + i
        };
        SparseSolve(f, b);
    }
    end2 = clock();
    printf("time for 10k in-place solves: %lf\n", ((double) (end2 - start2)) / CLOCKS_PER_SEC);
    // Free the allocated memory
    free(rowval);
    free(colptr);
    free(nzval);
    SparseCleanup(f);
    free(randomVs);
    return 0;
}

If you're familiar with Julia, the following will give you the matrix I was working with:

using PowerSystems, PowerNetworkMatrices
sys = System("pglib_opf_case30000_goc.m")
A = PowerNetworkMatrices.ABA_Matrix(sys).data

where you can find the .m file here. (As a crude way to transfer A from Julia to C, I wrote the 3 arrays A.nzval, A.colptr, and A.rowval to .txt files as space-separated lists of numbers: the above C/objective-C reads in those files.) To duplicate my Julia profiling, do pkg> add AppleAccelerate#libSparse Profile--note the #libSparse part, these features aren't on the main branch--then run

using AppleAccelerate, Profile
# run previous code snippet to define A
M, N = 10000, size(A)[1]
bs = [rand(N) for _ in 1:M]
aa_fact = AAFactorization(A)
factor!(aa_fact)
solve!(aa_fact, bs[1]) # pre-compile before we profile.
Profile.init(n = 10^6, delay = 0.0003)
@profile (for i in 1:M; solve!(aa_fact, bs[i]); end;)
Profile.print(C = true, format = :flat, sortedby = :count)

Hi,

Please could you post your code that uses the Sparse API directly? SparseConvertFromCoordinate_Double is an explicit user call and that shouldn't appear unless the Julia interface is calling it.

Many thanks.

Here's the file with the API calls. I have to provide the correct symbol, not the function name, so it's a bit hard to read: e.g. you'll see _Z12SparseFactorh18SparseMatrix_Float instead of SparseFactor. I imagine you probably have Apple internal tools to deal with that...but if you don't, here's the mangled-demangled pairs.

__SparseAMD __SparseAMD
__SparseAMDWorkspaceSize __SparseAMDWorkspaceSize
__SparseCGIterate_Double __SparseCGIterate_Double
__SparseCGIterate_Float __SparseCGIterate_Float
__SparseCGSolve_Double __SparseCGSolve_Double
__SparseCGSolve_Float __SparseCGSolve_Float
__SparseCOLAMD __SparseCOLAMD
__SparseCOLAMDWorkspaceSize __SparseCOLAMDWorkspaceSize
__SparseConvertFromCoordinate_Double __SparseConvertFromCoordinate_Double
__SparseConvertFromCoordinate_Float __SparseConvertFromCoordinate_Float
__SparseConvertFromOpaque_Double __SparseConvertFromOpaque_Double
__SparseConvertFromOpaque_Float __SparseConvertFromOpaque_Float
__SparseCreatePreconditioner_Double __SparseCreatePreconditioner_Double
__SparseCreatePreconditioner_Float __SparseCreatePreconditioner_Float
__SparseDestroyOpaqueNumeric_Double __SparseDestroyOpaqueNumeric_Double
__SparseDestroyOpaqueNumeric_Float __SparseDestroyOpaqueNumeric_Float
__SparseDestroyOpaqueSymbolic __SparseDestroyOpaqueSymbolic
__SparseFactorQR_Double __SparseFactorQR_Double
__SparseFactorQR_Float __SparseFactorQR_Float
__SparseFactorSymmetric_Double __SparseFactorSymmetric_Double
__SparseFactorSymmetric_Float __SparseFactorSymmetric_Float
__SparseGMRESIterate_Double __SparseGMRESIterate_Double
__SparseGMRESIterate_Float __SparseGMRESIterate_Float
__SparseGMRESSolve_Double __SparseGMRESSolve_Double
__SparseGMRESSolve_Float __SparseGMRESSolve_Float
__SparseGetIterativeStateSize_Double __SparseGetIterativeStateSize_Double
__SparseGetIterativeStateSize_Float __SparseGetIterativeStateSize_Float
__SparseGetOptionsFromNumericFactor_Double __SparseGetOptionsFromNumericFactor_Double
__SparseGetOptionsFromNumericFactor_Float __SparseGetOptionsFromNumericFactor_Float
__SparseGetOptionsFromSymbolicFactor __SparseGetOptionsFromSymbolicFactor
__SparseGetWorkspaceRequired_Double __SparseGetWorkspaceRequired_Double
__SparseGetWorkspaceRequired_Float __SparseGetWorkspaceRequired_Float
__SparseLSMRIterate_Double __SparseLSMRIterate_Double
__SparseLSMRIterate_Float __SparseLSMRIterate_Float
__SparseLSMRSolve_Double __SparseLSMRSolve_Double
__SparseLSMRSolve_Float __SparseLSMRSolve_Float
__SparseMultiplySubfactor_Double __SparseMultiplySubfactor_Double
__SparseMultiplySubfactor_Float __SparseMultiplySubfactor_Float
__SparseNumericFactorQR_Double __SparseNumericFactorQR_Double
__SparseNumericFactorQR_Float __SparseNumericFactorQR_Float
__SparseNumericFactorSymmetric_Double __SparseNumericFactorSymmetric_Double
__SparseNumericFactorSymmetric_Float __SparseNumericFactorSymmetric_Float
__SparseRefactorQR_Double __SparseRefactorQR_Double
__SparseRefactorQR_Float __SparseRefactorQR_Float
__SparseRefactorSymmetric_Double __SparseRefactorSymmetric_Double
__SparseRefactorSymmetric_Float __SparseRefactorSymmetric_Float
__SparseReleaseOpaquePreconditioner_Double __SparseReleaseOpaquePreconditioner_Double
__SparseReleaseOpaquePreconditioner_Float __SparseReleaseOpaquePreconditioner_Float
__SparseRetainNumeric_Double __SparseRetainNumeric_Double
__SparseRetainNumeric_Float __SparseRetainNumeric_Float
__SparseRetainSymbolic __SparseRetainSymbolic
__SparseSolveOpaque_Double __SparseSolveOpaque_Double
__SparseSolveOpaque_Float __SparseSolveOpaque_Float
__SparseSolveSubfactor_Double __SparseSolveSubfactor_Double
__SparseSolveSubfactor_Float __SparseSolveSubfactor_Float
__SparseSpMV_Double __SparseSpMV_Double
__SparseSpMV_Float __SparseSpMV_Float
__SparseSymbolicFactorQR __SparseSymbolicFactorQR
__SparseSymbolicFactorSymmetric __SparseSymbolicFactorSymmetric
__SparseTrap __SparseTrap
__Z10SparseLSMR17SparseLSMROptions SparseLSMR(SparseLSMROptions)
__Z10SparseLSMRv SparseLSMR()
__Z11SparseGMRES18SparseGMRESOptions SparseGMRES(SparseGMRESOptions)
__Z11SparseGMRESv SparseGMRES()
__Z11SparseSolve21SparseIterativeMethod18SparseMatrix_Float17DenseMatrix_FloatS1_ SparseSolve(SparseIterativeMethod, SparseMatrix_Float, DenseMatrix_Float, DenseMatrix_Float)
__Z11SparseSolve21SparseIterativeMethod18SparseMatrix_Float17DenseMatrix_FloatS1_32SparseOpaquePreconditioner_Float SparseSolve(SparseIterativeMethod, SparseMatrix_Float, DenseMatrix_Float, DenseMatrix_Float, SparseOpaquePreconditioner_Float)
__Z11SparseSolve21SparseIterativeMethod18SparseMatrix_Float17DenseMatrix_FloatS1_i SparseSolve(SparseIterativeMethod, SparseMatrix_Float, DenseMatrix_Float, DenseMatrix_Float, int)
__Z11SparseSolve21SparseIterativeMethod18SparseMatrix_Float17DenseVector_FloatS1_ SparseSolve(SparseIterativeMethod, SparseMatrix_Float, DenseVector_Float, DenseVector_Float)
__Z11SparseSolve21SparseIterativeMethod18SparseMatrix_Float17DenseVector_FloatS1_32SparseOpaquePreconditioner_Float SparseSolve(SparseIterativeMethod, SparseMatrix_Float, DenseVector_Float, DenseVector_Float, SparseOpaquePreconditioner_Float)
__Z11SparseSolve21SparseIterativeMethod18SparseMatrix_Float17DenseVector_FloatS1_i SparseSolve(SparseIterativeMethod, SparseMatrix_Float, DenseVector_Float, DenseVector_Float, int)
__Z11SparseSolve21SparseIterativeMethod19SparseMatrix_Double18DenseMatrix_DoubleS1_ SparseSolve(SparseIterativeMethod, SparseMatrix_Double, DenseMatrix_Double, DenseMatrix_Double)
__Z11SparseSolve21SparseIterativeMethod19SparseMatrix_Double18DenseMatrix_DoubleS1_33SparseOpaquePreconditioner_Double SparseSolve(SparseIterativeMethod, SparseMatrix_Double, DenseMatrix_Double, DenseMatrix_Double, SparseOpaquePreconditioner_Double)
__Z11SparseSolve21SparseIterativeMethod19SparseMatrix_Double18DenseMatrix_DoubleS1_i SparseSolve(SparseIterativeMethod, SparseMatrix_Double, DenseMatrix_Double, DenseMatrix_Double, int)
__Z11SparseSolve21SparseIterativeMethod19SparseMatrix_Double18DenseVector_DoubleS1_ SparseSolve(SparseIterativeMethod, SparseMatrix_Double, DenseVector_Double, DenseVector_Double)
__Z11SparseSolve21SparseIterativeMethod19SparseMatrix_Double18DenseVector_DoubleS1_33SparseOpaquePreconditioner_Double SparseSolve(SparseIterativeMethod, SparseMatrix_Double, DenseVector_Double, DenseVector_Double, SparseOpaquePreconditioner_Double)
__Z11SparseSolve21SparseIterativeMethod19SparseMatrix_Double18DenseVector_DoubleS1_i SparseSolve(SparseIterativeMethod, SparseMatrix_Double, DenseVector_Double, DenseVector_Double, int)
__Z11SparseSolve21SparseIterativeMethodU13block_pointerFvb15CBLAS_TRANSPOSE17DenseMatrix_FloatS1_ES1_S1_ SparseSolve(SparseIterativeMethod, void (bool, CBLAS_TRANSPOSE, DenseMatrix_Float, DenseMatrix_Float) block_pointer, DenseMatrix_Float, DenseMatrix_Float)
__Z11SparseSolve21SparseIterativeMethodU13block_pointerFvb15CBLAS_TRANSPOSE17DenseMatrix_FloatS1_ES1_S1_32SparseOpaquePreconditioner_Float SparseSolve(SparseIterativeMethod, void (bool, CBLAS_TRANSPOSE, DenseMatrix_Float, DenseMatrix_Float) block_pointer, DenseMatrix_Float, DenseMatrix_Float, SparseOpaquePreconditioner_Float)
__Z11SparseSolve21SparseIterativeMethodU13block_pointerFvb15CBLAS_TRANSPOSE17DenseVector_FloatS1_ES1_S1_ SparseSolve(SparseIterativeMethod, void (bool, CBLAS_TRANSPOSE, DenseVector_Float, DenseVector_Float) block_pointer, DenseVector_Float, DenseVector_Float)
__Z11SparseSolve21SparseIterativeMethodU13block_pointerFvb15CBLAS_TRANSPOSE17DenseVector_FloatS1_ES1_S1_32SparseOpaquePreconditioner_Float SparseSolve(SparseIterativeMethod, void (bool, CBLAS_TRANSPOSE, DenseVector_Float, DenseVector_Float) block_pointer, DenseVector_Float, DenseVector_Float, SparseOpaquePreconditioner_Float)
__Z11SparseSolve21SparseIterativeMethodU13block_pointerFvb15CBLAS_TRANSPOSE18DenseMatrix_DoubleS1_ES1_S1_ SparseSolve(SparseIterativeMethod, void (bool, CBLAS_TRANSPOSE, DenseMatrix_Double, DenseMatrix_Double) block_pointer, DenseMatrix_Double, DenseMatrix_Double)
__Z11SparseSolve21SparseIterativeMethodU13block_pointerFvb15CBLAS_TRANSPOSE18DenseMatrix_DoubleS1_ES1_S1_33SparseOpaquePreconditioner_Double SparseSolve(SparseIterativeMethod, void (bool, CBLAS_TRANSPOSE, DenseMatrix_Double, DenseMatrix_Double) block_pointer, DenseMatrix_Double, DenseMatrix_Double, SparseOpaquePreconditioner_Double)
__Z11SparseSolve21SparseIterativeMethodU13block_pointerFvb15CBLAS_TRANSPOSE18DenseVector_DoubleS1_ES1_S1_ SparseSolve(SparseIterativeMethod, void (bool, CBLAS_TRANSPOSE, DenseVector_Double, DenseVector_Double) block_pointer, DenseVector_Double, DenseVector_Double)
__Z11SparseSolve21SparseIterativeMethodU13block_pointerFvb15CBLAS_TRANSPOSE18DenseVector_DoubleS1_ES1_S1_33SparseOpaquePreconditioner_Double SparseSolve(SparseIterativeMethod, void (bool, CBLAS_TRANSPOSE, DenseVector_Double, DenseVector_Double) block_pointer, DenseVector_Double, DenseVector_Double, SparseOpaquePreconditioner_Double)
__Z11SparseSolve27SparseOpaqueSubfactor_Float17DenseMatrix_Float SparseSolve(SparseOpaqueSubfactor_Float, DenseMatrix_Float)
__Z11SparseSolve27SparseOpaqueSubfactor_Float17DenseMatrix_FloatPv SparseSolve(SparseOpaqueSubfactor_Float, DenseMatrix_Float, void*)
__Z11SparseSolve27SparseOpaqueSubfactor_Float17DenseMatrix_FloatS0_ SparseSolve(SparseOpaqueSubfactor_Float, DenseMatrix_Float, DenseMatrix_Float)
__Z11SparseSolve27SparseOpaqueSubfactor_Float17DenseMatrix_FloatS0_Pv SparseSolve(SparseOpaqueSubfactor_Float, DenseMatrix_Float, DenseMatrix_Float, void*)
__Z11SparseSolve27SparseOpaqueSubfactor_Float17DenseVector_Float SparseSolve(SparseOpaqueSubfactor_Float, DenseVector_Float)
__Z11SparseSolve27SparseOpaqueSubfactor_Float17DenseVector_FloatPv SparseSolve(SparseOpaqueSubfactor_Float, DenseVector_Float, void*)
__Z11SparseSolve27SparseOpaqueSubfactor_Float17DenseVector_FloatS0_ SparseSolve(SparseOpaqueSubfactor_Float, DenseVector_Float, DenseVector_Float)
__Z11SparseSolve27SparseOpaqueSubfactor_Float17DenseVector_FloatS0_Pv SparseSolve(SparseOpaqueSubfactor_Float, DenseVector_Float, DenseVector_Float, void*)
__Z11SparseSolve28SparseOpaqueSubfactor_Double18DenseMatrix_Double SparseSolve(SparseOpaqueSubfactor_Double, DenseMatrix_Double)
__Z11SparseSolve28SparseOpaqueSubfactor_Double18DenseMatrix_DoublePv SparseSolve(SparseOpaqueSubfactor_Double, DenseMatrix_Double, void*)
__Z11SparseSolve28SparseOpaqueSubfactor_Double18DenseMatrix_DoubleS0_ SparseSolve(SparseOpaqueSubfactor_Double, DenseMatrix_Double, DenseMatrix_Double)
__Z11SparseSolve28SparseOpaqueSubfactor_Double18DenseMatrix_DoubleS0_Pv SparseSolve(SparseOpaqueSubfactor_Double, DenseMatrix_Double, DenseMatrix_Double, void*)
__Z11SparseSolve28SparseOpaqueSubfactor_Double18DenseVector_Double SparseSolve(SparseOpaqueSubfactor_Double, DenseVector_Double)
__Z11SparseSolve28SparseOpaqueSubfactor_Double18DenseVector_DoublePv SparseSolve(SparseOpaqueSubfactor_Double, DenseVector_Double, void*)
__Z11SparseSolve28SparseOpaqueSubfactor_Double18DenseVector_DoubleS0_ SparseSolve(SparseOpaqueSubfactor_Double, DenseVector_Double, DenseVector_Double)
__Z11SparseSolve28SparseOpaqueSubfactor_Double18DenseVector_DoubleS0_Pv SparseSolve(SparseOpaqueSubfactor_Double, DenseVector_Double, DenseVector_Double, void*)
__Z11SparseSolve31SparseOpaqueFactorization_Float17DenseMatrix_Float SparseSolve(SparseOpaqueFactorization_Float, DenseMatrix_Float)
__Z11SparseSolve31SparseOpaqueFactorization_Float17DenseMatrix_FloatPv SparseSolve(SparseOpaqueFactorization_Float, DenseMatrix_Float, void*)
__Z11SparseSolve31SparseOpaqueFactorization_Float17DenseMatrix_FloatS0_ SparseSolve(SparseOpaqueFactorization_Float, DenseMatrix_Float, DenseMatrix_Float)
__Z11SparseSolve31SparseOpaqueFactorization_Float17DenseMatrix_FloatS0_Pv SparseSolve(SparseOpaqueFactorization_Float, DenseMatrix_Float, DenseMatrix_Float, void*)
__Z11SparseSolve31SparseOpaqueFactorization_Float17DenseVector_Float SparseSolve(SparseOpaqueFactorization_Float, DenseVector_Float)
__Z11SparseSolve31SparseOpaqueFactorization_Float17DenseVector_FloatPv SparseSolve(SparseOpaqueFactorization_Float, DenseVector_Float, void*)
__Z11SparseSolve31SparseOpaqueFactorization_Float17DenseVector_FloatS0_ SparseSolve(SparseOpaqueFactorization_Float, DenseVector_Float, DenseVector_Float)
__Z11SparseSolve31SparseOpaqueFactorization_Float17DenseVector_FloatS0_Pv SparseSolve(SparseOpaqueFactorization_Float, DenseVector_Float, DenseVector_Float, void*)
__Z11SparseSolve32SparseOpaqueFactorization_Double18DenseMatrix_Double SparseSolve(SparseOpaqueFactorization_Double, DenseMatrix_Double)
__Z11SparseSolve32SparseOpaqueFactorization_Double18DenseMatrix_DoublePv SparseSolve(SparseOpaqueFactorization_Double, DenseMatrix_Double, void*)
__Z11SparseSolve32SparseOpaqueFactorization_Double18DenseMatrix_DoubleS0_ SparseSolve(SparseOpaqueFactorization_Double, DenseMatrix_Double, DenseMatrix_Double)
__Z11SparseSolve32SparseOpaqueFactorization_Double18DenseMatrix_DoubleS0_Pv SparseSolve(SparseOpaqueFactorization_Double, DenseMatrix_Double, DenseMatrix_Double, void*)
__Z11SparseSolve32SparseOpaqueFactorization_Double18DenseVector_Double SparseSolve(SparseOpaqueFactorization_Double, DenseVector_Double)
__Z11SparseSolve32SparseOpaqueFactorization_Double18DenseVector_DoublePv SparseSolve(SparseOpaqueFactorization_Double, DenseVector_Double, void*)
__Z11SparseSolve32SparseOpaqueFactorization_Double18DenseVector_DoubleS0_ SparseSolve(SparseOpaqueFactorization_Double, DenseVector_Double, DenseVector_Double)
__Z11SparseSolve32SparseOpaqueFactorization_Double18DenseVector_DoubleS0_Pv SparseSolve(SparseOpaqueFactorization_Double, DenseVector_Double, DenseVector_Double, void*)
__Z12SparseFactor33SparseOpaqueSymbolicFactorization18SparseMatrix_Float SparseFactor(SparseOpaqueSymbolicFactorization, SparseMatrix_Float)
__Z12SparseFactor33SparseOpaqueSymbolicFactorization18SparseMatrix_Float26SparseNumericFactorOptions SparseFactor(SparseOpaqueSymbolicFactorization, SparseMatrix_Float, SparseNumericFactorOptions)
__Z12SparseFactor33SparseOpaqueSymbolicFactorization18SparseMatrix_Float26SparseNumericFactorOptionsPvS2_ SparseFactor(SparseOpaqueSymbolicFactorization, SparseMatrix_Float, SparseNumericFactorOptions, void*, void*)
__Z12SparseFactor33SparseOpaqueSymbolicFactorization19SparseMatrix_Double SparseFactor(SparseOpaqueSymbolicFactorization, SparseMatrix_Double)
__Z12SparseFactor33SparseOpaqueSymbolicFactorization19SparseMatrix_Double26SparseNumericFactorOptions SparseFactor(SparseOpaqueSymbolicFactorization, SparseMatrix_Double, SparseNumericFactorOptions)
__Z12SparseFactor33SparseOpaqueSymbolicFactorization19SparseMatrix_Double26SparseNumericFactorOptionsPvS2_ SparseFactor(SparseOpaqueSymbolicFactorization, SparseMatrix_Double, SparseNumericFactorOptions, void*, void*)
__Z12SparseFactorh18SparseMatrix_Float SparseFactor(unsigned char, SparseMatrix_Float)
__Z12SparseFactorh18SparseMatrix_Float27SparseSymbolicFactorOptions26SparseNumericFactorOptions SparseFactor(unsigned char, SparseMatrix_Float, SparseSymbolicFactorOptions, SparseNumericFactorOptions)
__Z12SparseFactorh19SparseMatrix_Double SparseFactor(unsigned char, SparseMatrix_Double)
__Z12SparseFactorh19SparseMatrix_Double27SparseSymbolicFactorOptions26SparseNumericFactorOptions SparseFactor(unsigned char, SparseMatrix_Double, SparseSymbolicFactorOptions, SparseNumericFactorOptions)
__Z12SparseFactorh21SparseMatrixStructure SparseFactor(unsigned char, SparseMatrixStructure)
__Z12SparseFactorh21SparseMatrixStructure27SparseSymbolicFactorOptions SparseFactor(unsigned char, SparseMatrixStructure, SparseSymbolicFactorOptions)
__Z12SparseRetain27SparseOpaqueSubfactor_Float SparseRetain(SparseOpaqueSubfactor_Float)
__Z12SparseRetain28SparseOpaqueSubfactor_Double SparseRetain(SparseOpaqueSubfactor_Double)
__Z12SparseRetain31SparseOpaqueFactorization_Float SparseRetain(SparseOpaqueFactorization_Float)
__Z12SparseRetain32SparseOpaqueFactorization_Double SparseRetain(SparseOpaqueFactorization_Double)
__Z12SparseRetain33SparseOpaqueSymbolicFactorization SparseRetain(SparseOpaqueSymbolicFactorization)
__Z13SparseCleanup18SparseMatrix_Float SparseCleanup(SparseMatrix_Float)
__Z13SparseCleanup19SparseMatrix_Double SparseCleanup(SparseMatrix_Double)
__Z13SparseCleanup27SparseOpaqueSubfactor_Float SparseCleanup(SparseOpaqueSubfactor_Float)
__Z13SparseCleanup28SparseOpaqueSubfactor_Double SparseCleanup(SparseOpaqueSubfactor_Double)
__Z13SparseCleanup31SparseOpaqueFactorization_Float SparseCleanup(SparseOpaqueFactorization_Float)
__Z13SparseCleanup32SparseOpaqueFactorization_Double SparseCleanup(SparseOpaqueFactorization_Double)
__Z13SparseCleanup32SparseOpaquePreconditioner_Float SparseCleanup(SparseOpaquePreconditioner_Float)
__Z13SparseCleanup33SparseOpaquePreconditioner_Double SparseCleanup(SparseOpaquePreconditioner_Double)
__Z13SparseCleanup33SparseOpaqueSymbolicFactorization SparseCleanup(SparseOpaqueSymbolicFactorization)
__Z13SparseIterate21SparseIterativeMethodiPKbPvU13block_pointerFvb15CBLAS_TRANSPOSE17DenseMatrix_FloatS4_ES4_S4_S4_ SparseIterate(SparseIterativeMethod, int, bool const*, void*, void (bool, CBLAS_TRANSPOSE, DenseMatrix_Float, DenseMatrix_Float) block_pointer, DenseMatrix_Float, DenseMatrix_Float, DenseMatrix_Float)
__Z13SparseIterate21SparseIterativeMethodiPKbPvU13block_pointerFvb15CBLAS_TRANSPOSE17DenseMatrix_FloatS4_ES4_S4_S4_32SparseOpaquePreconditioner_Float SparseIterate(SparseIterativeMethod, int, bool const*, void*, void (bool, CBLAS_TRANSPOSE, DenseMatrix_Float, DenseMatrix_Float) block_pointer, DenseMatrix_Float, DenseMatrix_Float, DenseMatrix_Float, SparseOpaquePreconditioner_Float)
__Z13SparseIterate21SparseIterativeMethodiPKbPvU13block_pointerFvb15CBLAS_TRANSPOSE18DenseMatrix_DoubleS4_ES4_S4_S4_ SparseIterate(SparseIterativeMethod, int, bool const*, void*, void (bool, CBLAS_TRANSPOSE, DenseMatrix_Double, DenseMatrix_Double) block_pointer, DenseMatrix_Double, DenseMatrix_Double, DenseMatrix_Double)
__Z13SparseIterate21SparseIterativeMethodiPKbPvU13block_pointerFvb15CBLAS_TRANSPOSE18DenseMatrix_DoubleS4_ES4_S4_S4_33SparseOpaquePreconditioner_Double SparseIterate(SparseIterativeMethod, int, bool const*, void*, void (bool, CBLAS_TRANSPOSE, DenseMatrix_Double, DenseMatrix_Double) block_pointer, DenseMatrix_Double, DenseMatrix_Double, DenseMatrix_Double, SparseOpaquePreconditioner_Double)
__Z14SparseMultiply18SparseMatrix_Float17DenseMatrix_FloatS0_ SparseMultiply(SparseMatrix_Float, DenseMatrix_Float, DenseMatrix_Float)
__Z14SparseMultiply18SparseMatrix_Float17DenseVector_FloatS0_ SparseMultiply(SparseMatrix_Float, DenseVector_Float, DenseVector_Float)
__Z14SparseMultiply19SparseMatrix_Double18DenseMatrix_DoubleS0_ SparseMultiply(SparseMatrix_Double, DenseMatrix_Double, DenseMatrix_Double)
__Z14SparseMultiply19SparseMatrix_Double18DenseVector_DoubleS0_ SparseMultiply(SparseMatrix_Double, DenseVector_Double, DenseVector_Double)
__Z14SparseMultiply27SparseOpaqueSubfactor_Float17DenseMatrix_Float SparseMultiply(SparseOpaqueSubfactor_Float, DenseMatrix_Float)
__Z14SparseMultiply27SparseOpaqueSubfactor_Float17DenseMatrix_FloatPv SparseMultiply(SparseOpaqueSubfactor_Float, DenseMatrix_Float, void*)
__Z14SparseMultiply27SparseOpaqueSubfactor_Float17DenseMatrix_FloatS0_ SparseMultiply(SparseOpaqueSubfactor_Float, DenseMatrix_Float, DenseMatrix_Float)
__Z14SparseMultiply27SparseOpaqueSubfactor_Float17DenseMatrix_FloatS0_Pv SparseMultiply(SparseOpaqueSubfactor_Float, DenseMatrix_Float, DenseMatrix_Float, void*)
__Z14SparseMultiply27SparseOpaqueSubfactor_Float17DenseVector_Float SparseMultiply(SparseOpaqueSubfactor_Float, DenseVector_Float)
__Z14SparseMultiply27SparseOpaqueSubfactor_Float17DenseVector_FloatPv SparseMultiply(SparseOpaqueSubfactor_Float, DenseVector_Float, void*)
__Z14SparseMultiply27SparseOpaqueSubfactor_Float17DenseVector_FloatS0_ SparseMultiply(SparseOpaqueSubfactor_Float, DenseVector_Float, DenseVector_Float)
__Z14SparseMultiply27SparseOpaqueSubfactor_Float17DenseVector_FloatS0_Pv SparseMultiply(SparseOpaqueSubfactor_Float, DenseVector_Float, DenseVector_Float, void*)
__Z14SparseMultiply28SparseOpaqueSubfactor_Double18DenseMatrix_Double SparseMultiply(SparseOpaqueSubfactor_Double, DenseMatrix_Double)
__Z14SparseMultiply28SparseOpaqueSubfactor_Double18DenseMatrix_DoublePv SparseMultiply(SparseOpaqueSubfactor_Double, DenseMatrix_Double, void*)
__Z14SparseMultiply28SparseOpaqueSubfactor_Double18DenseMatrix_DoubleS0_ SparseMultiply(SparseOpaqueSubfactor_Double, DenseMatrix_Double, DenseMatrix_Double)
__Z14SparseMultiply28SparseOpaqueSubfactor_Double18DenseMatrix_DoubleS0_Pv SparseMultiply(SparseOpaqueSubfactor_Double, DenseMatrix_Double, DenseMatrix_Double, void*)
__Z14SparseMultiply28SparseOpaqueSubfactor_Double18DenseVector_Double SparseMultiply(SparseOpaqueSubfactor_Double, DenseVector_Double)
__Z14SparseMultiply28SparseOpaqueSubfactor_Double18DenseVector_DoublePv SparseMultiply(SparseOpaqueSubfactor_Double, DenseVector_Double, void*)
__Z14SparseMultiply28SparseOpaqueSubfactor_Double18DenseVector_DoubleS0_ SparseMultiply(SparseOpaqueSubfactor_Double, DenseVector_Double, DenseVector_Double)
__Z14SparseMultiply28SparseOpaqueSubfactor_Double18DenseVector_DoubleS0_Pv SparseMultiply(SparseOpaqueSubfactor_Double, DenseVector_Double, DenseVector_Double, void*)
__Z14SparseMultiplyd19SparseMatrix_Double18DenseMatrix_DoubleS0_ SparseMultiply(double, SparseMatrix_Double, DenseMatrix_Double, DenseMatrix_Double)
__Z14SparseMultiplyd19SparseMatrix_Double18DenseVector_DoubleS0_ SparseMultiply(double, SparseMatrix_Double, DenseVector_Double, DenseVector_Double)
__Z14SparseMultiplyf18SparseMatrix_Float17DenseMatrix_FloatS0_ SparseMultiply(float, SparseMatrix_Float, DenseMatrix_Float, DenseMatrix_Float)
__Z14SparseMultiplyf18SparseMatrix_Float17DenseVector_FloatS0_ SparseMultiply(float, SparseMatrix_Float, DenseVector_Float, DenseVector_Float)
__Z14SparseRefactor18SparseMatrix_FloatP31SparseOpaqueFactorization_Float SparseRefactor(SparseMatrix_Float, SparseOpaqueFactorization_Float*)
__Z14SparseRefactor18SparseMatrix_FloatP31SparseOpaqueFactorization_Float26SparseNumericFactorOptions SparseRefactor(SparseMatrix_Float, SparseOpaqueFactorization_Float*, SparseNumericFactorOptions)
__Z14SparseRefactor18SparseMatrix_FloatP31SparseOpaqueFactorization_Float26SparseNumericFactorOptionsPv SparseRefactor(SparseMatrix_Float, SparseOpaqueFactorization_Float*, SparseNumericFactorOptions, void*)
__Z14SparseRefactor18SparseMatrix_FloatP31SparseOpaqueFactorization_FloatPv SparseRefactor(SparseMatrix_Float, SparseOpaqueFactorization_Float*, void*)
__Z14SparseRefactor19SparseMatrix_DoubleP32SparseOpaqueFactorization_Double SparseRefactor(SparseMatrix_Double, SparseOpaqueFactorization_Double*)
__Z14SparseRefactor19SparseMatrix_DoubleP32SparseOpaqueFactorization_Double26SparseNumericFactorOptions SparseRefactor(SparseMatrix_Double, SparseOpaqueFactorization_Double*, SparseNumericFactorOptions)
__Z14SparseRefactor19SparseMatrix_DoubleP32SparseOpaqueFactorization_Double26SparseNumericFactorOptionsPv SparseRefactor(SparseMatrix_Double, SparseOpaqueFactorization_Double*, SparseNumericFactorOptions, void*)
__Z14SparseRefactor19SparseMatrix_DoubleP32SparseOpaqueFactorization_DoublePv SparseRefactor(SparseMatrix_Double, SparseOpaqueFactorization_Double*, void*)
__Z16SparseGetInertia31SparseOpaqueFactorization_FloatPiS0_S0_ SparseGetInertia(SparseOpaqueFactorization_Float, int*, int*, int*)
__Z16SparseGetInertia32SparseOpaqueFactorization_DoublePiS0_S0_ SparseGetInertia(SparseOpaqueFactorization_Double, int*, int*, int*)
__Z17SparseMultiplyAdd18SparseMatrix_Float17DenseMatrix_FloatS0_ SparseMultiplyAdd(SparseMatrix_Float, DenseMatrix_Float, DenseMatrix_Float)
__Z17SparseMultiplyAdd18SparseMatrix_Float17DenseVector_FloatS0_ SparseMultiplyAdd(SparseMatrix_Float, DenseVector_Float, DenseVector_Float)
__Z17SparseMultiplyAdd19SparseMatrix_Double18DenseMatrix_DoubleS0_ SparseMultiplyAdd(SparseMatrix_Double, DenseMatrix_Double, DenseMatrix_Double)
__Z17SparseMultiplyAdd19SparseMatrix_Double18DenseVector_DoubleS0_ SparseMultiplyAdd(SparseMatrix_Double, DenseVector_Double, DenseVector_Double)
__Z17SparseMultiplyAddd19SparseMatrix_Double18DenseMatrix_DoubleS0_ SparseMultiplyAdd(double, SparseMatrix_Double, DenseMatrix_Double, DenseMatrix_Double)
__Z17SparseMultiplyAddd19SparseMatrix_Double18DenseVector_DoubleS0_ SparseMultiplyAdd(double, SparseMatrix_Double, DenseVector_Double, DenseVector_Double)
__Z17SparseMultiplyAddf18SparseMatrix_Float17DenseMatrix_FloatS0_ SparseMultiplyAdd(float, SparseMatrix_Float, DenseMatrix_Float, DenseMatrix_Float)
__Z17SparseMultiplyAddf18SparseMatrix_Float17DenseVector_FloatS0_ SparseMultiplyAdd(float, SparseMatrix_Float, DenseVector_Float, DenseVector_Float)
__Z17SparseWriteMatrixP7__sFILEjPKc18SparseMatrix_Float SparseWriteMatrix(__sFILE*, unsigned int, char const*, SparseMatrix_Float)
__Z17SparseWriteMatrixP7__sFILEjPKc19SparseMatrix_Double SparseWriteMatrix(__sFILE*, unsigned int, char const*, SparseMatrix_Double)
__Z18SparseGetTranspose18SparseMatrix_Float SparseGetTranspose(SparseMatrix_Float)
__Z18SparseGetTranspose19SparseMatrix_Double SparseGetTranspose(SparseMatrix_Double)
__Z18SparseGetTranspose27SparseOpaqueSubfactor_Float SparseGetTranspose(SparseOpaqueSubfactor_Float)
__Z18SparseGetTranspose28SparseOpaqueSubfactor_Double SparseGetTranspose(SparseOpaqueSubfactor_Double)
__Z18SparseGetTranspose31SparseOpaqueFactorization_Float SparseGetTranspose(SparseOpaqueFactorization_Float)
__Z18SparseGetTranspose32SparseOpaqueFactorization_Double SparseGetTranspose(SparseOpaqueFactorization_Double)
__Z21SparseCreateSubfactorh31SparseOpaqueFactorization_Float SparseCreateSubfactor(unsigned char, SparseOpaqueFactorization_Float)
__Z21SparseCreateSubfactorh32SparseOpaqueFactorization_Double SparseCreateSubfactor(unsigned char, SparseOpaqueFactorization_Double)
__Z22SparseReadMatrix_FloatP7__sFILEjmPc SparseReadMatrix_Float(__sFILE*, unsigned int, unsigned long, char*)
__Z23SparseConjugateGradient15SparseCGOptions SparseConjugateGradient(SparseCGOptions)
__Z23SparseConjugateGradientv SparseConjugateGradient()
__Z23SparseConvertFromOpaqueP14sparse_m_float SparseConvertFromOpaque(sparse_m_float*)
__Z23SparseConvertFromOpaqueP15sparse_m_double SparseConvertFromOpaque(sparse_m_double*)
__Z23SparseReadMatrix_DoubleP7__sFILEjmPc SparseReadMatrix_Double(__sFILE*, unsigned int, unsigned long, char*)
__Z24SparseGetStateSize_Float21SparseIterativeMethodbiii SparseGetStateSize_Float(SparseIterativeMethod, bool, int, int, int)
__Z25SparseGetStateSize_Double21SparseIterativeMethodbiii SparseGetStateSize_Double(SparseIterativeMethod, bool, int, int, int)
__Z26SparseCreatePreconditioneri18SparseMatrix_Float SparseCreatePreconditioner(int, SparseMatrix_Float)
__Z26SparseCreatePreconditioneri19SparseMatrix_Double SparseCreatePreconditioner(int, SparseMatrix_Double)
__Z27SparseConvertFromCoordinateiilh18SparseAttributes_tPKiS1_PKd SparseConvertFromCoordinate(int, int, long, unsigned char, SparseAttributes_t, int const*, int const*, double const*)
__Z27SparseConvertFromCoordinateiilh18SparseAttributes_tPKiS1_PKdPvS4_ SparseConvertFromCoordinate(int, int, long, unsigned char, SparseAttributes_t, int const*, int const*, double const*, void*, void*)
__Z27SparseConvertFromCoordinateiilh18SparseAttributes_tPKiS1_PKf SparseConvertFromCoordinate(int, int, long, unsigned char, SparseAttributes_t, int const*, int const*, float const*)
__Z27SparseConvertFromCoordinateiilh18SparseAttributes_tPKiS1_PKfPvS4_ SparseConvertFromCoordinate(int, int, long, unsigned char, SparseAttributes_t, int const*, int const*, float const*, void*, void*)

All the relevant components can be found in that same GitHub repo, in the src/libSparse folder of the libSparse branch of AppleAccelerate.jl.

Apple Accelerate libSparse performance
 
 
Q