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,c370342fe303517b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!out04b.usenetserver.com!news.usenetserver.com!in04.usenetserver.com!news.usenetserver.com!uns-out.usenetserver.com!news.usenetserver.com!pc02.usenetserver.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: C Interface example References: <1170516037.435847.326440@p10g2000cwp.googlegroups.com> <45c4cae7$1_4@news.bluewin.ch> <1170526166.831811.237660@h3g2000cwc.googlegroups.com> From: Stephen Leake Date: Sun, 04 Feb 2007 09:37:04 -0500 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:Y2KAMtWjAF287iebVC4cWtWm0xU= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 9c09c45c5ef96759e00d422075 Xref: g2news2.google.com comp.lang.ada:8912 Date: 2007-02-04T09:37:04-05:00 List-Id: artifact.one@googlemail.com writes: > Yes this was quite a contrived example because my real version of > vec_add() actually calls Altivec, SSE, SSE2 or pure C code depending > on detected hardware, which stretches on to about 300 lines. Ok. It does make sense to interface that to Ada, rather than just throwing it out. > I didn't think anybody would appreciate reading all that just for an > example on interfacing... True, but it would have helped to say "The real code does ..., so I don't want to rewrite it in Ada". You should still strive to make the Ada code use operators, and constrained arrays whenever possible. -- -- Stephe