MESSAGE
DATE | 2016-11-10 |
FROM | Ruben Safir
|
SUBJECT | Re: [Learn] merge sort parallel hw
|
From learn-bounces-at-nylxs.com Thu Nov 10 00:15:08 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 0859E161312; Thu, 10 Nov 2016 00:15:08 -0500 (EST) X-Original-To: learn-at-nylxs.com Delivered-To: learn-at-nylxs.com Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by mrbrklyn.com (Postfix) with ESMTP id 9AF67160E77 for ; Thu, 10 Nov 2016 00:15:05 -0500 (EST) Received: from [10.0.0.62] (www.mrbrklyn.com [96.57.23.82]) by mailbackend.panix.com (Postfix) with ESMTPSA id 4AA05138F4 for ; Thu, 10 Nov 2016 00:15:03 -0500 (EST) To: learn-at-nylxs.com References: <6714100a-3ebd-8129-b8bc-6d1db3ae59be-at-mrbrklyn.com> <877f8ccf4h.fsf-at-contrapunctus.net> <9c3e75e5-b83a-229b-867c-dcc364df895d-at-mrbrklyn.com> <874m3gc4kc.fsf-at-contrapunctus.net> From: Ruben Safir Message-ID: <302bd53c-26d9-8afa-15e5-fbd7bf39f6c6-at-panix.com> Date: Thu, 10 Nov 2016 00:15:03 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <874m3gc4kc.fsf-at-contrapunctus.net> Subject: Re: [Learn] merge sort parallel hw X-BeenThere: learn-at-nylxs.com X-Mailman-Version: 2.1.17 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: learn-bounces-at-nylxs.com Sender: "Learn"
On 11/10/2016 12:00 AM, Christopher League wrote: > 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.
That logging is great for debugging.. You saw how I started to dig into the dynamics of the broken algorithm.
The array slices themselves are a derivative of a standard fare academic experiment used to learn the ins and outs of operator overloading.
Howed you become an expert in C macro's
> > ~~~~ > 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] > ~~~~ > > > > _______________________________________________ > Learn mailing list > Learn-at-nylxs.com > http://lists.mrbrklyn.com/mailman/listinfo/learn >
-- So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998 http://www.mrbrklyn.com
DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive http://www.coinhangout.com - coins! http://www.brooklyn-living.com
Being so tracked is for FARM ANIMALS and and extermination camps, but incompatible with living as a free human being. -RI Safir 2013 _______________________________________________ Learn mailing list Learn-at-nylxs.com http://lists.mrbrklyn.com/mailman/listinfo/learn
|
|