Intel® Math Kernel Library

BlitzMax Forums/BlitzMax Programming/Intel® Math Kernel Library

BLaBZ(Posted 2013) [#1]
Intel Math Kernel Library includes lots of threaded math functions optimized for intel processors.

http://software.intel.com/en-us/intel-mkl

If someone made a wrapper for BlitzMAX would this improve the speed of math equations in blitzMAX?

This could be an endeavor I take in the near future but I'd like to get some input on the topic if possible.


GaryV(Posted 2013) [#2]
You might be able to afford it, but I doubt most here would be willing to spend the $499 it costs for the library.


BLaBZ(Posted 2013) [#3]
There's an evaluation version, and it also states in the license once purchased you can distribute it with your software.


Floyd(Posted 2013) [#4]
You can get an overview here. It's nothing your typical BlitzMax programmer would need.

The point of such a library is that it works on large problems, providing highly optimized routines to solve them. Want to invert a huge matrix, or fit a curve to a large data set? This will do the job.


Who was John Galt?(Posted 2013) [#5]
If you're worried about that level of optimisation, you're programming in the wrong language.


BLaBZ(Posted 2013) [#6]
I'm not worried, I'm just wondering if it *could* improve performance and by how much.

@Floyd, does it only work on large problems? What about simple algebra performance?


Who was John Galt?(Posted 2013) [#7]
Function call overhead will kill you if you're using it for small operations- which it probably doesn't offer algorithms for anyway. Generally the idea is to stick it a pointer to a large block of data to perform an operation on.


Floyd(Posted 2013) [#8]
@Floyd, does it only work on large problems? What about simple algebra performance?

I have no experience with this particular library. But it includes statistical and linear algebra routines. I have used other libraries for those, but nothing with BlitzMax.

Here is what Intel has to say:

Intel® Math Kernel Library (Intel® MKL) is a computing math library of highly optimized, extensively threaded routines for applications that require maximum performance. Intel MKL provides comprehensive functionality support in these major areas of computation:

BLAS (level 1, 2, and 3) and LAPACK linear algebra routines, offering vector, vector-matrix, and matrix-matrix operations.
The PARDISO* direct sparse solver, an iterative sparse solver, and supporting sparse BLAS (level 1, 2, and 3) routines for solving sparse systems of equations.
ScaLAPACK distributed processing linear algebra routines for Linux* and Windows* operating systems, as well as the Basic Linear Algebra Communications Subprograms (BLACS) and the Parallel Basic Linear Algebra Subprograms (PBLAS).
Fast Fourier transform (FFT) functions in one, two, or three dimensions with support for mixed radices (not limited to sizes that are powers of 2), as well as distributed versions of these functions provided for use on clusters of the Linux* and Windows* operating systems.
Vector Math Library (VML) routines for optimized mathematical operations on vectors.
Vector Statistical Library (VSL) routines, which offer high-performance vectorized random number generators (RNG) for several probability distributions, convolution and correlation routines, and summary statistics functions.
Data Fitting Library, which provides capabilities for spline-based approximation of functions, derivatives and integrals of functions, and search.
Extended Eigensolver, a shared memory programming (SMP) version of an eigensolver based on the Feast Eigenvalue Solver.

It's clearly not aimed at anything simple or small. And don't be mislead by familiar sounding terms like vector. In this context a vector is any one-dimensional matrix.
It would probably contain thousands of elements, possibly millions.