<?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 Re: oneMKL sorting in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/oneMKL-sorting/m-p/1346060#M32487</link>
    <description>&lt;P&gt;SVRGP/DSVRGP are described in the IMSL documentation to be implementations of Singleton's version of Quicksort. If your need is to do a sort and then search the sorted array with new values, I do not see why you need to form an index array.&lt;/P&gt;
&lt;P&gt;If the number of items is around 500, I think that a hybrid sort with quicksort down to partitions of size on the neighborhood of 80, followed by insertion sort of the smaller partitions, is what would be most efficient.&lt;/P&gt;
&lt;P&gt;The C library functions qsort() and bsearch() are worth trying. They do not explicitly provide for an index array, but you can achieve the same purpose by using a struct composed of value:index pairs.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Dec 2021 19:31:56 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2021-12-22T19:31:56Z</dc:date>
    <item>
      <title>oneMKL sorting</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/oneMKL-sorting/m-p/1345995#M32484</link>
      <description>&lt;P&gt;Dear reader,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm evaluating the possibility of using MKL instead of IMSL as the latter requests huge fees for commercializing software that contains IMSL routines. Just recently, with some help from the Intel community, I tested the MKL SVD routine, which seems to work just fine. But what about the more basic work like "sorting"? I couldn't find anything. Any comments/suggestions? I also need the indices pertaining to the sorted array.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With kind regards,&lt;/P&gt;
&lt;P&gt;Tim.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 12:15:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/oneMKL-sorting/m-p/1345995#M32484</guid>
      <dc:creator>geerits</dc:creator>
      <dc:date>2021-12-22T12:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: oneMKL sorting</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/oneMKL-sorting/m-p/1346012#M32485</link>
      <description>&lt;P&gt;Sorting is, for a number of reasons, not considered a mathematical topic, and is not to be expected in MKL, which stands for Math Kernel Library. The runtime library of the programming language that you use (C/C++ or Fortran), however, usually provides for sorting.&lt;/P&gt;
&lt;P&gt;Please state your requirement more completely -- are you sorting an array of integers, reals, or strings? Or sorting an array of user-defined type? How many items to you expect to sort, and how often? Do you require the order of equal items to be preserved? Is there a specific IMSL sorting routine that you are trying to substitute for?&lt;/P&gt;
&lt;P&gt;The IPP library, which is an optional component of OneAPI, contains routines for sorting, as well. However, IPP aims to process arrays of small to medium size, not large size.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 13:30:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/oneMKL-sorting/m-p/1346012#M32485</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2021-12-22T13:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: oneMKL sorting</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/oneMKL-sorting/m-p/1346035#M32486</link>
      <description>&lt;P&gt;Hi mecej4,&lt;/P&gt;
&lt;P&gt;Ok, good to know! Then I assume that searching an array for a value (e.g., &amp;lt;=number) is also not contained in MKL?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using IMSL routine DSVRGP (the double precision version of SVRGP()) to sort an array of type double. I do that on many occasions. The call occurs in a parallelized loop (I use OpenMP, while using the Intel C++ compiler [Version 19]). Although the array sizes (N) differ from call to call, I can say that N&amp;lt;=500. Does that qualify for using the IPP library?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS: I also need to know the original indices pertaining to the sorted values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With kind regards,&lt;/P&gt;
&lt;P&gt;Tim.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 15:25:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/oneMKL-sorting/m-p/1346035#M32486</guid>
      <dc:creator>geerits</dc:creator>
      <dc:date>2021-12-22T15:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: oneMKL sorting</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/oneMKL-sorting/m-p/1346060#M32487</link>
      <description>&lt;P&gt;SVRGP/DSVRGP are described in the IMSL documentation to be implementations of Singleton's version of Quicksort. If your need is to do a sort and then search the sorted array with new values, I do not see why you need to form an index array.&lt;/P&gt;
&lt;P&gt;If the number of items is around 500, I think that a hybrid sort with quicksort down to partitions of size on the neighborhood of 80, followed by insertion sort of the smaller partitions, is what would be most efficient.&lt;/P&gt;
&lt;P&gt;The C library functions qsort() and bsearch() are worth trying. They do not explicitly provide for an index array, but you can achieve the same purpose by using a struct composed of value:index pairs.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 19:31:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/oneMKL-sorting/m-p/1346060#M32487</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2021-12-22T19:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: oneMKL sorting</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/oneMKL-sorting/m-p/1347317#M32511</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has the information provided helped? Kindly let us know if we could close this thread from our end.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Shanmukh.SS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 08:06:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/oneMKL-sorting/m-p/1347317#M32511</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2021-12-29T08:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: oneMKL sorting</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/oneMKL-sorting/m-p/1347318#M32512</link>
      <description>&lt;P&gt;Ok, thanks for your info. I'm going to look into this and will let you know about the outcome.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS: As to your question/statement: "&lt;SPAN&gt;If your need is to do a sort and then search the sorted array with new values, I do not see why you need to form an index array.&lt;/SPAN&gt;" I just need to know the index in the original array that corresponds to the minimum value of the sorted array (usually the first entry in the sorted array).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Tim.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 08:10:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/oneMKL-sorting/m-p/1347318#M32512</guid>
      <dc:creator>geerits</dc:creator>
      <dc:date>2021-12-29T08:10:39Z</dc:date>
    </item>
    <item>
      <title>Re:oneMKL sorting</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/oneMKL-sorting/m-p/1348035#M32523</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for accepting the solution. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Shanmukh.SS&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Jan 2022 08:43:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/oneMKL-sorting/m-p/1348035#M32523</guid>
      <dc:creator>ShanmukhS_Intel</dc:creator>
      <dc:date>2022-01-03T08:43:30Z</dc:date>
    </item>
  </channel>
</rss>

