Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ucla-cs!ucla-ma!euphemia!pmontgom From: pmontgom@euphemia.math.ucla.edu (Peter Montgomery) Newsgroups: comp.lang.fortran Subject: Re: matrix multiplication Keywords: parameters, pass-by-value, pass-by-reference Message-ID: <1991May5.000831.13435@math.ucla.edu> Date: 5 May 91 00:08:31 GMT References: <1991May04.170203.22222@ariel.unm.edu> Sender: news@math.ucla.edu Distribution: usa Organization: UCLA Mathematics Dept. Lines: 19 In article <1991May04.170203.22222@ariel.unm.edu> scavo@cie.uoregon.edu (Tom Scavo) writes: >I already have an inadequate routine that uses such a local array. >How would I write a *general* matrix multiplication routine that >handles tricky computations such as those in (1), and accommodates >matrices of arbitrary size? Convince your vendor to support certain Fortran 90 features. Matrix multiplication is an F90 intrinsic function. My nominee for the more important F90 feature is automatic arrays: local arrays whose dimensions can depend upon the values of parameters passed to the subroutine (and upon common variables). [Also high on my list are the bit manipulation functions and IMPLICIT NONE.] With automatic arrays you could allocate a product array of the desired size upon entry, build the product there, and copy it before exiting. -- Peter L. Montgomery pmontgom@MATH.UCLA.EDU Department of Mathematics, UCLA, Los Angeles, CA 90024-1555 If I spent as much time on my dissertation as I do reading news, I'd graduate.