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

◆ check1()

subroutine check1 ( real  sfac)

Definition at line 248 of file sblat1.f.

249* .. Parameters ..
250 INTEGER NOUT
251 REAL THRESH
252 parameter(nout=6, thresh=10.0e0)
253* .. Scalar Arguments ..
254 REAL 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 REAL 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 REAL SASUM, SNRM2
267 INTEGER ISAMAX
268 EXTERNAL sasum, snrm2, isamax
269* .. External Subroutines ..
270 EXTERNAL itest1, sb1nrm2, sscal, 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.3e0, -1.0e0, 0.0e0, 1.0e0, 0.3e0, 0.3e0,
277 + 0.3e0, 0.3e0, 0.3e0, 0.3e0/
278 DATA dv/0.1e0, 2.0e0, 2.0e0, 2.0e0, 2.0e0, 2.0e0,
279 + 2.0e0, 2.0e0, 0.3e0, 3.0e0, 3.0e0, 3.0e0, 3.0e0,
280 + 3.0e0, 3.0e0, 3.0e0, 0.3e0, -0.4e0, 4.0e0,
281 + 4.0e0, 4.0e0, 4.0e0, 4.0e0, 4.0e0, 0.2e0,
282 + -0.6e0, 0.3e0, 5.0e0, 5.0e0, 5.0e0, 5.0e0,
283 + 5.0e0, 0.1e0, -0.3e0, 0.5e0, -0.1e0, 6.0e0,
284 + 6.0e0, 6.0e0, 6.0e0, 0.1e0, 8.0e0, 8.0e0, 8.0e0,
285 + 8.0e0, 8.0e0, 8.0e0, 8.0e0, 0.3e0, 9.0e0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2/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* .. SNRM2 ..
323* Test scaling when some entries are tiny or huge
324 CALL sb1nrm2(n,(incx-2)*2,thresh)
325 CALL sb1nrm2(n,incx,thresh)
326* Test with hardcoded mid range entries
327 stemp(1) = dtrue1(np1)
328 CALL stest1(snrm2(n,sx,incx),stemp(1),stemp,sfac)
329 ELSE IF (icase.EQ.8) THEN
330* .. SASUM ..
331 stemp(1) = dtrue3(np1)
332 CALL stest1(sasum(n,sx,incx),stemp(1),stemp,sfac)
333 ELSE IF (icase.EQ.9) THEN
334* .. SSCAL ..
335 CALL sscal(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* .. ISAMAX ..
342 CALL itest1(isamax(n,sx,incx),itrue2(np1))
343 DO 100 i = 1, len
344 sx(i) = 42.0e0
345 100 CONTINUE
346 CALL itest1(isamax(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(isamax(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
real function sasum(n, sx, incx)
SASUM
Definition sasum.f:72
integer function isamax(n, sx, incx)
ISAMAX
Definition isamax.f:71
real(wp) function snrm2(n, x, incx)
SNRM2
Definition snrm2.f90:89
subroutine sscal(n, sa, sx, incx)
SSCAL
Definition sscal.f:79
subroutine sb1nrm2(n, incx, thresh)
Definition sblat1.f:1089
Here is the call graph for this function: