LAPACK  3.10.1 LAPACK: Linear Algebra PACKage

## ◆ dla_gbamv()

 subroutine dla_gbamv ( integer TRANS, integer M, integer N, integer KL, integer KU, double precision ALPHA, double precision, dimension( ldab, * ) AB, integer LDAB, double precision, dimension( * ) X, integer INCX, double precision BETA, double precision, dimension( * ) Y, integer INCY )

DLA_GBAMV performs a matrix-vector operation to calculate error bounds.

Download DLA_GBAMV + dependencies [TGZ] [ZIP] [TXT]

Purpose:
``` DLA_GBAMV  performs one of the matrix-vector operations

y := alpha*abs(A)*abs(x) + beta*abs(y),
or   y := alpha*abs(A)**T*abs(x) + beta*abs(y),

where alpha and beta are scalars, x and y are vectors and A is an
m by n matrix.

This function is primarily used in calculating error bounds.
To protect against underflow during evaluation, components in
the resulting vector are perturbed away from zero by (N+1)
times the underflow threshold.  To prevent unnecessarily large
errors for block-structure embedded in general matrices,
"symbolically" zero components are not perturbed.  A zero
entry is considered "symbolic" if all multiplications involved
in computing that entry have at least one zero multiplicand.```
Parameters
 [in] TRANS ``` TRANS is INTEGER On entry, TRANS specifies the operation to be performed as follows: BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y) BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y) BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y) Unchanged on exit.``` [in] M ``` M is INTEGER On entry, M specifies the number of rows of the matrix A. M must be at least zero. Unchanged on exit.``` [in] N ``` N is INTEGER On entry, N specifies the number of columns of the matrix A. N must be at least zero. Unchanged on exit.``` [in] KL ``` KL is INTEGER The number of subdiagonals within the band of A. KL >= 0.``` [in] KU ``` KU is INTEGER The number of superdiagonals within the band of A. KU >= 0.``` [in] ALPHA ``` ALPHA is DOUBLE PRECISION On entry, ALPHA specifies the scalar alpha. Unchanged on exit.``` [in] AB ``` AB is DOUBLE PRECISION array, dimension ( LDAB, n ) Before entry, the leading m by n part of the array AB must contain the matrix of coefficients. Unchanged on exit.``` [in] LDAB ``` LDAB is INTEGER On entry, LDA specifies the first dimension of AB as declared in the calling (sub) program. LDAB must be at least max( 1, m ). Unchanged on exit.``` [in] X ``` X is DOUBLE PRECISION array, dimension ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' and at least ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. Before entry, the incremented array X must contain the vector x. Unchanged on exit.``` [in] INCX ``` INCX is INTEGER On entry, INCX specifies the increment for the elements of X. INCX must not be zero. Unchanged on exit.``` [in] BETA ``` BETA is DOUBLE PRECISION On entry, BETA specifies the scalar beta. When BETA is supplied as zero then Y need not be set on input. Unchanged on exit.``` [in,out] Y ``` Y is DOUBLE PRECISION array, dimension ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' and at least ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. Before entry with BETA non-zero, the incremented array Y must contain the vector y. On exit, Y is overwritten by the updated vector y.``` [in] INCY ``` INCY is INTEGER On entry, INCY specifies the increment for the elements of Y. INCY must not be zero. Unchanged on exit. Level 2 Blas routine.```

Definition at line 183 of file dla_gbamv.f.

