Prev: Depth of Binary Tree
Next: disassembly
From: aminer on 11 Mar 2010 15:34 Hello, Description: Description: Parallel algorithm to handle unbounded queue FIFO that use a parallel hash table (look at inthashlist inside the zip) with O(1) (best case) and O(n)(worst case) access. It's for educational purpose. Language: FPC Pascal v2.2.0+ / Delphi 5+: http://www.freepascal.org/ Operating Systems: Win , Linux and Mac (x86). For ParallelQueue benchmarks on an Intel Core 2 Quad Q6600 look at: http://pages.videotron.com/aminer/parallelqueue/parallelqueueh.htm You can download ParallelQueueh at: http://pages.videotron.com/aminer/ Note: I have modified the Hashlist (by Barry Kelly, search for it in goolge) , now the Add(), Has(), Find() etc.does use integer as a key instead of string argument. And also i have modified the FindNode() method(look inside inthashlist.pas) to support integer argument, now hashlist's FindNode() look like this : ----------------------------------------------- [...] if s < ppn^^.Str then r:=-1 else if s > ppn^^.Str then r:=1 else r:=0; { left, then right, then match } if r < 0 then ppn := @ppn^^.Left else if r > 0 then ppn := @ppn^^.Right else Break; ---------------------------------------------------- And i have added the parallel part in inthashlist... etc. Sincereley Amine Moulay Ramdane.
From: aminer on 11 Mar 2010 15:43 Hello again, ParallelQueueh is an unbounded FIFO (for educational purpose), But ParallelQueue and lockfree_mpmc look in: http://pages.videotron.com/aminer/parallelqueue/parallelqueue.htm are very fast and very good lockfree bounded queue algorithms. Note also that the Freepascal memory manager does scale linearly when using threads.. But the Delphi memory manager does not scale linearly, so,. i have used the TBB memory manager in delphi (look into cmem.pas inside the ParallelHashList.zip). Sincerely, Amine Moulay Ramdane. On Mar 11, 3:34 pm, aminer <ami...(a)videotron.ca> wrote: > Hello, > > Description: > > Description: Parallel algorithm to handle unbounded queue FIFO that > use a parallel hash table (look at inthashlist inside the zip) with > O(1) (best case) and O(n)(worst case) access. It's for educational > purpose. > > Language: FPC Pascal v2.2.0+ / Delphi 5+:http://www.freepascal.org/ > > Operating Systems: Win , Linux and Mac (x86). > > For ParallelQueue benchmarks on an Intel Core 2 Quad Q6600 look at: > > http://pages.videotron.com/aminer/parallelqueue/parallelqueueh.htm > > You can download ParallelQueueh at:http://pages.videotron.com/aminer/ > > Note: > > I have modified the Hashlist (by Barry Kelly, search for it in > goolge) , now the Add(), Has(), Find() etc.does use integer > as a key instead of string argument. And also i have modified > the FindNode() method(look inside inthashlist.pas) to support > integer argument, now hashlist's FindNode() look like this : > > ----------------------------------------------- > [...] > > if s < ppn^^.Str then r:=-1 > else if s > ppn^^.Str then r:=1 > else r:=0; > { left, then right, then match } > > if r < 0 then > ppn := @ppn^^.Left > else if r > 0 then > ppn := @ppn^^.Right > else > Break; > ---------------------------------------------------- > > And i have added the parallel part in inthashlist... > > etc. > > Sincereley > Amine Moulay Ramdane.
|
Pages: 1 Prev: Depth of Binary Tree Next: disassembly |