comp.lang.ada
 help / color / mirror / Atom feed
From: Austin Obyrne <austin.obyrne@hotmail.com>
Subject: “Parallel Sort” Program in Essence.
Date: Wed, 4 Jul 2012 00:48:35 -0700 (PDT)
Date: 2012-07-04T00:48:35-07:00	[thread overview]
Message-ID: <94e1d380-5f1f-44e5-b090-f66d0d414589@googlegroups.com> (raw)


SUBTYPE Index_2 IS Integer RANGE 0 .. 1000009;
TYPE I_CoefficientsNumArray IS ARRAY(Index_2) OF Integer;
I_Num : I_CoefficientsNumArray := (others =>0); -- initialises array
-- places the numbers for sorting  in an array.

Data Collection.

Q := NextNum(I);
I_NUM(Q):= I_NUM(Q)+1;

Sorting.

FOR I IN 0  .. 1000000 LOOP  -- Sort Program proper starts here. 
  IF I_Num(I) /= 0 THEN
    Counter:= I_Num(I);
      FOR J in 1 .. Counter LOOP
        Ada.Integer_Text_IO.Put(File => Outdata, Item =>  (I));--
        Ada.Text_IO.New_Line;
        Check := Check +1;
        Sorted(Check):= I;
      END LOOP;
  END IF;
END LOOP;

Austin O'Byrne.

- adacrypt



                 reply	other threads:[~2012-07-04  7:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox