<?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 polynomial evaluation in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933584#M13895</link>
    <description>&lt;P&gt;I am trying to do polynomial evaluation using MKL or IPP. &amp;nbsp;Can you guide me as to which functions should I be looking at ? &amp;nbsp;my polynomials are going to be &amp;lt; 4 th order.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2013 21:36:50 GMT</pubDate>
    <dc:creator>Anirudh</dc:creator>
    <dc:date>2013-06-25T21:36:50Z</dc:date>
    <item>
      <title>polynomial evaluation</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933584#M13895</link>
      <description>&lt;P&gt;I am trying to do polynomial evaluation using MKL or IPP. &amp;nbsp;Can you guide me as to which functions should I be looking at ? &amp;nbsp;my polynomials are going to be &amp;lt; 4 th order.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2013 21:36:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933584#M13895</guid>
      <dc:creator>Anirudh</dc:creator>
      <dc:date>2013-06-25T21:36:50Z</dc:date>
    </item>
    <item>
      <title>I don't think you gave enough</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933585#M13896</link>
      <description>&lt;P&gt;I don't think you gave enough information to indicate why you would consider MKL or IPP for this.&amp;nbsp; A macro expression such as&lt;/P&gt;
&lt;P&gt;a[0] + x * (a[1] +x * a[2] + x*x * (a[3] + x * a[4]))&lt;/P&gt;
&lt;P&gt;should be sufficient.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2013 03:33:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933585#M13896</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2013-06-26T03:33:31Z</dc:date>
    </item>
    <item>
      <title>there are no such functions</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933586#M13897</link>
      <description>&lt;P&gt;there are no such functions neither in MKL or IPP which make polynomials calculations. Tim gave you good example how you can compute it.&lt;/P&gt;
&lt;P&gt;in the case if the inputs would be vectors, then you can reuse some of VML functions for that.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2013 03:45:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933586#M13897</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2013-06-26T03:45:20Z</dc:date>
    </item>
    <item>
      <title>Thanks for the insight.  I</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933587#M13898</link>
      <description>&lt;P&gt;Thanks for the insight. &amp;nbsp;I was looking for polynomial evaluation, because i was trying to implement 2D interpolation, such that i can interpolate using Cubic splines. &amp;nbsp;There i would have to evaluate cubic polynomials. &amp;nbsp;I could not use functions in image processing library (I believe) because they offer me evaluating the 2D at specific intervals. &amp;nbsp;My new coordinates which i want to interpolate at are randomly placed in the original xy grid.&lt;/P&gt;
&lt;P&gt;Do you think there is some function that can do the 2D interpolation for such a case ?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2013 14:16:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933587#M13898</guid>
      <dc:creator>Anirudh</dc:creator>
      <dc:date>2013-06-26T14:16:23Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933588#M13899</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Present version of Intel(R) MKL supports 1D spline based interpolation only. Data Fitting&amp;nbsp;component of the library provides routines for spline construction and relevant computations such as&amp;nbsp;interpolation, search and integration. We support linear, quadratic, cubic and user-defined splines.&lt;/P&gt;
&lt;P&gt;Are you interested entirely in 2D interpolation, or 1D is also of your use?&lt;/P&gt;
&lt;P&gt;Also, can you please provide, if possible,&amp;nbsp;additional details behind your usage model of 2D interpolation such as problem dimension, type of spline (only cubic or other types are possible as well), number of interpolation sites, data types (integer, floating-point), etc? Is 2D interpolation is a compute intensive part of your application?&lt;/P&gt;
&lt;P&gt;Andrey&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2013 14:26:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933588#M13899</guid>
      <dc:creator>Andrey_N_Intel</dc:creator>
      <dc:date>2013-06-26T14:26:58Z</dc:date>
    </item>
    <item>
      <title>We did try using the 1D</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933589#M13900</link>
      <description>&lt;P&gt;We did try using the 1D spline from MKL &amp;nbsp;and found that the speed up was about 2x from our implementation, for a case where we were evaluating 10k different points on the same spline. &amp;nbsp;I think MKL is faster in the case where many points are to be evaluated on the same spline. &amp;nbsp;If you evaluate just one point on each of the hundreds of splines then i dont get any advantage.&lt;/P&gt;
