<?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 algorithms in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/algorithms/m-p/944241#M5091</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;look down the the following link...&lt;BR /&gt;it's about parallel partition...&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.redgenes.com/Lecture-Sorting.pdf"&gt;http://www.redgenes.com/Lecture-Sorting.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I have tried to simulate this parallel partition method ,&lt;BR /&gt;but i don't think it will scale cause we have to do a merging,&lt;BR /&gt;which essentially is an array-copy operation but this array-copy&lt;BR /&gt;operations will be expensive compared to an integer compare&lt;BR /&gt;operation that you find inside the partition fuinction, and it will still&lt;BR /&gt;be expensive compared to a string compare operation that you find&lt;BR /&gt;inside the partition function. So since it's not scaling i have abondoned&lt;BR /&gt;the idea to implement this parallel partition method in my parallel&lt;BR /&gt;quicksort.&lt;/P&gt;
&lt;P&gt;I have also just read the following paper about Parallel Merging:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.economyinformatics.ase.ro/content/EN4/alecu.pdf"&gt;http://www.economyinformatics.ase.ro/content/EN4/alecu.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;And i have implemented this algorithm just to see what is its performance.&lt;BR /&gt;and i have noticed that the serial algorithm is 8 times slower than the&lt;BR /&gt;merge&lt;BR /&gt;function that you find in the serial mergesort algorithm.So 8 times slower,&lt;BR /&gt;it's too slow.&lt;/P&gt;
&lt;P&gt;So the only way to do a somewhat better parallel sorting algorithm,&lt;BR /&gt;it's to use the following algorithm;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.drdobbs.com/parallel/parallel-merge/229204454?queryText=parallel%2Bsort"&gt;http://www.drdobbs.com/parallel/parallel-merge/229204454?queryText=parallel%2Bsort&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The idea is simple:&lt;/P&gt;
&lt;P&gt;Let's assume we want to merge sorted arrays X and Y. Select X&lt;M&gt;&lt;BR /&gt;median element in X. Elements in X[ .. m-1] are less than or equal to&lt;BR /&gt;X&lt;M&gt;. Using binary search find index k of the first element in Y greater&lt;BR /&gt;than X&lt;M&gt;. Thus Y[ .. k-1] are less than or equal to X&lt;M&gt; as well.&lt;BR /&gt;Elements in X[m+1..] are greater than or equal to X&lt;M&gt; and Y[k .. ]&lt;BR /&gt;are greater. So merge(X, Y) can be defined as&lt;BR /&gt;concat(merge(X[ .. m-1], Y[ .. k-1]), X&lt;M&gt;, merge(X[m+1.. ], Y[k .. ]))&lt;BR /&gt;now we can recursively in parallel do merge(X[ .. m-1], Y[ .. k-1]) and&lt;BR /&gt;merge(X[m+1 .. ], Y[k .. ]) and then concat results.&lt;/M&gt;&lt;/M&gt;&lt;/M&gt;&lt;/M&gt;&lt;/M&gt;&lt;/M&gt;&lt;/P&gt;
&lt;P&gt;But read this:&lt;/P&gt;
&lt;P&gt;"Parallel hybrid merge algorithm was developed that outperformed&lt;BR /&gt;sequential simple merge as well as STL merge by 0.9-5.8 times overall&lt;BR /&gt;and by over 5 times for larger arrays"&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.drdobbs.com/parallel/parallel-merge/229204454?pgno=3"&gt;http://www.drdobbs.com/parallel/parallel-merge/229204454?pgno=3&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This paper as you have noticed has fogot to tell that this method is&lt;BR /&gt;dependant on the distribution of the data&lt;/P&gt;
&lt;P&gt;Read for exemple this:&lt;/P&gt;
&lt;P&gt;"Select X&lt;M&gt; median element in X. Elements in X[ .. m-1] are less than&lt;BR /&gt;or equal to X&lt;M&gt;. Using binary search find index k of the first element in&lt;BR /&gt;Y greater than X&lt;M&gt;."&lt;/M&gt;&lt;/M&gt;&lt;/M&gt;&lt;/P&gt;
&lt;P&gt;So if "median element:" of X is not near or equal to the "median&lt;BR /&gt;element" of Y so this method can have bad parallel performance&lt;BR /&gt;and it may not scale as you think.&lt;/P&gt;
&lt;P&gt;There is another parallel method for parallel partition, here it's:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.cs.sunysb.edu/~rezaul/Spring-2012/CSE613/CSE613-lecture-9.pdf"&gt;http://www.cs.sunysb.edu/~rezaul/Spring-2012/CSE613/CSE613-lecture-9.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;but as you will notice it's still too expensive, causeyou have to create&lt;BR /&gt;3 arrays and copy in them:&lt;/P&gt;
&lt;P&gt;3. array B[ 0: n ? 1 ], lt[ 0: n ? 1 ], gt[ 0: n ? 1 ]&lt;/P&gt;
&lt;P&gt;You can use SIMD instructions on the parallel-prefix-sum function&lt;/P&gt;
&lt;P&gt;8. lt [ 0: n ? 1 ] ¬ Par-Prefix-Sum ( lt[ 0: n ? 1 ], + )&lt;BR /&gt;:&lt;BR /&gt;But the algorithm is still expensive i think on a quad or eight cores or&lt;BR /&gt;even&lt;BR /&gt;16 cores, you have to have much more than 16 cores to be able to benefit&lt;BR /&gt;from this method i think.&lt;/P&gt;
&lt;P&gt;Bucket sort is not a sorting algorithm itself, rather it is a&lt;BR /&gt;procedure for partitioning data to be sorted using some given&lt;BR /&gt;sorting algorithm-a "meta-algorithm" so to speak.&lt;/P&gt;
&lt;P&gt;Bucket sort will be better, when elements are uniformly distributed&lt;BR /&gt;over an interval [a, b] and buckets have not significantly different&lt;BR /&gt;number of elements.&lt;/P&gt;
&lt;P&gt;bucketsort sequential computational complexity using quicksort is&lt;BR /&gt;= p × (n/p) log(n/p) = n log(n/p)&lt;/P&gt;
&lt;P&gt;bucket sort parallel computational complexity using quicksort&lt;BR /&gt;= (n/p) log(n/p)&lt;/P&gt;
&lt;P&gt;Parallel BucketSort gave me also 3x scaling when sorting strings on a&lt;BR /&gt;quad cores, it scales better than my parallel quicksort and it can be&lt;BR /&gt;much faster than my parallel quicksort.&lt;/P&gt;
&lt;P&gt;I have thought about my parallel quicksort , and i have found&lt;BR /&gt;that parallelquicksort is fine but the problem with it is that the&lt;BR /&gt;partition function is not parallelizable , so i have thought about this&lt;BR /&gt;and i have decided to write a parallel BucketSort,and this parallel&lt;BR /&gt;bucketsort can give you much better performance than parallel quicksort&lt;BR /&gt;when sorting 100000 strings or more, just test it yourself and see,&lt;BR /&gt;parallel bucketsort can sort just strings at the moment, and it can use&lt;BR /&gt;quicksort or mergesort, mergesort is faster.&lt;/P&gt;
&lt;P&gt;I have updated parallel bucketsort to version 1.02 , i have&lt;BR /&gt;changed a little bit the interface, now you have to pass&lt;BR /&gt;to the bucketsort method four parameters: the array,&lt;BR /&gt;a TSortCompare function and a TSort1 function and a constant&lt;/P&gt;
&lt;P&gt;ctDescending or ctAscesending to sort in ascending or descending order..&lt;/P&gt;
&lt;P&gt;Here is a small example in Object Pascal:&lt;/P&gt;
&lt;P&gt;==&lt;BR /&gt;program test;&lt;/P&gt;
&lt;P&gt;uses parallelbucketsort,sysutils,timer;&lt;/P&gt;
&lt;P&gt;type&lt;/P&gt;
&lt;P&gt;TStudent = Class&lt;BR /&gt;public&lt;BR /&gt;mystring: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;a:integer;&lt;/P&gt;
&lt;P&gt;function comp1(Item1:Pointer): string;&lt;BR /&gt;begin&lt;BR /&gt;result:=TStudent(Item1).mystring ;&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;function comp(Item1, Item2: Pointer): integer;&lt;BR /&gt;begin&lt;BR /&gt;if TStudent(Item1).mystring &amp;gt; TStudent(Item2).mystring&lt;BR /&gt;then&lt;BR /&gt;begin&lt;BR /&gt;result:=1;&lt;BR /&gt;exit;&lt;BR /&gt;end;&lt;BR /&gt;if TStudent(Item1).mystring &amp;lt; TStudent(Item2).mystring&lt;BR /&gt;then&lt;BR /&gt;begin&lt;BR /&gt;result:=-1;&lt;BR /&gt;exit;&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;if TStudent(Item1).mystring = TStudent(Item2).mystring&lt;BR /&gt;then&lt;BR /&gt;begin&lt;BR /&gt;result:=0;&lt;BR /&gt;exit;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;begin&lt;/P&gt;
&lt;P&gt;myobj:=TParallelSort.create(1,ctQuicksort); // set to the number of cores...&lt;/P&gt;
&lt;P&gt;setlength(tab,1000000);&lt;BR /&gt;?&lt;BR /&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.mystring:= inttostr(i);&lt;BR /&gt;tab[high(tab)-i]:= student;&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;HPT.Timestart;&lt;/P&gt;
&lt;P&gt;myobj.bucketsort(tab,comp,comp1,ctAscending); // use ctAscending or CtDescending.&lt;BR /&gt;//myobj.qsort(tab,comp);&lt;BR /&gt;writeln('Time in microseconds: ',hpt.TimePeriod);&lt;/P&gt;
&lt;P&gt;writeln;&lt;BR /&gt;writeln('Please press a key to continu...');&lt;BR /&gt;readln;&lt;/P&gt;
&lt;P&gt;for i := LOW(tab) to HIGH(Tab)-1&lt;BR /&gt;do&lt;BR /&gt;begin&lt;BR /&gt;if tstudent(tab).mystring &amp;gt; tstudent(tab[i+1]).mystring&lt;BR /&gt;then&lt;BR /&gt;begin&lt;BR /&gt;writeln('sort has failed...');&lt;BR /&gt;halt;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;for i := LOW(tab) to HIGH(Tab)&lt;BR /&gt;do&lt;BR /&gt;begin&lt;BR /&gt;writeln(TStudent(tab).mystring,' ');&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;for i := 0 to HIGH(Tab) do freeandnil(TStudent(tab));&lt;/P&gt;
&lt;P&gt;setlength(tab,0);&lt;BR /&gt;myobj.free;&lt;/P&gt;
&lt;P&gt;end.&lt;/P&gt;
&lt;P&gt;===&lt;/P&gt;
&lt;P&gt;You can download parallel bucketsort 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;Amine Moulay Ramdane.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Oct 2013 10:50:12 GMT</pubDate>
    <dc:creator>lara_h_</dc:creator>
    <dc:date>2013-10-02T10:50:12Z</dc:date>
    <item>
      <title>algorithms</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/algorithms/m-p/944241#M5091</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;look down the the following link...&lt;BR /&gt;it's about parallel partition...&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.redgenes.com/Lecture-Sorting.pdf"&gt;http://www.redgenes.com/Lecture-Sorting.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I have tried to simulate this parallel partition method ,&lt;BR /&gt;but i don't think it will scale cause we have to do a merging,&lt;BR /&gt;which essentially is an array-copy operation but this array-copy&lt;BR /&gt;operations will be expensive compared to an integer compare&lt;BR /&gt;operation that you find inside the partition fuinction, and it will still&lt;BR /&gt;be expensive compared to a string compare operation that you find&lt;BR /&gt;inside the partition function. So since it's not scaling i have abondoned&lt;BR /&gt;the idea to implement this parallel partition method in my parallel&lt;BR /&gt;quicksort.&lt;/P&gt;
