Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- MKL Data fitting, log-linear interpolation

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Marcus_W_1

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-24-2013
01:14 AM

111 Views

MKL Data fitting, log-linear interpolation

Hi,

a log-linear Interpolation can be calculated by the MKL data fitting if one applies the toolbox to the log-scaled values and applied the exponential function to the result of dfdInterpolate1D.

What about the Integration? One has to apply the exponential function on each integration segment. My first idea was to use the call back mechanism of dfdIntegrateEx1D.

If I understand correctly I has to implement the integration by my-self. It is not a big deal, but at least performance improvements for the integration parts seems to reduce to managed code performance (I apply a .net wrapper for the MKL functionality and the call back method is managed code as well).

Kind regards

Markus Wendt

Link Copied

4 Replies

Hans_P_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-24-2013
07:51 AM

111 Views

Andrey_N_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-24-2013
11:32 PM

111 Views

Hi Markus,

Use of the callback mechanism with IntegrateEx1D in the scenario you described is one possible option. Assuming that you need to apply exponent function to each integration segment I wonder if the standard Integrate1D() routine would work for you as described below?

API of df[d|s]Integrate1D function allows you to compute nlim integrals over intervals whose boundaries are provided in arrays llim and rlim. If you specify boundaries of each segment you would get array of nlim "elementary" integrals. You then can apply transformation to this array using Intel(R) MKL v[d|s]Exp() function or compiler exp() function. Finally, you accumulate transformed integrals using straightforward loop or mechanism of sample sums available in Intel MKL 11.1 Summary Statistics.

To speed-up computation of the elementary integrals you can also specify hints (parameters llimhint and rlimhint) which describe structure of the integration limits. In this specific usage model they, at least, are expected to be sorted.

Please, let us know if this helps or your usage model assumes different order of computations.

Andrey

Andrey_N_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-26-2013
05:32 AM

111 Views

Hi Markus,

Can you please help me to better understand why you can't use standard Integrate1D() routine without callback mechanism in your specific spline usage scenario?

Let x(i), i=1,...,n be (log-scaled) breakpoints, and y(i) - function values. You compute the intergral over interval [t1,t2) where point t1 belongs to the cell [x(j), x(j(+1) ) and t2 - to [x(l),x(l+1) ). The intergal is decomposed into sum of elementary integrals over segments [t1,x(j+1) ), [x(j+1),x(j+2)),...[x(l), t2)). You need to apply exponentiation to such each elementary integral; summation of the transformed elementary integrals is the result you need. Does this correctly describe your computations?

If this is correct, the standard integration routine Integrate1D (which does not support callbacks) may be used to compute array of the elementary integrals over segments [x(i),x(i+1)), which then should be transformed and combined into the final result as described above. Before the integration you also need to compute indices of the cells that contain points t1 and t2 using SearchCells1D() API. No callback mechanism is necessary in this case. Exponentiation and summation of elementary integrals is done on the side of your application, using, for example, another API of Intel(R) MKL or compiler functions.

Andrey

Andrey_N_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-31-2013
01:50 AM

111 Views

Hi Makrus,

thank you much for the clarification. Please, keep in mind the following considerations:

- Performance aspects of either approach would be defined, in particular, by the problem size. If size of partition {x} is big enough your application might benefit from internal parallelization of the Integrate1D function

- Hints about structure of integration limits provided to the routine (for example, integration limits are sorted, what should be the case in this specific scenario) would help the library to arrange the computation of the integrals in more effective way.

- Log/Exp transformation can be done in vectorized way.

Please, let us know if you run into any questions on use of Data Fitting functions. Feel free to share with us your performance experience for either approach, if possible.

Thanks,

Andrey

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.