&lt;P&gt;Right now in my application we have to evaluate 900 splines, 1 point at a time, in which case MKL was slower than our implementation. I cannot create a vector of input points to the splines, as I only get the points to be evaluated on the spline, after some other processing.&lt;/P&gt;
&lt;P&gt;I my application splines evaluation are taking 40% of the time (analyzed via Parallel Studio analyzer). &amp;nbsp;I have a 2D matrix of 900x11 elements. &amp;nbsp;I create 900 splines with 11 knots. &amp;nbsp;Every loop i need to evaluate one point on each spline.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was thinking if I make it 2D interpolation (900x11 original grid) instead, I can evaluate all the 900 points with the same function call and get a speed up.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2013 15:35:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933589#M13900</guid>
      <dc:creator>Anirudh</dc:creator>
      <dc:date>2013-06-26T15:35:33Z</dc:date>
    </item>
    <item>
      <title>Thank you much for the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933590#M13901</link>
      <description>&lt;P&gt;Thank you much for the addtional details. While your request about support of 2D case is valid for the further analysis, let me provide additional details about 1D case.&lt;/P&gt;
&lt;P&gt;As you mention, performance advantages of Intel(R) MKL Data Fitting routines are observed in the vector case when number of interpolation sites is, say, at least several hundreeds.&lt;/P&gt;
&lt;P&gt;We are also aware about importance of scalar case for applications, e.g., when number of interpolation sites is 1 and number of functions is 1.&lt;BR /&gt;For those reasons in Intel(R) MKL 11.0. Update 2 we improved performance of interpolation routines for a scalar case, in particular speed of search and polynomial computations. As the interface overheads related to testing of function parameters are visible on small problem dimensions, we also added support of parameter DF_CHECK_FLAG in editor dfiEditVal. When disabled&amp;nbsp;with the editor this flag helps to avoid extra parameter checks; by default this flag is enabled. However, please use this flag carefully, after you complete development/debuging of your code. See additional details in Release Notes &lt;A href="http://software.intel.com/en-us/articles/intel-mkl-110-release-notes/"&gt;http://software.intel.com/en-us/articles/intel-mkl-110-release-notes/&lt;/A&gt; and Data Fitting Chapter of Intel(R) MKL Manual. But still, in the scalar case interface overheads&amp;nbsp;may be visible.&lt;/P&gt;
&lt;P&gt;Did you try the latest Intel(R) MKL 11.0 to test performance of the interpolation functions in the scalar case? If yes, did it help you in the scalar case?&lt;/P&gt;
&lt;P&gt;API of Data Fitting component supports different use cases, including parallelization on level of the user's application.&lt;BR /&gt;As your application uses 900 independent splines I wounder if you apply parallelization&amp;nbsp;in&amp;nbsp;your interpolation code?&lt;/P&gt;
&lt;P&gt;Something like this:&lt;/P&gt;
&lt;P&gt;double breaks[900*11];&lt;BR /&gt;double sites[900];&lt;/P&gt;
&lt;P&gt;#pragma omp parallel for&lt;BR /&gt;for ( i = 0; i &amp;lt; 900; i++ )&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DFTaskPtr task;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; status = dfdNewTask1D( &amp;amp;task, 11, &amp;amp;breaks[i*11], xhint, ny, y, yhint );&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; status = dfdEditPPSpline1D(...);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; status = dfiEditVal(task, DF_CHECK_FLAG, DF_DISABLE_CHECK_FLAG );&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; status = dfdConstruct1D( task, DF_PP_SPLINE, DF_METHOD_STD );&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; status = dfdInterpolate1D( task, DF_INTERP, DF_METHOD_PP,1,&amp;amp;sites&lt;I&gt;, ...);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; status = dfDeleteTask( &amp;amp;task );&amp;nbsp; &lt;BR /&gt;}&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;If this loop is&amp;nbsp;done&amp;nbsp;inside of the other loop,&amp;nbsp;the construction (and de-struction)&amp;nbsp;of the Data Fitting task can be done once, outside of the inner loop. In the inner loop you either provide pointers to the new input parameters (e.g., breaks or/and function values)&amp;nbsp;using relevant Data Fitting editors or copy the new values of input parameters into the same memory as before.&lt;/P&gt;
&lt;P&gt;Please, let me know if this helps.&lt;BR /&gt;Andrey&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2013 09:31:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933590#M13901</guid>
      <dc:creator>Andrey_N_Intel</dc:creator>
      <dc:date>2013-06-27T09:31:51Z</dc:date>
    </item>
    <item>
      <title>Quote:TimP (Intel) wrote:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933591#M13902</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;TimP (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I don't think you gave enough information to indicate why you would consider MKL or IPP for this.&amp;nbsp; A macro expression such as&lt;/P&gt;
