From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,26e047a7a0709881 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.227.67 with SMTP id ry3mr4296213pbc.8.1342259164338; Sat, 14 Jul 2012 02:46:04 -0700 (PDT) Path: l9ni11649pbj.0!nntp.google.com!news2.google.com!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: How to initialize a matrix of one column only? Date: Sat, 14 Jul 2012 10:46:02 +0100 Organization: A noiseless patient Spider Message-ID: References: <4d3d481d-a179-44f6-a81d-04a0531641ad@y3g2000pbc.googlegroups.com> <0c28fbcd-989b-4b47-ad2d-75e4cfeb425b@gg7g2000pbc.googlegroups.com> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="fe630d17d1d63a3b2430faa6417d089a"; logging-data="6022"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19fqEUrqx69sOTJmQTLnnoh/XGI9YBZoa4=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (darwin) Cancel-Lock: sha1:Ng4z5bbifCfhfUnEnF+HSE0QERE= sha1:n9MeFcYmVkCT25qtilAhcJ+b7kY= Content-Type: text/plain Date: 2012-07-14T10:46:02+01:00 List-Id: Jerry writes: > On Thursday, July 12, 2012 1:50:42 AM UTC-7, Simon Wright wrote: >> Jerry; writes: >> >> > OS X ships with both Fortran and C versions of BLAS and LAPACK, so I >> > would suppose the C version is common. Wouldn't using the C versions >> > solve this problem? As I recall, both Ada and C are row major. >> >> I just rebuilt my gnat-math-extn unit tests with libclapack, libcblas >> and they run successfully without any change to my bindings. So I think >> the C versions must retain the same column-major ordering as the Fortran >> ones. > > Oh well. Thanks for checking into that. Still, it seems odd. It must > make life hard for C coders who link to these libs. I would have > thought that (compatible ordering) would be a big reason for rewriting > in C. http://www.netlib.org/clapack/readme says that the CLAPACK bindings were produced by f2c (and human post-processing) from the LAPACK Fortran, and that you are stuck with Fortran conventions. However, CBLAS appears to be a proper interface; each cblas_* function has a leading 'ordering' parameter. >> Oh. No surprise there, because /usr/lib/libblas.dylib and >> /usr/lib/libcblas.dylib are symlinks to the same file! > > Yes. I noticed that some time back. (OS X, right?) But I think these > libs contain both Fortran and C versions. Very odd. 'nm liblapack.dylib' results in, for example, 0000000000017591 T _cgeev 0000000000017591 T _cgeev_ where the version with the trailing underscore is what gfortran would produce natively. The other would work for languages that can't generate symbols with trailing underscores. But they both represent the same address! They also appear in upper case (again, same address). libblas.dylib contains the cblas_* symbols.