SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ ccombamax()

subroutine ccombamax ( complex, dimension( 2 )  v1,
complex, dimension( 2 )  v2 
)

Definition at line 212 of file pctreecomb.f.

213*
214* -- ScaLAPACK tools routine (version 1.7) --
215* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
216* and University of California, Berkeley.
217* May 1, 1997
218*
219* .. Array Arguments ..
220 COMPLEX V1( 2 ), V2( 2 )
221* ..
222*
223* Purpose
224* =======
225*
226* CCOMBAMAX finds the element having max. absolute value as well
227* as its corresponding globl index.
228*
229* Arguments
230* =========
231*
232* V1 (local input/local output) COMPLEX array of
233* dimension 2. The first maximum absolute value element and
234* its global index. V1(1) = AMAX, V1(2) = INDX.
235*
236* V2 (local input) COMPLEX array of dimension 2.
237* The second maximum absolute value element and its global
238* index. V2(1) = AMAX, V2(2) = INDX.
239*
240* =====================================================================
241*
242* .. Intrinsic Functions ..
243 INTRINSIC abs, real, aimag
244* ..
245* .. Statement Functions ..
246 COMPLEX ZDUM
247 REAL CABS1
248 cabs1(zdum) = abs(real(zdum)) + abs(aimag(zdum))
249* ..
250* .. Executable Statements ..
251*
252 IF( cabs1( v1( 1 ) ).LT.cabs1( v2( 1 ) ) ) THEN
253 v1( 1 ) = v2( 1 )
254 v1( 2 ) = v2( 2 )
255 END IF
256*
257 RETURN
258*
259* End of CCOMBAMAX
260*