Intel® Math Kernel Library

Can I guarantee precision in casting floating point integers to int32/64s?

If I have an integer value represented in single or double form what is the best method to cast this value to an int without loss of precision?


      float dis = 2.9999F;
      int answer = (dis * 10.0000001);
      std::cout << answer << std::endl;

// Output: 29

Linking to csfft1d etc

I have some code from a few years ago using the easy-to-use FFT routines csfft1d etc. I can't for the life of me figure out how to get these to link with the latest IVF and MKL - help please?



PS. The routines are documented at - I'm fairly sure you used to be able to link to them very easily using default MKL libraries, without any external wrappers etc.

MKL Parallelism problem

I'm trying MKL10 with OpenMP on dual-core linux machine.

The MKL user's guide told me:

In Intel MKL 10.0, the OpenMP* software determines the default
number of threads. The default number of threads is equal to the number
of logical processors in your system for Intel OpenMP* libraries.

How do I link FFTW to my Fortran code?

I have successfully been using FFTW with my Fortran 90 source code on a Windows XP IA-32 platform. I am creating a DLL for Matlab using their MEX function utility. I am using the .lib and .dll files that I downloaded from the FFTW website. In order to use FFTW I had to include INTERFACE statements in the subroutines that called the FFTW functions. The compile and link has been,

mex myfortran.f90 libfftw3-3.lib

with the libfftw3-3.dll file in the current directory.

MKL ERROR: Parameter 4 was incorrect on entry to DLASCL

When I calledDGELSD() to solve a least square problem, I received the following error message:

MKL ERROR: Parameter 4 was incorrect on entry to DLASCL

but my program didn't stop and it's still running. I iteratively used this routine but it didn't occur in the previous iterations.According to the MKL manual, the forth parameter of DLASCL() is a double precision real value which divides a given matrix. What kind of situation causes thiw problem?

Thanks in advance.

Subscribe to Intel® Math Kernel Library