&lt;P&gt;I have also just read the following paper about Parallel Merging:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.economyinformatics.ase.ro/content/EN4/alecu.pdf"&gt;http://www.economyinformatics.ase.ro/content/EN4/alecu.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;And i have implemented this algorithm just to see what is its performance.&lt;BR /&gt;and i have noticed that the serial algorithm is 8 times slower than the&lt;BR /&gt;merge&lt;BR /&gt;function that you find in the serial mergesort algorithm.So 8 times slower,&lt;BR /&gt;it's too slow.&lt;/P&gt;
&lt;P&gt;So the only way to do a somewhat better parallel sorting algorithm,&lt;BR /&gt;it's to use the following algorithm;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.drdobbs.com/parallel/parallel-merge/229204454?queryText=parallel%2Bsort"&gt;http://www.drdobbs.com/parallel/parallel-merge/229204454?queryText=parallel%2Bsort&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The idea is simple:&lt;/P&gt;
&lt;P&gt;Let's assume we want to merge sorted arrays X and Y. Select X&lt;M&gt;&lt;BR /&gt;median element in X. Elements in X[ .. m-1] are less than or equal to&lt;BR /&gt;X&lt;M&gt;. Using binary search find index k of the first element in Y greater&lt;BR /&gt;than X&lt;M&gt;. Thus Y[ .. k-1] are less than or equal to X&lt;M&gt; as well.&lt;BR /&gt;Elements in X[m+1..] are greater than or equal to X&lt;M&gt; and Y[k .. ]&lt;BR /&gt;are greater. So merge(X, Y) can be defined as&lt;BR /&gt;concat(merge(X[ .. m-1], Y[ .. k-1]), X&lt;M&gt;, merge(X[m+1.. ], Y[k .. ]))&lt;BR /&gt;now we can recursively in parallel do merge(X[ .. m-1], Y[ .. k-1]) and&lt;BR /&gt;merge(X[m+1 .. ], Y[k .. ]) and then concat results.&lt;/M&gt;&lt;/M&gt;&lt;/M&gt;&lt;/M&gt;&lt;/M&gt;&lt;/M&gt;&lt;/P&gt;
&lt;P&gt;But read this:&lt;/P&gt;
&lt;P&gt;"Parallel hybrid merge algorithm was developed that outperformed&lt;BR /&gt;sequential simple merge as well as STL merge by 0.9-5.8 times overall&lt;BR /&gt;and by over 5 times for larger arrays"&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.drdobbs.com/parallel/parallel-merge/229204454?pgno=3"&gt;http://www.drdobbs.com/parallel/parallel-merge/229204454?pgno=3&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This paper as you have noticed has fogot to tell that this method is&lt;BR /&gt;dependant on the distribution of the data&lt;/P&gt;
&lt;P&gt;Read for exemple this:&lt;/P&gt;
&lt;P&gt;"Select X&lt;M&gt; median element in X. Elements in X[ .. m-1] are less than&lt;BR /&gt;or equal to X&lt;M&gt;. Using binary search find index k of the first element in&lt;BR /&gt;Y greater than X&lt;M&gt;."&lt;/M&gt;&lt;/M&gt;&lt;/M&gt;&lt;/P&gt;
&lt;P&gt;So if "median element:" of X is not near or equal to the "median&lt;BR /&gt;element" of Y so this method can have bad parallel performance&lt;BR /&gt;and it may not scale as you think.&lt;/P&gt;
&lt;P&gt;There is another parallel method for parallel partition, here it's:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.cs.sunysb.edu/~rezaul/Spring-2012/CSE613/CSE613-lecture-9.pdf"&gt;http://www.cs.sunysb.edu/~rezaul/Spring-2012/CSE613/CSE613-lecture-9.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;but as you will notice it's still too expensive, causeyou have to create&lt;BR /&gt;3 arrays and copy in them:&lt;/P&gt;
&lt;P&gt;3. array B[ 0: n ? 1 ], lt[ 0: n ? 1 ], gt[ 0: n ? 1 ]&lt;/P&gt;
&lt;P&gt;You can use SIMD instructions on the parallel-prefix-sum function&lt;/P&gt;
&lt;P&gt;8. lt [ 0: n ? 1 ] ¬ Par-Prefix-Sum ( lt[ 0: n ? 1 ], + )&lt;BR /&gt;:&lt;BR /&gt;But the algorithm is still expensive i think on a quad or eight cores or&lt;BR /&gt;even&lt;BR /&gt;16 cores, you have to have much more than 16 cores to be able to benefit&lt;BR /&gt;from this method i think.&lt;/P&gt;
&lt;P&gt;Bucket sort is not a sorting algorithm itself, rather it is a&lt;BR /&gt;procedure for partitioning data to be sorted using some given&lt;BR /&gt;sorting algorithm-a "meta-algorithm" so to speak.&lt;/P&gt;
&lt;P&gt;Bucket sort will be better, when elements are uniformly distributed&lt;BR /&gt;over an interval [a, b] and buckets have not significantly different&lt;BR /&gt;number of elements.&lt;/P&gt;
&lt;P&gt;bucketsort sequential computational complexity using quicksort is&lt;BR /&gt;= p × (n/p) log(n/p) = n log(n/p)&lt;/P&gt;
&lt;P&gt;bucket sort parallel computational complexity using quicksort&lt;BR /&gt;= (n/p) log(n/p)&lt;/P&gt;
&lt;P&gt;Parallel BucketSort gave me also 3x scaling when sorting strings on a&lt;BR /&gt;quad cores, it scales better than my parallel quicksort and it can be&lt;BR /&gt;much faster than my parallel quicksort.&lt;/P&gt;
&lt;P&gt;I have thought about my parallel quicksort , and i have found&lt;BR /&gt;that parallelquicksort is fine but the problem with it is that the&lt;BR /&gt;partition function is not parallelizable , so i have thought about this&lt;BR /&gt;and i have decided to write a parallel BucketSort,and this parallel&lt;BR /&gt;bucketsort can give you much better performance than parallel quicksort&lt;BR /&gt;when sorting 100000 strings or more, just test it yourself and see,&lt;BR /&gt;parallel bucketsort can sort just strings at the moment, and it can use&lt;BR /&gt;quicksort or mergesort, mergesort is faster.&lt;/P&gt;
&lt;P&gt;I have updated parallel bucketsort to version 1.02 , i have&lt;BR /&gt;changed a little bit the interface, now you have to pass&lt;BR /&gt;to the bucketsort method four parameters: the array,&lt;BR /&gt;a TSortCompare function and a TSort1 function and a constant&lt;/P&gt;
&lt;P&gt;ctDescending or ctAscesending to sort in ascending or descending order..&lt;/P&gt;
&lt;P&gt;Here is a small example in Object Pascal:&lt;/P&gt;
&lt;P&gt;==&lt;BR /&gt;program test;&lt;/P&gt;
&lt;P&gt;uses parallelbucketsort,sysutils,timer;&lt;/P&gt;
&lt;P&gt;type&lt;/P&gt;
&lt;P&gt;TStudent = Class&lt;BR /&gt;public&lt;BR /&gt;mystring: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;a:integer;&lt;/P&gt;
&lt;P&gt;function comp1(Item1:Pointer): string;&lt;BR /&gt;begin&lt;BR /&gt;result:=TStudent(Item1).mystring ;&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;function comp(Item1, Item2: Pointer): integer;&lt;BR /&gt;begin&lt;BR /&gt;if TStudent(Item1).mystring &amp;gt; TStudent(Item2).mystring&lt;BR /&gt;then&lt;BR /&gt;begin&lt;BR /&gt;result:=1;&lt;BR /&gt;exit;&lt;BR /&gt;end;&lt;BR /&gt;if TStudent(Item1).mystring &amp;lt; TStudent(Item2).mystring&lt;BR /&gt;then&lt;BR /&gt;begin&lt;BR /&gt;result:=-1;&lt;BR /&gt;exit;&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;if TStudent(Item1).mystring = TStudent(Item2).mystring&lt;BR /&gt;then&lt;BR /&gt;begin&lt;BR /&gt;result:=0;&lt;BR /&gt;exit;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;begin&lt;/P&gt;
&lt;P&gt;myobj:=TParallelSort.create(1,ctQuicksort); // set to the number of cores...&lt;/P&gt;
&lt;P&gt;setlength(tab,1000000);&lt;BR /&gt;?&lt;BR /&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.mystring:= inttostr(i);&lt;BR /&gt;tab[high(tab)-i]:= student;&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;HPT.Timestart;&lt;/P&gt;
&lt;P&gt;myobj.bucketsort(tab,comp,comp1,ctAscending); // use ctAscending or CtDescending.&lt;BR /&gt;//myobj.qsort(tab,comp);&lt;BR /&gt;writeln('Time in microseconds: ',hpt.TimePeriod);&lt;/P&gt;
&lt;P&gt;writeln;&lt;BR /&gt;writeln('Please press a key to continu...');&lt;BR /&gt;readln;&lt;/P&gt;
&lt;P&gt;for i := LOW(tab) to HIGH(Tab)-1&lt;BR /&gt;do&lt;BR /&gt;begin&lt;BR /&gt;if tstudent(tab).mystring &amp;gt; tstudent(tab[i+1]).mystring&lt;BR /&gt;then&lt;BR /&gt;begin&lt;BR /&gt;writeln('sort has failed...');&lt;BR /&gt;halt;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;for i := LOW(tab) to HIGH(Tab)&lt;BR /&gt;do&lt;BR /&gt;begin&lt;BR /&gt;writeln(TStudent(tab).mystring,' ');&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;for i := 0 to HIGH(Tab) do freeandnil(TStudent(tab));&lt;/P&gt;
&lt;P&gt;setlength(tab,0);&lt;BR /&gt;myobj.free;&lt;/P&gt;
&lt;P&gt;end.&lt;/P&gt;
&lt;P&gt;===&lt;/P&gt;
&lt;P&gt;You can download parallel bucketsort 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;Amine Moulay Ramdane.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2013 10:50:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/algorithms/m-p/944241#M5091</guid>
      <dc:creator>lara_h_</dc:creator>
      <dc:date>2013-10-02T10:50:12Z</dc:date>
    </item>
  </channel>
</rss>

