SuiteSparse/SPQR/MATLAB/spqr_mx.cpp
int spqr_mx_config (Long spumoni, cholmod_common *cc)
{
    if (cc == NULL) return (FALSE) ;

    // cholmod_l_solve must return a real or zomplex X for MATLAB
    cc->prefer_zomplex = TRUE ;

    // printing and error handling
    if (spumoni == 0)
    {
	// do not print anything from within CHOLMOD
	cc->print = -1 ;
	SuiteSparse_config.printf_func = NULL ;
    }
    else
    {
	// spumoni = 1: print warning and error messages.  cholmod_l_print_*
	//	routines will print a one-line summary of each object printed.
	// spumoni = 2: also print a short summary of each object.
	cc->print = spumoni + 2 ;
    }

    // error handler
    cc->error_handler = spqr_mx_error ;
    spqr_spumoni = spumoni ;

    // Turn off METIS memory guard.  It is not needed, because mxMalloc will
    // safely terminate the mexFunction and free any workspace without killing
    // all of MATLAB.  This assumes spqr_make was used to compile SuiteSparseQR
    // for MATLAB.
    cc->metis_memory = 0.0 ;

    cc->SPQR_grain = 1 ;    // opts.grain
    cc->SPQR_small = 1e6 ;  // opts.small
    cc->SPQR_shrink = 1 ;   // controls SPQR shrink realloc
    cc->SPQR_nthreads = 0 ; // number of TBB threads (0 = default)

    return (TRUE) ;
}
// Define function pointers and other parameters for a mexFunction
Define function pointers and other parameters for a mexFunction
Define function pointers and other parameters for a mexFunction
int spqr_mx_config (Long spumoni, cholmod_common *cc)
{
    if (cc == NULL) return (FALSE) ;
    cc->prefer_zomplex = TRUE ;
    if (spumoni == 0)
    {
	cc->print = -1 ;
	SuiteSparse_config.printf_func = NULL ;
    }
    else
    {
	cc->print = spumoni + 2 ;
    }
    cc->error_handler = spqr_mx_error ;
    spqr_spumoni = spumoni ;
    cc->metis_memory = 0.0 ;
    cc->SPQR_grain = 1 ;    
    cc->SPQR_small = 1e6 ;  
    cc->SPQR_shrink = 1 ;   
    cc->SPQR_nthreads = 0 ; 
    return (TRUE) ;
}
int spqr_mx_config ( Long spumoni , cholmod_common * cc ) { if ( cc == NULL ) return ( FALSE ) ; cc -> prefer_zomplex = TRUE ; if ( spumoni == 0 ) { cc -> print = -1 ; SuiteSparse_config . printf_func = NULL ; } else { cc -> print = spumoni + 2 ; } cc -> error_handler = spqr_mx_error ; spqr_spumoni = spumoni ; cc -> metis_memory = 0.0 ; cc -> SPQR_grain = 1 ; cc -> SPQR_small = 1e6 ; cc -> SPQR_shrink = 1 ; cc -> SPQR_nthreads = 0 ; return ( TRUE ) ; }
Define function pointers and other parameters for a mexFunction
Define function pointers and other parameters for a mexFunction
// cholmod_l_solve must return a real or zomplex X for MATLAB // printing and error handling // do not print anything from within CHOLMOD // spumoni = 1: print warning and error messages.  cholmod_l_print_* //	routines will print a one-line summary of each object printed. // spumoni = 2: also print a short summary of each object. // error handler // Turn off METIS memory guard.  It is not needed, because mxMalloc will // safely terminate the mexFunction and free any workspace without killing // all of MATLAB.  This assumes spqr_make was used to compile SuiteSparseQR // for MATLAB. // opts.grain // opts.small // controls SPQR shrink realloc // number of TBB threads (0 = default)