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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,690ce1f62160d05a X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,690ce1f62160d05a X-Google-Attributes: gid103376,public X-Google-Thread: 1094ba,690ce1f62160d05a X-Google-Attributes: gid1094ba,public X-Google-Thread: 109fba,690ce1f62160d05a X-Google-Attributes: gid109fba,public From: "E. Robert Tisdale" Subject: Re: Interfacing to Numerical Programming libraries (was: How to Design..) Date: 2000/08/12 Message-ID: <3994AF88.A84A6E29@netwood.net>#1/1 X-Deja-AN: 657390721 Content-Transfer-Encoding: 7bit References: <39921178.819F6DCB@netwood.net> <399386EF.4F2AA3E6@netwood.net> <39940E84.B3115EFC@maths.unine.ch> <3994158E.150D1FDA@netwood.net> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsabuse@supernews.com Organization: Posted via Supernews, http://www.supernews.com MIME-Version: 1.0 Newsgroups: comp.lang.c++,comp.lang.c,comp.lang.fortran,comp.lang.ada Date: 2000-08-12T00:00:00+00:00 List-Id: Larry Kilgallen wrote: > In article <3994158E.150D1FDA@netwood.net>, > "E. Robert Tisdale" writes: > > > These thin interfaces to another language binding are called adapters. > > Here in comp.lang.ada they are called thin bindings. Bindings to what? The BLAS library API does not specify any language for implementation. It might be implemented in Ada 95, in which case, your "thin binding" would be unnecessary overhead. > > You have implemented a very nice adapter but I'm not sure why. > > As indicated in _many_ previous threads, > some people like thin bindings and some people like thick bindings. > Some projects are best done with thin bindings and > some projects are best done with thick bindings. That's not the issue here. Ada 95 library developers are not obliged to reproduce the "compromises" incorporated into the design of the Fortran 77 language binding. Ada 95 provides them with all of the language features required to design a really good language binding for the BLAS library and they should take advantage of them. > > I think that Ada numerical application programmers should be able to write > > > > C := alpha*product(A, B) + beta*C; > > > > and let the compiler resolve the expression to a DGEMM procedure call. > > More precisely, the thick binding (including even some code) > would take care of calling your library. > Certainly that is a fine strategy to follow, just not the one cited. DGEMM is an Ada 95 procedure here -- not a Fortran 77 subroutine. Your notion of a "thick binding" doesn't appear to apply. But I agree. There is no reason why an Ada 95 package shouldn't be able to {\em fuse } the five operations in the above expression into a single procedure call.