3
* -- SuperLU routine (version 3.0) --
4
* Univ. of California Berkeley, Xerox Palo Alto Research Center,
5
* and Lawrence Berkeley National Lab.
10
Copyright (c) 1994 by Xerox Corporation. All rights reserved.
12
THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
13
EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
15
Permission is hereby granted to use or copy this program for any
16
purpose, provided the above notices are retained on all copies.
17
Permission to modify the code and to distribute modified code is
18
granted, provided the above notices are retained, and a notice that
19
the code was modified is included with the above copyright notice.
26
* Performs numeric block updates within the relaxed snode.
30
const int jcol, /* in */
31
const int jsupno, /* in */
32
const int fsupc, /* in */
33
double *dense, /* in */
34
double *tempv, /* working array */
35
GlobalLU_t *Glu, /* modified */
36
SuperLUStat_t *stat /* output */
39
#ifdef USE_VENDOR_BLAS
41
_fcd ftcs1 = _cptofcd("L", strlen("L")),
42
ftcs2 = _cptofcd("N", strlen("N")),
43
ftcs3 = _cptofcd("U", strlen("U"));
45
int incx = 1, incy = 1;
46
double alpha = -1.0, beta = 1.0;
49
int luptr, nsupc, nsupr, nrow;
50
int isub, irow, i, iptr;
51
register int ufirst, nextlu;
55
flops_t *ops = stat->ops;
62
nextlu = xlusup[jcol];
65
* Process the supernodal portion of L\U[*,j]
67
for (isub = xlsub[fsupc]; isub < xlsub[fsupc+1]; isub++) {
69
lusup[nextlu] = dense[irow];
74
xlusup[jcol + 1] = nextlu; /* Initialize xlusup for next column */
78
luptr = xlusup[fsupc];
79
nsupr = xlsub[fsupc+1] - xlsub[fsupc];
80
nsupc = jcol - fsupc; /* Excluding jcol */
81
ufirst = xlusup[jcol]; /* Points to the beginning of column
82
jcol in supernode L\U(jsupno). */
85
ops[TRSV] += nsupc * (nsupc - 1);
86
ops[GEMV] += 2 * nrow * nsupc;
88
#ifdef USE_VENDOR_BLAS
90
STRSV( ftcs1, ftcs2, ftcs3, &nsupc, &lusup[luptr], &nsupr,
91
&lusup[ufirst], &incx );
92
SGEMV( ftcs2, &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
93
&lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
95
dtrsv_( "L", "N", "U", &nsupc, &lusup[luptr], &nsupr,
96
&lusup[ufirst], &incx );
97
dgemv_( "N", &nrow, &nsupc, &alpha, &lusup[luptr+nsupc], &nsupr,
98
&lusup[ufirst], &incx, &beta, &lusup[ufirst+nsupc], &incy );
101
dlsolve ( nsupr, nsupc, &lusup[luptr], &lusup[ufirst] );
102
dmatvec ( nsupr, nrow, nsupc, &lusup[luptr+nsupc],
103
&lusup[ufirst], &tempv[0] );
105
/* Scatter tempv[*] into lusup[*] */
106
iptr = ufirst + nsupc;
107
for (i = 0; i < nrow; i++) {
108
lusup[iptr++] -= tempv[i];