<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Parallel Sort Library 2.0  in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Parallel-Sort-Library-2-0/m-p/828639#M1433</link>
    <description>&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Parallel Sort Library 2.0 &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Author: Amine Moulay Ramdane &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Description:&lt;/P&gt;&lt;P&gt;Parallel Sort Library that supports Parallel Quicksort, Parallel HeapSort &lt;BR /&gt;and Parallel MergeSort on Multicores systems.&lt;/P&gt;&lt;P&gt;Parallel Sort Library 2.0 uses my Thread Pool Engine and quicksort &lt;BR /&gt;many array parts - of your array - in parallel using Quicksort or HeapSort &lt;BR /&gt;or MergeSort and after that it finally merge them - with the merge() procedure - &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Note: Parallel Quicksort gave me ~3x speed on four cores.&lt;/P&gt;&lt;P&gt;And please look at test.pas inside the zip file, it's a parallel quicksort example &lt;BR /&gt;- compile and execute it... &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You can download Parallel Sort Library from:&lt;/P&gt;&lt;P&gt;&lt;A href="http://pages.videotron.com/aminer/"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Parallel Sort Library is very easy to use , and &lt;BR /&gt;here is an example in Object Pascal:&lt;/P&gt;&lt;P&gt;----------------------------------------&lt;/P&gt;&lt;P&gt;program test;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;uses &lt;BR /&gt;{$IFDEF Delphi}cmem,{$ENDIF}&lt;BR /&gt;{$IFDEF DELPHI2005+}cmem,{$ENDIF}&lt;BR /&gt;ParallelSort,sysutils,classes;&lt;/P&gt;&lt;P&gt;type&lt;/P&gt;&lt;P&gt;TStudent = Class&lt;BR /&gt;public&lt;BR /&gt;Name: string;&lt;BR /&gt; end;&lt;/P&gt;&lt;P&gt;var tab:Ttabpointer;&lt;BR /&gt; myobj:TParallelSort;&lt;BR /&gt; student:TStudent;&lt;BR /&gt; i,j:integer;&lt;BR /&gt; c_ok:boolean;&lt;BR /&gt; &lt;BR /&gt;function comp(Item1, Item2: Pointer): Integer;&lt;/P&gt;&lt;P&gt;begin&lt;BR /&gt;if TStudent(Item1).name &amp;lt; TStudent(Item2).name then result:=-1;&lt;BR /&gt;if TStudent(Item1).name &amp;gt; TStudent(Item2).name then result:=1;&lt;BR /&gt;if TStudent(Item1).name = TStudent(Item2).name then result:=0;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;begin&lt;/P&gt;&lt;P&gt;randomize;&lt;/P&gt;&lt;P&gt;myobj:=TParallelSort.create(4,ctQuickSort); &lt;BR /&gt; // number of cores and the sort's type&lt;BR /&gt; // ctQuickSort or ctHeapSort or ctMergeSort ..&lt;/P&gt;&lt;P&gt;setlength(tab,100000);&lt;/P&gt;&lt;P&gt;for i := LOW(tab) to HIGH(Tab) &lt;BR /&gt; do&lt;BR /&gt; begin&lt;BR /&gt; student:=TStudent.create;&lt;BR /&gt; student.name:= 'Amine'+inttostr(random(2000000));&lt;BR /&gt; // student.name:=random(10000000);&lt;BR /&gt; tab&lt;I&gt;:=student;&lt;BR /&gt; &lt;BR /&gt; end;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;myobj.sort(tab,@comp);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for i := LOW(tab) to HIGH(Tab) &lt;BR /&gt;do&lt;BR /&gt;begin&lt;BR /&gt; writeln(TStudent(tab&lt;I&gt;).name,' ');&lt;BR /&gt;end;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;j:=0;&lt;/P&gt;&lt;P&gt;for i := j to HIGH(Tab) do freeandnil(TStudent(tab&lt;I&gt;));&lt;/I&gt;&lt;/P&gt;&lt;P&gt;setlength(tab,0);&lt;BR /&gt;myobj.free;&lt;BR /&gt;writeln('ok');&lt;BR /&gt;end.&lt;/P&gt;&lt;P&gt;--------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Language: FPC Pascal v2.2.0+ / Delphi 7+: &lt;A href="http://www.freepascal.org/"&gt;http://www.freepascal.org/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Operating Systems: Win , Linux and Mac (x86). &lt;/P&gt;&lt;P&gt;Required FPC switches: -O3 -Sd -dFPC -dWin32 -dFreePascal &lt;/P&gt;&lt;P&gt;-Sd for delphi mode.... &lt;/P&gt;&lt;P&gt;Required Delphi switches: -DMSWINDOWS -$H+ &lt;/P&gt;&lt;P&gt;For Delphi 5,6,7 use -DDelphi&lt;/P&gt;&lt;P&gt;For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;BR /&gt;Amine Moulay Ramdane.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 02 May 2010 07:15:30 GMT</pubDate>
    <dc:creator>aminer10</dc:creator>
    <dc:date>2010-05-02T07:15:30Z</dc:date>
    <item>
      <title>Parallel Sort Library 2.0</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Parallel-Sort-Library-2-0/m-p/828639#M1433</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Parallel Sort Library 2.0 &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Author: Amine Moulay Ramdane &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Description:&lt;/P&gt;&lt;P&gt;Parallel Sort Library that supports Parallel Quicksort, Parallel HeapSort &lt;BR /&gt;and Parallel MergeSort on Multicores systems.&lt;/P&gt;&lt;P&gt;Parallel Sort Library 2.0 uses my Thread Pool Engine and quicksort &lt;BR /&gt;many array parts - of your array - in parallel using Quicksort or HeapSort &lt;BR /&gt;or MergeSort and after that it finally merge them - with the merge() procedure - &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Note: Parallel Quicksort gave me ~3x speed on four cores.&lt;/P&gt;&lt;P&gt;And please look at test.pas inside the zip file, it's a parallel quicksort example &lt;BR /&gt;- compile and execute it... &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You can download Parallel Sort Library from:&lt;/P&gt;&lt;P&gt;&lt;A href="http://pages.videotron.com/aminer/"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Parallel Sort Library is very easy to use , and &lt;BR /&gt;here is an example in Object Pascal:&lt;/P&gt;&lt;P&gt;----------------------------------------&lt;/P&gt;&lt;P&gt;program test;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;uses &lt;BR /&gt;{$IFDEF Delphi}cmem,{$ENDIF}&lt;BR /&gt;{$IFDEF DELPHI2005+}cmem,{$ENDIF}&lt;BR /&gt;ParallelSort,sysutils,classes;&lt;/P&gt;&lt;P&gt;type&lt;/P&gt;&lt;P&gt;TStudent = Class&lt;BR /&gt;public&lt;BR /&gt;Name: string;&lt;BR /&gt; end;&lt;/P&gt;&lt;P&gt;var tab:Ttabpointer;&lt;BR /&gt; myobj:TParallelSort;&lt;BR /&gt; student:TStudent;&lt;BR /&gt; i,j:integer;&lt;BR /&gt; c_ok:boolean;&lt;BR /&gt; &lt;BR /&gt;function comp(Item1, Item2: Pointer): Integer;&lt;/P&gt;&lt;P&gt;begin&lt;BR /&gt;if TStudent(Item1).name &amp;lt; TStudent(Item2).name then result:=-1;&lt;BR /&gt;if TStudent(Item1).name &amp;gt; TStudent(Item2).name then result:=1;&lt;BR /&gt;if TStudent(Item1).name = TStudent(Item2).name then result:=0;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;begin&lt;/P&gt;&lt;P&gt;randomize;&lt;/P&gt;&lt;P&gt;myobj:=TParallelSort.create(4,ctQuickSort); &lt;BR /&gt; // number of cores and the sort's type&lt;BR /&gt; // ctQuickSort or ctHeapSort or ctMergeSort ..&lt;/P&gt;&lt;P&gt;setlength(tab,100000);&lt;/P&gt;&lt;P&gt;for i := LOW(tab) to HIGH(Tab) &lt;BR /&gt; do&lt;BR /&gt; begin&lt;BR /&gt; student:=TStudent.create;&lt;BR /&gt; student.name:= 'Amine'+inttostr(random(2000000));&lt;BR /&gt; // student.name:=random(10000000);&lt;BR /&gt; tab&lt;I&gt;:=student;&lt;BR /&gt; &lt;BR /&gt; end;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;myobj.sort(tab,@comp);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for i := LOW(tab) to HIGH(Tab) &lt;BR /&gt;do&lt;BR /&gt;begin&lt;BR /&gt; writeln(TStudent(tab&lt;I&gt;).name,' ');&lt;BR /&gt;end;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;j:=0;&lt;/P&gt;&lt;P&gt;for i := j to HIGH(Tab) do freeandnil(TStudent(tab&lt;I&gt;));&lt;/I&gt;&lt;/P&gt;&lt;P&gt;setlength(tab,0);&lt;BR /&gt;myobj.free;&lt;BR /&gt;writeln('ok');&lt;BR /&gt;end.&lt;/P&gt;&lt;P&gt;--------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Language: FPC Pascal v2.2.0+ / Delphi 7+: &lt;A href="http://www.freepascal.org/"&gt;http://www.freepascal.org/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Operating Systems: Win , Linux and Mac (x86). &lt;/P&gt;&lt;P&gt;Required FPC switches: -O3 -Sd -dFPC -dWin32 -dFreePascal &lt;/P&gt;&lt;P&gt;-Sd for delphi mode.... &lt;/P&gt;&lt;P&gt;Required Delphi switches: -DMSWINDOWS -$H+ &lt;/P&gt;&lt;P&gt;For Delphi 5,6,7 use -DDelphi&lt;/P&gt;&lt;P&gt;For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;BR /&gt;Amine Moulay Ramdane.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 02 May 2010 07:15:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Parallel-Sort-Library-2-0/m-p/828639#M1433</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2010-05-02T07:15:30Z</dc:date>
    </item>
    <item>
      <title>Parallel Sort Library 2.0</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Parallel-Sort-Library-2-0/m-p/828640#M1434</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hello again,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have updated my Parallel Sort Library to version 2.01 , &lt;BR /&gt;now Parallel HeapSort is working properly.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Welcome: &lt;A href="http://pages.videotron.com/aminer/"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sincerely,&lt;BR /&gt;Amine Moulay Ramdane.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 02 May 2010 08:58:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Parallel-Sort-Library-2-0/m-p/828640#M1434</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2010-05-02T08:58:01Z</dc:date>
    </item>
  </channel>
</rss>