185 *
186 * -- LAPACK computational routine --
187 * -- LAPACK is a software package provided by Univ. of Tennessee, --
188 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
189 *
190 * .. Scalar Arguments ..
191  DOUBLE PRECISION ALPHA, BETA
192  INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
193 * ..
194 * .. Array Arguments ..
195  DOUBLE PRECISION AB( LDAB, * ), X( * ), Y( * )
196 * ..
197 *
198 * =====================================================================
199 *
200 * .. Parameters ..
201  DOUBLE PRECISION ONE, ZERO
202  parameter( one = 1.0d+0, zero = 0.0d+0 )
203 * ..
204 * .. Local Scalars ..
205  LOGICAL SYMB_ZERO
206  DOUBLE PRECISION TEMP, SAFE1
207  INTEGER I, INFO, IY, J, JX, KX, KY, LENX, LENY, KD, KE
208 * ..
209 * .. External Subroutines ..
210  EXTERNAL xerbla, dlamch
211  DOUBLE PRECISION DLAMCH
212 * ..
213 * .. External Functions ..
214  EXTERNAL ilatrans
215  INTEGER ILATRANS
216 * ..
217 * .. Intrinsic Functions ..
218  INTRINSIC max, abs, sign
219 * ..
220 * .. Executable Statements ..
221 *
222 * Test the input parameters.
223 *
224  info = 0
225  IF ( .NOT.( ( trans.EQ.ilatrans( 'N' ) )
226  \$ .OR. ( trans.EQ.ilatrans( 'T' ) )
227  \$ .OR. ( trans.EQ.ilatrans( 'C' ) ) ) ) THEN
228  info = 1
229  ELSE IF( m.LT.0 )THEN
230  info = 2
231  ELSE IF( n.LT.0 )THEN
232  info = 3
233  ELSE IF( kl.LT.0 .OR. kl.GT.m-1 ) THEN
234  info = 4
235  ELSE IF( ku.LT.0 .OR. ku.GT.n-1 ) THEN
236  info = 5
237  ELSE IF( ldab.LT.kl+ku+1 )THEN
238  info = 6
239  ELSE IF( incx.EQ.0 )THEN
240  info = 8
241  ELSE IF( incy.EQ.0 )THEN
242  info = 11
243  END IF
244  IF( info.NE.0 )THEN
245  CALL xerbla( 'DLA_GBAMV ', info )
246  RETURN
247  END IF
248 *
249 * Quick return if possible.
250 *
251  IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
252  \$ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
253  \$ RETURN
254 *
255 * Set LENX and LENY, the lengths of the vectors x and y, and set
256 * up the start points in X and Y.
257 *
258  IF( trans.EQ.ilatrans( 'N' ) )THEN
259  lenx = n
260  leny = m
261  ELSE
262  lenx = m
263  leny = n
264  END IF
265  IF( incx.GT.0 )THEN
266  kx = 1
267  ELSE
268  kx = 1 - ( lenx - 1 )*incx
269  END IF
270  IF( incy.GT.0 )THEN
271  ky = 1
272  ELSE
273  ky = 1 - ( leny - 1 )*incy
274  END IF
275 *
276 * Set SAFE1 essentially to be the underflow threshold times the
277 * number of additions in each row.
278 *
279  safe1 = dlamch( 'Safe minimum' )
280  safe1 = (n+1)*safe1
281 *
282 * Form y := alpha*abs(A)*abs(x) + beta*abs(y).
283 *
284 * The O(M*N) SYMB_ZERO tests could be replaced by O(N) queries to
285 * the inexact flag. Still doesn't help change the iteration order
286 * to per-column.
287 *
288  kd = ku + 1
289  ke = kl + 1
290  iy = ky
291  IF ( incx.EQ.1 ) THEN
292  IF( trans.EQ.ilatrans( 'N' ) )THEN
293  DO i = 1, leny
294  IF ( beta .EQ. zero ) THEN
295  symb_zero = .true.
296  y( iy ) = 0.0d+0
297  ELSE IF ( y( iy ) .EQ. zero ) THEN
298  symb_zero = .true.
299  ELSE
300  symb_zero = .false.
301  y( iy ) = beta * abs( y( iy ) )
302  END IF
303  IF ( alpha .NE. zero ) THEN
304  DO j = max( i-kl, 1 ), min( i+ku, lenx )
305  temp = abs( ab( kd+i-j, j ) )
306  symb_zero = symb_zero .AND.
307  \$ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
308
309  y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
310  END DO
311  END IF
312
313  IF ( .NOT.symb_zero )
314  \$ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
315  iy = iy + incy
316  END DO
317  ELSE
318  DO i = 1, leny
319  IF ( beta .EQ. zero ) THEN
320  symb_zero = .true.
321  y( iy ) = 0.0d+0
322  ELSE IF ( y( iy ) .EQ. zero ) THEN
323  symb_zero = .true.
324  ELSE
325  symb_zero = .false.
326  y( iy ) = beta * abs( y( iy ) )
327  END IF
328  IF ( alpha .NE. zero ) THEN
329  DO j = max( i-kl, 1 ), min( i+ku, lenx )
330  temp = abs( ab( ke-i+j, i ) )
331  symb_zero = symb_zero .AND.
332  \$ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
333
334  y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
335  END DO
336  END IF
337
338  IF ( .NOT.symb_zero )
339  \$ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
340  iy = iy + incy
341  END DO
342  END IF
343  ELSE
344  IF( trans.EQ.ilatrans( 'N' ) )THEN
345  DO i = 1, leny
346  IF ( beta .EQ. zero ) THEN
347  symb_zero = .true.
348  y( iy ) = 0.0d+0
349  ELSE IF ( y( iy ) .EQ. zero ) THEN
350  symb_zero = .true.
351  ELSE
352  symb_zero = .false.
353  y( iy ) = beta * abs( y( iy ) )
354  END IF
355  IF ( alpha .NE. zero ) THEN
356  jx = kx
357  DO j = max( i-kl, 1 ), min( i+ku, lenx )
358  temp = abs( ab( kd+i-j, j ) )
359  symb_zero = symb_zero .AND.
360  \$ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
361
362  y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
363  jx = jx + incx
364  END DO
365  END IF
366
367  IF ( .NOT.symb_zero )
368  \$ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
369
370  iy = iy + incy
371  END DO
372  ELSE
373  DO i = 1, leny
374  IF ( beta .EQ. zero ) THEN
375  symb_zero = .true.
376  y( iy ) = 0.0d+0
377  ELSE IF ( y( iy ) .EQ. zero ) THEN
378  symb_zero = .true.
379  ELSE
380  symb_zero = .false.
381  y( iy ) = beta * abs( y( iy ) )
382  END IF
383  IF ( alpha .NE. zero ) THEN
384  jx = kx
385  DO j = max( i-kl, 1 ), min( i+ku, lenx )
386  temp = abs( ab( ke-i+j, i ) )
387  symb_zero = symb_zero .AND.
388  \$ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
389
390  y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
391  jx = jx + incx
392  END DO
393  END IF
394
395  IF ( .NOT.symb_zero )
396  \$ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
397
398  iy = iy + incy
399  END DO
400  END IF
401
402  END IF
403 *
404  RETURN
405 *
406 * End of DLA_GBAMV
407 *
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:69
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:60
integer function ilatrans(TRANS)
ILATRANS
Definition: ilatrans.f:58
Here is the call graph for this function:
Here is the caller graph for this function:
{"ft_lang_label":"__label__en","ft_lang_prob":0.7438474,"math_prob":0.9888747,"size":3368,"snap":"2022-40-2023-06","text_gpt3_token_len":975,"char_repetition_ratio":0.1296076,"word_repetition_ratio":0.15662651,"special_character_ratio":0.2767221,"punctuation_ratio":0.13513513,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9984171,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-09-29T18:03:26Z\",\"WARC-Record-ID\":\"<urn:uuid:a0a3e493-f9a9-484b-bbdb-1f48520207a0>\",\"Content-Length\":\"48669\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:48aec5ed-d7af-4f69-a79f-b67f07b86624>\",\"WARC-Concurrent-To\":\"<urn:uuid:a790a8d4-2057-48f8-a4b2-21f50fc4f84c>\",\"WARC-IP-Address\":\"160.36.131.221\",\"WARC-Target-URI\":\"https://netlib.org/lapack/explore-html/d2/d2d/group__double_g_bcomputational_ga56d796bfc96e72878e2c62d5aa1ab54b.html\",\"WARC-Payload-Digest\":\"sha1:YDILNLKBX4PEZAOV2QJRT5N3CVED5UFY\",\"WARC-Block-Digest\":\"sha1:F57HYJJAIZI365I7WFWZFA6VLXE34ZDB\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030335362.18_warc_CC-MAIN-20220929163117-20220929193117-00631.warc.gz\"}"}