MESSAGE
DATE | 2016-11-10 |
FROM | Christopher League
|
SUBJECT | Re: [Hangout-NYLXS] [Learn] merge sort parallel hw
|
From hangout-bounces-at-nylxs.com Thu Nov 10 00:43:18 2016 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: from www.mrbrklyn.com (www.mrbrklyn.com [96.57.23.82]) by mrbrklyn.com (Postfix) with ESMTP id B14C9161312; Thu, 10 Nov 2016 00:43:17 -0500 (EST) X-Original-To: hangout-at-nylxs.com Delivered-To: hangout-at-nylxs.com Received: by mrbrklyn.com (Postfix, from userid 1000) id CAFA7161311; Thu, 10 Nov 2016 00:43:14 -0500 (EST) Resent-From: Ruben Safir Resent-Date: Thu, 10 Nov 2016 00:43:14 -0500 Resent-Message-ID: <20161110054314.GA18625-at-www.mrbrklyn.com> Resent-To: hangout-at-nylxs.com X-Original-To: ruben-at-mrbrklyn.com Delivered-To: ruben-at-mrbrklyn.com Received: from liucs.net (contrapunctus.net [174.136.110.10]) by mrbrklyn.com (Postfix) with ESMTP id BBC2A160E77 for ; Thu, 10 Nov 2016 00:00:21 -0500 (EST) Received: from localhost (pool-74-101-138-109.nycmny.fios.verizon.net [74.101.138.109]) by liucs.net (Postfix) with ESMTPSA id 3B4C6E097; Thu, 10 Nov 2016 00:00:20 -0500 (EST) From: Christopher League To: Ruben Safir , learn-at-nylxs.com In-Reply-To: <9c3e75e5-b83a-229b-867c-dcc364df895d-at-mrbrklyn.com> References: <6714100a-3ebd-8129-b8bc-6d1db3ae59be-at-mrbrklyn.com> <877f8ccf4h.fsf-at-contrapunctus.net> <9c3e75e5-b83a-229b-867c-dcc364df895d-at-mrbrklyn.com> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/25.1.1 (x86_64-unknown-linux-gnu) Date: Thu, 10 Nov 2016 00:00:19 -0500 Message-ID: <874m3gc4kc.fsf-at-contrapunctus.net> MIME-Version: 1.0 X-UID: 31796 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Subject: Re: [Hangout-NYLXS] [Learn] merge sort parallel hw X-BeenThere: hangout-at-nylxs.com X-Mailman-Version: 2.1.17 Precedence: list Reply-To: NYLXS Discussions List List-Id: NYLXS Discussions List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1159762182==" Errors-To: hangout-bounces-at-nylxs.com Sender: "hangout"
--===============1159762182== Content-Type: multipart/alternative; boundary="=-=-="
--=-=-= Content-Type: text/plain
Ruben Safir writes:
> An array slice is an interesting thought.
I can't believe you 'inspired' me to spend a couple hours coding C++. But merge sort is really fun I guess, and I liked my slice idea. See code at
And here's the output for SIZE 19. Notice the nice tree structure of the log messages, based on the depth of the recursion.
~~~~ sort (0-19)[0 711 910 912 58 954 63 122 28 668 501 616 496 791 944 902 757 604 91] sort (0-9)[0 711 910 912 58 954 63 122 28] sort (0-4)[0 711 910 912] sort (0-2)[0 711] sort (0-1)[0] sort (1-2)[711] merge (0-2)[0 711] sort (2-4)[910 912] sort (2-3)[910] sort (3-4)[912] merge (2-4)[910 912] merge (0-4)[0 711 910 912] sort (4-9)[58 954 63 122 28] sort (4-6)[58 954] sort (4-5)[58] sort (5-6)[954] merge (4-6)[58 954] sort (6-9)[63 122 28] sort (6-7)[63] sort (7-9)[122 28] sort (7-8)[122] sort (8-9)[28] merge (7-9)[28 122] merge (6-9)[28 63 122] merge (4-9)[28 58 63 122 954] merge (0-9)[0 28 58 63 122 711 910 912 954] sort (9-19)[668 501 616 496 791 944 902 757 604 91] sort (9-14)[668 501 616 496 791] sort (9-11)[668 501] sort (9-10)[668] sort (10-11)[501] merge (9-11)[501 668] sort (11-14)[616 496 791] sort (11-12)[616] sort (12-14)[496 791] sort (12-13)[496] sort (13-14)[791] merge (12-14)[496 791] merge (11-14)[496 616 791] merge (9-14)[496 501 616 668 791] sort (14-19)[944 902 757 604 91] sort (14-16)[944 902] sort (14-15)[944] sort (15-16)[902] merge (14-16)[902 944] sort (16-19)[757 604 91] sort (16-17)[757] sort (17-19)[604 91] sort (17-18)[604] sort (18-19)[91] merge (17-19)[91 604] merge (16-19)[91 604 757] merge (14-19)[91 604 757 902 944] merge (9-19)[91 496 501 604 616 668 757 791 902 944] merge (0-19)[0 28 58 63 91 122 496 501 604 616 668 711 757 791 902 910 912 944 954] RESULT: (0-19)[0 28 58 63 91 122 496 501 604 616 668 711 757 791 902 910 912 944 954] ~~~~
--=-=-= MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"
Ruben Safir [1]ruben-at-mrbrklyn.com writes:
An array slice is an interesting thought.
I can't believe you `inspired' me to spend a couple hours coding C++. But merge sort is really fun I guess, and I liked my slice idea. See code at [2]https://gist.github.com/league/ce470244962d84642ae08197b4d229eb
And here's the output for SIZE 19. Notice the nice tree structure of the log messages, based on the depth of the recursion. sort (0-19)[0 711 910 912 58 954 63 122 28 668 501 616 496 791 944 902 757 604 9 1] sort (0-9)[0 711 910 912 58 954 63 122 28] sort (0-4)[0 711 910 912] sort (0-2)[0 711] sort (0-1)[0] sort (1-2)[711] merge (0-2)[0 711] sort (2-4)[910 912] sort (2-3)[910] sort (3-4)[912] merge (2-4)[910 912] merge (0-4)[0 711 910 912] sort (4-9)[58 954 63 122 28] sort (4-6)[58 954] sort (4-5)[58] sort (5-6)[954] merge (4-6)[58 954] sort (6-9)[63 122 28] sort (6-7)[63] sort (7-9)[122 28] sort (7-8)[122] sort (8-9)[28] merge (7-9)[28 122] merge (6-9)[28 63 122] merge (4-9)[28 58 63 122 954] merge (0-9)[0 28 58 63 122 711 910 912 954] sort (9-19)[668 501 616 496 791 944 902 757 604 91] sort (9-14)[668 501 616 496 791] sort (9-11)[668 501] sort (9-10)[668] sort (10-11)[501] merge (9-11)[501 668] sort (11-14)[616 496 791] sort (11-12)[616] sort (12-14)[496 791] sort (12-13)[496] sort (13-14)[791] merge (12-14)[496 791] merge (11-14)[496 616 791] merge (9-14)[496 501 616 668 791] sort (14-19)[944 902 757 604 91] sort (14-16)[944 902] sort (14-15)[944] sort (15-16)[902] merge (14-16)[902 944] sort (16-19)[757 604 91] sort (16-17)[757] sort (17-19)[604 91] sort (17-18)[604] sort (18-19)[91] merge (17-19)[91 604] merge (16-19)[91 604 757] merge (14-19)[91 604 757 902 944] merge (9-19)[91 496 501 604 616 668 757 791 902 944] merge (0-19)[0 28 58 63 91 122 496 501 604 616 668 711 757 791 902 910 912 944 9 54] RESULT: (0-19)[0 28 58 63 91 122 496 501 604 616 668 711 757 791 902 910 912 944 954]
References
1. mailto:ruben-at-mrbrklyn.com 2. https://gist.github.com/league/ce470244962d84642ae08197b4d229eb
--=-=-=--
--===============1159762182== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline
_______________________________________________ hangout mailing list hangout-at-nylxs.com http://www.nylxs.com/ --===============1159762182==--
--===============1159762182== Content-Type: multipart/alternative; boundary="=-=-="
--=-=-= Content-Type: text/plain
Ruben Safir writes:
> An array slice is an interesting thought.
I can't believe you 'inspired' me to spend a couple hours coding C++. But merge sort is really fun I guess, and I liked my slice idea. See code at
And here's the output for SIZE 19. Notice the nice tree structure of the log messages, based on the depth of the recursion.
~~~~ sort (0-19)[0 711 910 912 58 954 63 122 28 668 501 616 496 791 944 902 757 604 91] sort (0-9)[0 711 910 912 58 954 63 122 28] sort (0-4)[0 711 910 912] sort (0-2)[0 711] sort (0-1)[0] sort (1-2)[711] merge (0-2)[0 711] sort (2-4)[910 912] sort (2-3)[910] sort (3-4)[912] merge (2-4)[910 912] merge (0-4)[0 711 910 912] sort (4-9)[58 954 63 122 28] sort (4-6)[58 954] sort (4-5)[58] sort (5-6)[954] merge (4-6)[58 954] sort (6-9)[63 122 28] sort (6-7)[63] sort (7-9)[122 28] sort (7-8)[122] sort (8-9)[28] merge (7-9)[28 122] merge (6-9)[28 63 122] merge (4-9)[28 58 63 122 954] merge (0-9)[0 28 58 63 122 711 910 912 954] sort (9-19)[668 501 616 496 791 944 902 757 604 91] sort (9-14)[668 501 616 496 791] sort (9-11)[668 501] sort (9-10)[668] sort (10-11)[501] merge (9-11)[501 668] sort (11-14)[616 496 791] sort (11-12)[616] sort (12-14)[496 791] sort (12-13)[496] sort (13-14)[791] merge (12-14)[496 791] merge (11-14)[496 616 791] merge (9-14)[496 501 616 668 791] sort (14-19)[944 902 757 604 91] sort (14-16)[944 902] sort (14-15)[944] sort (15-16)[902] merge (14-16)[902 944] sort (16-19)[757 604 91] sort (16-17)[757] sort (17-19)[604 91] sort (17-18)[604] sort (18-19)[91] merge (17-19)[91 604] merge (16-19)[91 604 757] merge (14-19)[91 604 757 902 944] merge (9-19)[91 496 501 604 616 668 757 791 902 944] merge (0-19)[0 28 58 63 91 122 496 501 604 616 668 711 757 791 902 910 912 944 954] RESULT: (0-19)[0 28 58 63 91 122 496 501 604 616 668 711 757 791 902 910 912 944 954] ~~~~
--=-=-= MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"
Ruben Safir [1]ruben-at-mrbrklyn.com writes:
An array slice is an interesting thought.
I can't believe you `inspired' me to spend a couple hours coding C++. But merge sort is really fun I guess, and I liked my slice idea. See code at [2]https://gist.github.com/league/ce470244962d84642ae08197b4d229eb
And here's the output for SIZE 19. Notice the nice tree structure of the log messages, based on the depth of the recursion. sort (0-19)[0 711 910 912 58 954 63 122 28 668 501 616 496 791 944 902 757 604 9 1] sort (0-9)[0 711 910 912 58 954 63 122 28] sort (0-4)[0 711 910 912] sort (0-2)[0 711] sort (0-1)[0] sort (1-2)[711] merge (0-2)[0 711] sort (2-4)[910 912] sort (2-3)[910] sort (3-4)[912] merge (2-4)[910 912] merge (0-4)[0 711 910 912] sort (4-9)[58 954 63 122 28] sort (4-6)[58 954] sort (4-5)[58] sort (5-6)[954] merge (4-6)[58 954] sort (6-9)[63 122 28] sort (6-7)[63] sort (7-9)[122 28] sort (7-8)[122] sort (8-9)[28] merge (7-9)[28 122] merge (6-9)[28 63 122] merge (4-9)[28 58 63 122 954] merge (0-9)[0 28 58 63 122 711 910 912 954] sort (9-19)[668 501 616 496 791 944 902 757 604 91] sort (9-14)[668 501 616 496 791] sort (9-11)[668 501] sort (9-10)[668] sort (10-11)[501] merge (9-11)[501 668] sort (11-14)[616 496 791] sort (11-12)[616] sort (12-14)[496 791] sort (12-13)[496] sort (13-14)[791] merge (12-14)[496 791] merge (11-14)[496 616 791] merge (9-14)[496 501 616 668 791] sort (14-19)[944 902 757 604 91] sort (14-16)[944 902] sort (14-15)[944] sort (15-16)[902] merge (14-16)[902 944] sort (16-19)[757 604 91] sort (16-17)[757] sort (17-19)[604 91] sort (17-18)[604] sort (18-19)[91] merge (17-19)[91 604] merge (16-19)[91 604 757] merge (14-19)[91 604 757 902 944] merge (9-19)[91 496 501 604 616 668 757 791 902 944] merge (0-19)[0 28 58 63 91 122 496 501 604 616 668 711 757 791 902 910 912 944 9 54] RESULT: (0-19)[0 28 58 63 91 122 496 501 604 616 668 711 757 791 902 910 912 944 954]
References
1. mailto:ruben-at-mrbrklyn.com 2. https://gist.github.com/league/ce470244962d84642ae08197b4d229eb
--=-=-=--
--===============1159762182== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline
_______________________________________________ hangout mailing list hangout-at-nylxs.com http://www.nylxs.com/ --===============1159762182==--
|
|