SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from openSUSE Leap 42 blas-man-3.5.0-9.1.noarch.rpm

cgemm.f

Section: LAPACK (3)
Updated: Fri Nov 4 2016
Index 

NAME

cgemm.f -  

SYNOPSIS


 

Functions/Subroutines


subroutine CGEMM (TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
CGEMM  

Function/Subroutine Documentation

 

subroutine CGEMM (character TRANSA, character TRANSB, integer M, integer N, integer K, complex ALPHA, complex, dimension(lda,*) A, integer LDA, complex, dimension(ldb,*) B, integer LDB, complex BETA, complex, dimension(ldc,*) C, integer LDC)

CGEMM

Purpose:

 CGEMM  performs one of the matrix-matrix operations    C := alpha*op( A )*op( B ) + beta*C, where  op( X ) is one of    op( X ) = X   or   op( X ) = X**T   or   op( X ) = X**H, alpha and beta are scalars, and A, B and C are matrices, with op( A ) an m by k matrix,  op( B )  a  k by n matrix and  C an m by n matrix.


 

Parameters:

TRANSA

          TRANSA is CHARACTER*1           On entry, TRANSA specifies the form of op( A ) to be used in           the matrix multiplication as follows:              TRANSA = 'N' or 'n',  op( A ) = A.              TRANSA = 'T' or 't',  op( A ) = A**T.              TRANSA = 'C' or 'c',  op( A ) = A**H.


TRANSB

          TRANSB is CHARACTER*1           On entry, TRANSB specifies the form of op( B ) to be used in           the matrix multiplication as follows:              TRANSB = 'N' or 'n',  op( B ) = B.              TRANSB = 'T' or 't',  op( B ) = B**T.              TRANSB = 'C' or 'c',  op( B ) = B**H.


M

          M is INTEGER           On entry,  M  specifies  the number  of rows  of the  matrix           op( A )  and of the  matrix  C.  M  must  be at least  zero.


N

          N is INTEGER           On entry,  N  specifies the number  of columns of the matrix           op( B ) and the number of columns of the matrix C. N must be           at least zero.


K

          K is INTEGER           On entry,  K  specifies  the number of columns of the matrix           op( A ) and the number of rows of the matrix op( B ). K must           be at least  zero.


ALPHA

          ALPHA is COMPLEX           On entry, ALPHA specifies the scalar alpha.


A

          A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is           k  when  TRANSA = 'N' or 'n',  and is  m  otherwise.           Before entry with  TRANSA = 'N' or 'n',  the leading  m by k           part of the array  A  must contain the matrix  A,  otherwise           the leading  k by m  part of the array  A  must contain  the           matrix A.


LDA

          LDA is INTEGER           On entry, LDA specifies the first dimension of A as declared           in the calling (sub) program. When  TRANSA = 'N' or 'n' then           LDA must be at least  max( 1, m ), otherwise  LDA must be at           least  max( 1, k ).


B

          B is COMPLEX array of DIMENSION ( LDB, kb ), where kb is           n  when  TRANSB = 'N' or 'n',  and is  k  otherwise.           Before entry with  TRANSB = 'N' or 'n',  the leading  k by n           part of the array  B  must contain the matrix  B,  otherwise           the leading  n by k  part of the array  B  must contain  the           matrix B.


LDB

          LDB is INTEGER           On entry, LDB specifies the first dimension of B as declared           in the calling (sub) program. When  TRANSB = 'N' or 'n' then           LDB must be at least  max( 1, k ), otherwise  LDB must be at           least  max( 1, n ).


BETA

          BETA is COMPLEX           On entry,  BETA  specifies the scalar  beta.  When  BETA  is           supplied as zero then C need not be set on input.


C

          C is COMPLEX array of DIMENSION ( LDC, n ).           Before entry, the leading  m by n  part of the array  C must           contain the matrix  C,  except when  beta  is zero, in which           case C need not be set on entry.           On exit, the array  C  is overwritten by the  m by n  matrix           ( alpha*op( A )*op( B ) + beta*C ).


LDC

          LDC is INTEGER           On entry, LDC specifies the first dimension of C as declared           in  the  calling  (sub)  program.   LDC  must  be  at  least           max( 1, m ).


 

Author:

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Date:

November 2011

Further Details:

  Level 3 Blas routine.  -- Written on 8-February-1989.     Jack Dongarra, Argonne National Laboratory.     Iain Duff, AERE Harwell.     Jeremy Du Croz, Numerical Algorithms Group Ltd.     Sven Hammarling, Numerical Algorithms Group Ltd.


 

Definition at line 189 of file cgemm.f.

189 *190 *  -- Reference BLAS level3 routine (version 3.4.0) --191 *  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --192 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--193 *     November 2011194 *195 *     .. Scalar Arguments ..196       COMPLEX alpha,beta197       INTEGER k,lda,ldb,ldc,m,n198       CHARACTER transa,transb199 *     ..200 *     .. Array Arguments ..201       COMPLEX a(lda,*),b(ldb,*),c(ldc,*)202 *     ..203 *204 *  =====================================================================205 *206 *     .. External Functions ..207       LOGICAL lsame208       EXTERNAL lsame209 *     ..210 *     .. External Subroutines ..211       EXTERNAL xerbla212 *     ..213 *     .. Intrinsic Functions ..214       INTRINSIC conjg,max215 *     ..216 *     .. Local Scalars ..217       COMPLEX temp218       INTEGER i,info,j,l,ncola,nrowa,nrowb219       LOGICAL conja,conjb,nota,notb220 *     ..221 *     .. Parameters ..222       COMPLEX one223       parameter(one= (1.0e+0,0.0e+0))224       COMPLEX zero225       parameter(zero= (0.0e+0,0.0e+0))226 *     ..227 *228 *     Set  NOTA  and  NOTB  as  true if  A  and  B  respectively are not229 *     conjugated or transposed, set  CONJA and CONJB  as true if  A  and230 *     B  respectively are to be  transposed but  not conjugated  and set231 *     NROWA, NCOLA and  NROWB  as the number of rows and  columns  of  A232 *     and the number of rows of  B  respectively.233 *234       nota = lsame(transa,'N')235       notb = lsame(transb,'N')236       conja = lsame(transa,'C')237       conjb = lsame(transb,'C')238       IF (nota) THEN239           nrowa = m240           ncola = k241       ELSE242           nrowa = k243           ncola = m244       END IF245       IF (notb) THEN246           nrowb = k247       ELSE248           nrowb = n249       END IF250 *251 *     Test the input parameters.252 *253       info = 0254       IF ((.NOT.nota) .AND. (.NOT.conja) .AND.255      +    (.NOT.lsame(transa,'T'))) THEN256           info = 1257       ELSE IF ((.NOT.notb) .AND. (.NOT.conjb) .AND.258      +         (.NOT.lsame(transb,'T'))) THEN259           info = 2260       ELSE IF (m.LT.0) THEN261           info = 3262       ELSE IF (n.LT.0) THEN263           info = 4264       ELSE IF (k.LT.0) THEN265           info = 5266       ELSE IF (lda.LT.max(1,nrowa)) THEN267           info = 8268       ELSE IF (ldb.LT.max(1,nrowb)) THEN269           info = 10270       ELSE IF (ldc.LT.max(1,m)) THEN271           info = 13272       END IF273       IF (info.NE.0) THEN274           CALL xerbla('CGEMM ',info)275           RETURN276       END IF277 *278 *     Quick return if possible.279 *280       IF ((m.EQ.0) .OR. (n.EQ.0) .OR.281      +    (((alpha.EQ.zero).OR. (k.EQ.0)).AND. (beta.EQ.one))) RETURN282 *283 *     And when  alpha.eq.zero.284 *285       IF (alpha.EQ.zero) THEN286           IF (beta.EQ.zero) THEN287               DO 20 j = 1,n288                   DO 10 i = 1,m289                       c(i,j) = zero290    10             CONTINUE291    20         CONTINUE292           ELSE293               DO 40 j = 1,n294                   DO 30 i = 1,m295                       c(i,j) = beta*c(i,j)296    30             CONTINUE297    40         CONTINUE298           END IF299           RETURN300       END IF301 *302 *     Start the operations.303 *304       IF (notb) THEN305           IF (nota) THEN306 *307 *           Form  C := alpha*A*B + beta*C.308 *309               DO 90 j = 1,n310                   IF (beta.EQ.zero) THEN311                       DO 50 i = 1,m312                           c(i,j) = zero313    50                 CONTINUE314                   ELSE IF (beta.NE.one) THEN315                       DO 60 i = 1,m316                           c(i,j) = beta*c(i,j)317    60                 CONTINUE318                   END IF319                   DO 80 l = 1,k320                       IF (b(l,j).NE.zero) THEN321                           temp = alpha*b(l,j)322                           DO 70 i = 1,m323                               c(i,j) = c(i,j) + temp*a(i,l)324    70                     CONTINUE325                       END IF326    80             CONTINUE327    90         CONTINUE328           ELSE IF (conja) THEN329 *330 *           Form  C := alpha*A**H*B + beta*C.331 *332               DO 120 j = 1,n333                   DO 110 i = 1,m334                       temp = zero335                       DO 100 l = 1,k336                           temp = temp + conjg(a(l,i))*b(l,j)337   100                 CONTINUE338                       IF (beta.EQ.zero) THEN339                           c(i,j) = alpha*temp340                       ELSE341                           c(i,j) = alpha*temp + beta*c(i,j)342                       END IF343   110             CONTINUE344   120         CONTINUE345           ELSE346 *347 *           Form  C := alpha*A**T*B + beta*C348 *349               DO 150 j = 1,n350                   DO 140 i = 1,m351                       temp = zero352                       DO 130 l = 1,k353                           temp = temp + a(l,i)*b(l,j)354   130                 CONTINUE355                       IF (beta.EQ.zero) THEN356                           c(i,j) = alpha*temp357                       ELSE358                           c(i,j) = alpha*temp + beta*c(i,j)359                       END IF360   140             CONTINUE361   150         CONTINUE362           END IF363       ELSE IF (nota) THEN364           IF (conjb) THEN365 *366 *           Form  C := alpha*A*B**H + beta*C.367 *368               DO 200 j = 1,n369                   IF (beta.EQ.zero) THEN370                       DO 160 i = 1,m371                           c(i,j) = zero372   160                 CONTINUE373                   ELSE IF (beta.NE.one) THEN374                       DO 170 i = 1,m375                           c(i,j) = beta*c(i,j)376   170                 CONTINUE377                   END IF378                   DO 190 l = 1,k379                       IF (b(j,l).NE.zero) THEN380                           temp = alpha*conjg(b(j,l))381                           DO 180 i = 1,m382                               c(i,j) = c(i,j) + temp*a(i,l)383   180                     CONTINUE384                       END IF385   190             CONTINUE386   200         CONTINUE387           ELSE388 *389 *           Form  C := alpha*A*B**T          + beta*C390 *391               DO 250 j = 1,n392                   IF (beta.EQ.zero) THEN393                       DO 210 i = 1,m394                           c(i,j) = zero395   210                 CONTINUE396                   ELSE IF (beta.NE.one) THEN397                       DO 220 i = 1,m398                           c(i,j) = beta*c(i,j)399   220                 CONTINUE400                   END IF401                   DO 240 l = 1,k402                       IF (b(j,l).NE.zero) THEN403                           temp = alpha*b(j,l)404                           DO 230 i = 1,m405                               c(i,j) = c(i,j) + temp*a(i,l)406   230                     CONTINUE407                       END IF408   240             CONTINUE409   250         CONTINUE410           END IF411       ELSE IF (conja) THEN412           IF (conjb) THEN413 *414 *           Form  C := alpha*A**H*B**H + beta*C.415 *416               DO 280 j = 1,n417                   DO 270 i = 1,m418                       temp = zero419                       DO 260 l = 1,k420                           temp = temp + conjg(a(l,i))*conjg(b(j,l))421   260                 CONTINUE422                       IF (beta.EQ.zero) THEN423                           c(i,j) = alpha*temp424                       ELSE425                           c(i,j) = alpha*temp + beta*c(i,j)426                       END IF427   270             CONTINUE428   280         CONTINUE429           ELSE430 *431 *           Form  C := alpha*A**H*B**T + beta*C432 *433               DO 310 j = 1,n434                   DO 300 i = 1,m435                       temp = zero436                       DO 290 l = 1,k437                           temp = temp + conjg(a(l,i))*b(j,l)438   290                 CONTINUE439                       IF (beta.EQ.zero) THEN440                           c(i,j) = alpha*temp441                       ELSE442                           c(i,j) = alpha*temp + beta*c(i,j)443                       END IF444   300             CONTINUE445   310         CONTINUE446           END IF447       ELSE448           IF (conjb) THEN449 *450 *           Form  C := alpha*A**T*B**H + beta*C451 *452               DO 340 j = 1,n453                   DO 330 i = 1,m454                       temp = zero455                       DO 320 l = 1,k456                           temp = temp + a(l,i)*conjg(b(j,l))457   320                 CONTINUE458                       IF (beta.EQ.zero) THEN459                           c(i,j) = alpha*temp460                       ELSE461                           c(i,j) = alpha*temp + beta*c(i,j)462                       END IF463   330             CONTINUE464   340         CONTINUE465           ELSE466 *467 *           Form  C := alpha*A**T*B**T + beta*C468 *469               DO 370 j = 1,n470                   DO 360 i = 1,m471                       temp = zero472                       DO 350 l = 1,k473                           temp = temp + a(l,i)*b(j,l)474   350                 CONTINUE475                       IF (beta.EQ.zero) THEN476                           c(i,j) = alpha*temp477                       ELSE478                           c(i,j) = alpha*temp + beta*c(i,j)479                       END IF480   360             CONTINUE481   370         CONTINUE482           END IF483       END IF484 *485       RETURN486 *487 *     End of CGEMM .488 *
 

Author

Generated automatically by Doxygen for LAPACK from the source code.


 

Index

NAME
SYNOPSIS
Functions/Subroutines
Function/Subroutine Documentation
subroutine CGEMM (character TRANSA, character TRANSB, integer M, integer N, integer K, complex ALPHA, complex, dimension(lda,*) A, integer LDA, complex, dimension(ldb,*) B, integer LDB, complex BETA, complex, dimension(ldc,*) C, integer LDC)
Author

This document was created byman2html,using the manual pages.