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-15 13:47:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!newscon02.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr30.news.prodigy.com.POSTED!not-for-mail From: "Pat Rogers" Newsgroups: comp.lang.ada References: Subject: Re: Parallel Merge Sort X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: NNTP-Posting-Host: 208.191.180.40 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr30.news.prodigy.com 1013809614 ST000 208.191.180.40 (Fri, 15 Feb 2002 16:46:54 EST) NNTP-Posting-Date: Fri, 15 Feb 2002 16:46:54 EST Organization: Prodigy Internet http://www.prodigy.com X-UserInfo1: FKPO@MC@OXRQRILY@BJZ\_TDFRYB@GXLN@GZ_GYO^BVNDQUBLNTC@AWZWDXZXQ[K\FFSKCVM@F_N_DOBWVWG__LG@VVOIPLIGX\\BU_B@\P\PFX\B[APHTWAHDCKJF^NHD[YJAZMCY_CWG[SX\Y]^KC\HSZRWSWKGAY_PC[BQ[BXAS\F\\@DMTLFZFUE@\VL Date: Fri, 15 Feb 2002 21:46:54 GMT Xref: archiver1.google.com comp.lang.ada:20061 Date: 2002-02-15T21:46:54+00:00 List-Id: "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.....