}
else
{
- dense = alpha * sqrt ((double) n) ;
+ dense = (Int) (alpha * sqrt ((double) n)) ;
}
dense = MAX (16, dense) ;
dense = MIN (n, dense) ;
if (Work->do_grow)
{
- fnr2 = UMF_FRONTAL_GROWTH * Work->fnrows_new + 2 ;
- fnc2 = UMF_FRONTAL_GROWTH * Work->fncols_new + 2 ;
+ fnr2 = (Int) (UMF_FRONTAL_GROWTH * Work->fnrows_new + 2) ;
+ fnc2 = (Int) (UMF_FRONTAL_GROWTH * Work->fncols_new + 2) ;
if (!UMF_grow_front (Numeric, fnr2, fnc2, Work, 1))
{
DEBUGm4 (("out of memory: extend front\n")) ;
/* the desired front size is bigger than the integer maximum */
/* compute a such that a*a*s < Int_MAX / sizeof (Entry) */
double a = 0.9 * sqrt ((Int_MAX / sizeof (Entry)) / s) ;
- fnr2 = MAX (fnr_min, a * fnr2) ;
- fnc2 = MAX (fnc_min, a * fnc2) ;
+ fnr2 = (Int) MAX (fnr_min, a * fnr2) ;
+ fnc2 = (Int) MAX (fnc_min, a * fnc2) ;
/* the new frontal size is a*r*a*c = a*a*s */
newsize = fnr2 * fnc2 ;
ASSERT (fnr2 >= 0) ;
/* try again with something smaller */
while ((fnr2 != fnr_min || fnc2 != fnc_min) && !eloc)
{
- fnr2 = MIN (fnr2 - 2, fnr2 * UMF_REALLOC_REDUCTION) ;
- fnc2 = MIN (fnc2 - 2, fnc2 * UMF_REALLOC_REDUCTION) ;
+ fnr2 = (Int) MIN (fnr2 - 2, fnr2 * UMF_REALLOC_REDUCTION) ;
+ fnc2 = (Int) MIN (fnc2 - 2, fnc2 * UMF_REALLOC_REDUCTION) ;
ASSERT (fnr_min >= 0) ;
ASSERT (fnr_min % 2 == 1) ;
fnr2 = MAX (fnr_min, fnr2) ;
#endif
if (Work->do_grow)
{
- fnr2 = UMF_FRONTAL_GROWTH * Work->fnrows_new + 2 ;
- fnc2 = UMF_FRONTAL_GROWTH * Work->fncols_new + 2 ;
+ fnr2 = (Int) (UMF_FRONTAL_GROWTH * Work->fnrows_new + 2) ;
+ fnc2 = (Int) (UMF_FRONTAL_GROWTH * Work->fncols_new + 2) ;
if (!UMF_grow_front (Numeric, fnr2, fnc2, Work,
Work->pivrow_in_front ? 2 : 0))
{
if (Numeric->front_alloc_init < 0)
{
/* allocate a front of -Numeric->front_alloc_init entries */
- fsize = -Numeric->front_alloc_init ;
+ fsize = (Int) -Numeric->front_alloc_init ;
fsize = MAX (1, fsize) ;
}
else
}
else
{
- fsize = Numeric->front_alloc_init * maxfrsize ;
+ fsize = (Int) (Numeric->front_alloc_init * maxfrsize) ;
}
if (cdeg > 0)
alloc_init = GET_CONTROL (UMFPACK_ALLOC_INIT, UMFPACK_DEFAULT_ALLOC_INIT) ;
front_alloc_init = GET_CONTROL (UMFPACK_FRONT_ALLOC_INIT,
UMFPACK_DEFAULT_FRONT_ALLOC_INIT) ;
- scale = GET_CONTROL (UMFPACK_SCALE, UMFPACK_DEFAULT_SCALE) ;
+ scale = (Int) GET_CONTROL (UMFPACK_SCALE, UMFPACK_DEFAULT_SCALE) ;
droptol = GET_CONTROL (UMFPACK_DROPTOL, UMFPACK_DEFAULT_DROPTOL) ;
relpt = MAX (0.0, MIN (relpt, 1.0)) ;
AMD_1 (n, Ap, Ai, Q, Qinv, Sdeg, Clen, Ci, amd_Control, amd_Info) ;
/* return estimates computed from AMD on PA+PA' */
- Symbolic->amd_dmax = amd_Info [AMD_DMAX] ;
+ Symbolic->amd_dmax = (Int) amd_Info [AMD_DMAX] ;
Symbolic->amd_lunz = 2 * amd_Info [AMD_LNZ] + n ;
Info [UMFPACK_SYMMETRIC_LUNZ] = Symbolic->amd_lunz ;
Info [UMFPACK_SYMMETRIC_FLOPS] = DIV_FLOPS * amd_Info [AMD_NDIV] +
drow = GET_CONTROL (UMFPACK_DENSE_ROW, UMFPACK_DEFAULT_DENSE_ROW) ;
dcol = GET_CONTROL (UMFPACK_DENSE_COL, UMFPACK_DEFAULT_DENSE_COL) ;
- nb = GET_CONTROL (UMFPACK_BLOCK_SIZE, UMFPACK_DEFAULT_BLOCK_SIZE) ;
- strategy = GET_CONTROL (UMFPACK_STRATEGY, UMFPACK_DEFAULT_STRATEGY) ;
+ nb = (Int) GET_CONTROL (UMFPACK_BLOCK_SIZE, UMFPACK_DEFAULT_BLOCK_SIZE) ;
+ strategy = (Int) GET_CONTROL (UMFPACK_STRATEGY, UMFPACK_DEFAULT_STRATEGY) ;
tol = GET_CONTROL (UMFPACK_2BY2_TOLERANCE, UMFPACK_DEFAULT_2BY2_TOLERANCE) ;
scale = GET_CONTROL (UMFPACK_SCALE, UMFPACK_DEFAULT_SCALE) ;
force_fixQ = GET_CONTROL (UMFPACK_FIXQ, UMFPACK_DEFAULT_FIXQ) ;
Clen = UMF_COLAMD_RECOMMENDED (nz, n_row, n_col) ;
Clen_analyze = UMF_ANALYZE_CLEN (nz, n_row, n_col, nn) ;
Clen = MAX (Clen, Clen_analyze) ;
- Clen_amd = 2.4 * nz + 8 * n_inner ;
+ Clen_amd = (Int) (2.4 * nz + 8 * n_inner) ;
Clen_amd += MAX (nn, nz) ; /* for Ri, in UMF_2by2 */
Clen = MAX (Clen, Clen_amd) ;
#ifdef COMPLEX
Az,
#endif
- tol, scale, Cperm1,
+ tol, (Int) scale, Cperm1,
#ifndef NDEBUG
Rperm1,
#endif
}
nz_papat = AMD_aat (n2, Rp, Ri, Sdeg, Wq, amd_Info) ;
sym2 = amd_Info [AMD_SYMMETRY] ;
- nzd2 = amd_Info [AMD_NZDIAG] ;
+ nzd2 = (Int) amd_Info [AMD_NZDIAG] ;
Info [UMFPACK_2BY2_PATTERN_SYMMETRY] = sym2 ;
Info [UMFPACK_2BY2_NZ_PA_PLUS_PAT] = nz_papat ;
double drow, dcol, relpt, relpt2, alloc_init, front_alloc_init, amd_alpha,
tol, force_fixQ, droptol, aggr ;
- prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
+ prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
if (prl < 2)
{
/* block size */
/* ---------------------------------------------------------------------- */
- nb = GET_CONTROL (UMFPACK_BLOCK_SIZE, UMFPACK_DEFAULT_BLOCK_SIZE) ;
+ nb = (Int) GET_CONTROL (UMFPACK_BLOCK_SIZE, UMFPACK_DEFAULT_BLOCK_SIZE) ;
nb = MAX (1, nb) ;
PRINTF ((" "ID": block size for dense matrix kernels: "ID"\n",
(Int) INDEX (UMFPACK_BLOCK_SIZE), nb)) ;
/* strategy */
/* ---------------------------------------------------------------------- */
- strategy = GET_CONTROL (UMFPACK_STRATEGY, UMFPACK_DEFAULT_STRATEGY) ;
+ strategy = (Int) GET_CONTROL (UMFPACK_STRATEGY, UMFPACK_DEFAULT_STRATEGY) ;
if (strategy < UMFPACK_STRATEGY_AUTO
|| strategy > UMFPACK_STRATEGY_SYMMETRIC)
{
}
else
{
- s = -alloc_init ;
+ s =(Int) -alloc_init ;
s = MAX (1, s) ;
PRINTF ((" "ID": initial allocation (in Units): "ID"\n",
(Int) INDEX (UMFPACK_ALLOC_INIT), s)) ;
/* maximum iterative refinement steps */
/* ---------------------------------------------------------------------- */
- irstep = GET_CONTROL (UMFPACK_IRSTEP, UMFPACK_DEFAULT_IRSTEP) ;
+ irstep = (Int) GET_CONTROL (UMFPACK_IRSTEP, UMFPACK_DEFAULT_IRSTEP) ;
irstep = MAX (0, irstep) ;
PRINTF ((" "ID": max iterative refinement steps: "ID"\n",
(Int) INDEX (UMFPACK_IRSTEP), irstep)) ;
/* scaling */
/* ---------------------------------------------------------------------- */
- scale = GET_CONTROL (UMFPACK_SCALE, UMFPACK_DEFAULT_SCALE) ;
+ scale = (Int) GET_CONTROL (UMFPACK_SCALE, UMFPACK_DEFAULT_SCALE) ;
if (scale != UMFPACK_SCALE_NONE && scale != UMFPACK_SCALE_MAX)
{
scale = UMFPACK_DEFAULT_SCALE ;
}
else
{
- s = -front_alloc_init ;
+ s = (Int) -front_alloc_init ;
s = MAX (1, s) ;
PRINTF ((" "ID": initial frontal matrix size (# of Entry's): "ID"\n",
(Int) INDEX (UMFPACK_FRONT_ALLOC_INIT), s)) ;
/* get control settings and status to determine what to print */
/* ---------------------------------------------------------------------- */
- prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
+ prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
if (!Info || prl < 2)
{
Info [UMFPACK_NEMPTY_ROW]) ;
PRINT_INFO (" number of empty columns %.0f\n",
Info [UMFPACK_NEMPTY_COL]) ;
- is_sym = Info [UMFPACK_S_SYMMETRIC] ;
+ is_sym = (Int) Info [UMFPACK_S_SYMMETRIC] ;
if (is_sym > 0)
{
PRINTF ((" submatrix S square and diagonal preserved\n")) ;
/* determine the form, and check if inputs exist */
/* ---------------------------------------------------------------------- */
- prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
+ prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
if (prl <= 2)
{
npiv ;
NumericType *Numeric ;
- prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
+ prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
if (prl <= 2)
{
{
Int prl, *W, status ;
- prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
+ prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
if (prl <= 2)
{
/* get control settings and status to determine what to print */
/* ---------------------------------------------------------------------- */
- prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
+ prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
if (prl < 1)
{
*Front_leftmostdesc, *Front_parent, done, status1, status2 ;
SymbolicType *Symbolic ;
- prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
+ prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
if (prl <= 2)
{
Int prl, prl1, k, i, j, do_values ;
Entry t ;
- prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
+ prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
if (prl <= 2)
{
double *Xz = (double *) NULL ;
#endif
- prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
+ prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ;
if (prl <= 2)
{
/* get parameters */
/* ---------------------------------------------------------------------- */
- irstep = GET_CONTROL (UMFPACK_IRSTEP, UMFPACK_DEFAULT_IRSTEP) ;
+ irstep = (Int) GET_CONTROL (UMFPACK_IRSTEP, UMFPACK_DEFAULT_IRSTEP) ;
if (User_Info != (double *) NULL)
{