LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ check1()

subroutine check1 ( double precision  sfac)

Definition at line 248 of file dblat1.f.

249* .. Parameters ..
250 DOUBLE PRECISION THRESH
251 INTEGER NOUT
252 parameter(nout=6, thresh=10.0d0)
253* .. Scalar Arguments ..
254 DOUBLE PRECISION SFAC
255* .. Scalars in Common ..
256 INTEGER ICASE, INCX, INCY, N
257 LOGICAL PASS
258* .. Local Scalars ..
259 INTEGER I, IX, LEN, NP1
260* .. Local Arrays ..
261 DOUBLE PRECISION DTRUE1(5), DTRUE3(5), DTRUE5(8,5,2), DV(8,5,2),
262 + DVR(8), SA(10), STEMP(1), STRUE(8), SX(8),
263 + SXR(15)
264 INTEGER ITRUE2(5), ITRUEC(5)
265* .. External Functions ..
266 DOUBLE PRECISION DASUM, DNRM2
267 INTEGER IDAMAX
268 EXTERNAL dasum, dnrm2, idamax
269* .. External Subroutines ..
270 EXTERNAL itest1, db1nrm2, dscal, stest, stest1
271* .. Intrinsic Functions ..
272 INTRINSIC max
273* .. Common blocks ..
274 COMMON /combla/icase, n, incx, incy, pass
275* .. Data statements ..
276 DATA sa/0.3d0, -1.0d0, 0.0d0, 1.0d0, 0.3d0, 0.3d0,
277 + 0.3d0, 0.3d0, 0.3d0, 0.3d0/
278 DATA dv/0.1d0, 2.0d0, 2.0d0, 2.0d0, 2.0d0, 2.0d0,
279 + 2.0d0, 2.0d0, 0.3d0, 3.0d0, 3.0d0, 3.0d0, 3.0d0,
280 + 3.0d0, 3.0d0, 3.0d0, 0.3d0, -0.4d0, 4.0d0,
281 + 4.0d0, 4.0d0, 4.0d0, 4.0d0, 4.0d0, 0.2d0,
282 + -0.6d0, 0.3d0, 5.0d0, 5.0d0, 5.0d0, 5.0d0,
283 + 5.0d0, 0.1d0, -0.3d0, 0.5d0, -0.1d0, 6.0d0,
284 + 6.0d0, 6.0d0, 6.0d0, 0.1d0, 8.0d0, 8.0d0, 8.0d0,
285 + 8.0d0,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 7.0d0,
308 + -0.03d0, 3.0d0/
309 DATA itrue2/0, 1, 2, 2, 3/
310 DATA itruec/0, 1, 1, 1, 1/
311* .. Executable Statements ..
312 DO 80 incx = 1, 2
313 DO 60 np1 = 1, 5
314 n = np1 - 1
315 len = 2*max(n,1)
316* .. Set vector arguments ..
317 DO 20 i = 1, len
318 sx(i) = dv(i,np1,incx)
319 20 CONTINUE
320*
321 IF (icase.EQ.7) THEN
322* .. DNRM2 ..
323* Test scaling when some entries are tiny or huge
324 CALL db1nrm2(n,(incx-2)*2,thresh)
325 CALL db1nrm2(n,incx,thresh)
326* Test with hardcoded mid range entries
327 stemp(1) = dtrue1(np1)
328 CALL stest1(dnrm2(n,sx,incx),stemp(1),stemp,sfac)
329 ELSE IF (icase.EQ.8) THEN
330* .. DASUM ..
331 stemp(1) = dtrue3(np1)
332 CALL stest1(dasum(n,sx,incx),stemp(1),stemp,sfac)
333 ELSE IF (icase.EQ.9) THEN
334* .. DSCAL ..
335 CALL dscal(n,sa((incx-1)*5+np1),sx,incx)
336 DO 40 i = 1, len
337 strue(i) = dtrue5(i,np1,incx)
338 40 CONTINUE
339 CALL stest(len,sx,strue,strue,sfac)
340 ELSE IF (icase.EQ.10) THEN
341* .. IDAMAX ..
342 CALL itest1(idamax(n,sx,incx),itrue2(np1))
343 DO 100 i = 1, len
344 sx(i) = 42.0d0
345 100 CONTINUE
346 CALL itest1(idamax(n,sx,incx),itruec(np1))
347 ELSE
348 WRITE (nout,*) ' Shouldn''t be here in CHECK1'
349 stop
350 END IF
351 60 CONTINUE
352 IF (icase.EQ.10) THEN
353 n = 8
354 ix = 1
355 DO 120 i = 1, n
356 sxr(ix) = dvr(i)
357 ix = ix + incx
358 120 CONTINUE
359 CALL itest1(idamax(n,sxr,incx),3)
360 END IF
361 80 CONTINUE
362 RETURN
363*
364* End of CHECK1
365*
subroutine stest(len, scomp, strue, ssize, sfac)
Definition cblat1.f:614
subroutine stest1(scomp1, strue1, ssize, sfac)
Definition cblat1.f:673
subroutine itest1(icomp, itrue)
Definition cblat1.f:748
subroutine db1nrm2(n, incx, thresh)
Definition dblat1.f:1138
double precision function dasum(n, dx, incx)
DASUM
Definition dasum.f:71
integer function idamax(n, dx, incx)
IDAMAX
Definition idamax.f:71
real(wp) function dnrm2(n, x, incx)
DNRM2
Definition dnrm2.f90:89
subroutine dscal(n, da, dx, incx)
DSCAL
Definition dscal.f:79
Here is the call graph for this function: