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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,86cefd3e84a541f2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-19 11:25:13 PST Message-ID: <3C71EEF8.FD25035D@greenlime.com> Date: Tue, 19 Feb 2002 14:21:44 +0800 From: Adrian Hoe Organization: Lexical Integration (M) Sdn Bhd X-Mailer: Mozilla 4.7C-CCK-MCD Caldera Systems OpenLinux [en] (X11; I; Linux 2.2.10 i586) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Parallel Merge Sort References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: mlk-198-252.tm.net.my X-Original-NNTP-Posting-Host: mlk-198-252.tm.net.my X-Trace: news.tm.net.my 1014096807 mlk-198-252.tm.net.my (19 Feb 2002 13:33:27 +0800) Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!newsfeed.berkeley.edu!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!ihug.co.nz!hub1.nntpserver.com!news-out.spamkiller.net!propagator-maxim!pull.newsgroups.com!news1.tm.net.my Xref: archiver1.google.com comp.lang.ada:20130 Date: 2002-02-19T14:21:44+08:00 List-Id: Pat Rogers wrote: > > "R. Stegers" wrote in message > news:a4juvf$67t$1@star.cs.vu.nl... > > I want to create a generic package which can sort an array with any type of > > elements. The index is of the integer type. It is also required that the > > merge sort is performed in parallel. I'm a C/C++-programmer with very > > limited Ada experience. I think I got the idea of tasks/rendevous right. I > > run into some problems here: > > > > - How can I dynamicaly allocate a temporary array (for which i don't know > > the size in advance?) It seems inpossible to me. > > - How to create tasks from within a task: The subTask1 en subTask2 > > declarations generate errors: "Task type cannot be used as type mark within > > its own body" > > > > I hope someone can give me a hint. The code is below. > > Hint: there is a well-known book on concurrent programming in Ada (:-) that > shows how to do this..... Alan Burns and Andy Welling's Concurrency in Ada, 1995, Cambridge University Press. This is an excellent book for concurrent programming in Ada. -- -- Adrian Hoe -- http://greenlime.com/users/adrian.hoe