&lt;P&gt;a[0] + x * (a[1] +x * a[2] + x*x * (a[3] + x * a[4]))&lt;/P&gt;
&lt;P&gt;should be sufficient.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;It could be also vectorized when the input are scalar compnents of some vector.&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jun 2013 12:04:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933591#M13902</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2013-06-29T12:04:46Z</dc:date>
    </item>
    <item>
      <title>Take a look at ippr.h header</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933592#M13903</link>
      <description>Take a look at &lt;STRONG&gt;ippr.h&lt;/STRONG&gt; header file:

...
/*
//  Name:               &lt;STRONG&gt;ipprResize_"mode"&lt;/STRONG&gt;
//  Purpose:            Performs RESIZE transform of the source volume
//                      by xFactor, yFactor, zFactor and xShift, yShift, zShift
//                            |X'|   |xFactor    0       0   |   |X|   |xShift|
//                            |Y'| = |        yFactor    0   | * |Y| + |yShift|
//                            |Z'|   |   0       0    zFactor|   |Z|   |zShift|
//  Parameters:
//    pSrc              pointer to source volume data (8u_C1V, 16u_C1V, 32f_C1V modes)
//                      or array of pointers to planes in source volume data
//    srcVolume         size of source volume
//    srcStep           step in every plane of source volume
//    srcPlaneStep      step between planes of source volume (8u_C1V, 16u_C1V, 32f_C1V modes)
//    srcVOI            volume of interest of source volume
//    pDst              pointer to destination volume data (8u_C1V and 16u_C1V modes)
//                      or array of pointers to planes in destination volume data
//    dstStep           step in every plane of destination volume
//    dstPlaneStep      step between planes of destination volume (8u_C1V, 16u_C1V, 32f_C1V modes)
//    dstVOI            volume of interest of destination volume
//    xFactor           they specify fraction of resizing in X direction
//    yFactor           they specify fraction of resizing in Y direction
//    zFactor           they specify fraction of resizing in Z direction
//    xShift            they specify shifts of resizing in X direction
//    yShift            they specify shifts of resizing in Y direction
//    zShift            they specify shifts of resizing in Z direction
//    interpolation     type of interpolation to perform for resizing the input volume:
//                        IPPI_INTER_NN      nearest neighbor interpolation
//                        IPPI_INTER_LINEAR  trilinear interpolation
//                        IPPI_INTER_CUBIC   tricubic polynomial interpolation
//                      including two-parameter cubic filters:
//                        IPPI_INTER_CUBIC2P_BSPLINE      B-spline filter (1, 0)
//                        IPPI_INTER_CUBIC2P_CATMULLROM   Catmull-Rom filter (0, 1/2)
//                        IPPI_INTER_CUBIC2P_B05C03       special filter with parameters (1/2, 3/10)
//    pBuffer           pointer to work buffer
//  Returns:
//    ippStsNoErr             no errors
//    ippStsNullPtrErr        pSrc == NULL or pDst == NULL or pBuffer == NULL
//    ippStsSizeErr           width or height or depth of volumes is less or equal zero
//    ippStsWrongIntersectVOI VOI hasn't an intersection with the source or destination volume
//    ippStsResizeFactorErr   xFactor or yFactor or zFactor is less or equal zero
//    ippStsInterpolationErr  (interpolation != IPPI_INTER_NN) &amp;amp;&amp;amp;
//                            (interpolation != IPPI_INTER_LINEAR) &amp;amp;&amp;amp;
//                            (interpolation != IPPI_INTER_CUBIC) &amp;amp;&amp;amp;
//                            (interpolation != IPPI_INTER_CUBIC2P_BSPLINE) &amp;amp;&amp;amp;
//                            (interpolation != IPPI_INTER_CUBIC2P_CATMULLROM) &amp;amp;&amp;amp;
//                            (interpolation != IPPI_INTER_CUBIC2P_B05C03)
//  Notes:
//    &lt;STRONG&gt;"mode"&lt;/STRONG&gt; are 8u_C1V or 16u_C1V or 32f_C1V or 8u_C1PV or 16u_C1PV or 32f_C1PV
*/
...</description>
      <pubDate>Sun, 30 Jun 2013 18:58:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/polynomial-evaluation/m-p/933592#M13903</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-06-30T18:58:48Z</dc:date>
    </item>
  </channel>
</rss>

