forked from mathnet/mathnet-numerics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NativeProviders.txt
26 lines (23 loc) · 2.4 KB
/
NativeProviders.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Math.NET Numerics currently supports two native providers Intel's Math Kernel Library (MKL) and AMD's Core Math Library (ACML).
MKL (Windows)
Install MKL on your system (we are using v10.3 Update 2).
Open the NativeWrappers.sln in VS 2010 under \src\NativeWrappers\Windows .
Open the Configuration Manager and select either the 32-bit or 64-bit solution platform.
Right click on the MKLWrapper project and update the MKL include directory under C/C++/General and the library directory under Linker/General to point to your MKL installation.
Right click on the MKLWrapper project and click rebuild.
There will be two DLLs in the output directory: Math.NET.Numerics.MKL.dll and libiomp5md.dll. The output directory will be either \src\NativeWrappers\Windows\Win32\Release or \src\NativeWrappers\Windows\x64\release.
Copy the two DLLs from #6 to the same directory as MathNet.Numerics.dll.
Tell the Math.NET Numerics library to use the MKL provider by adding this line to your code:
MathNet.Numerics.Control.LinearAlgebraProvider = new MathNet.Numerics.Algorithms.LinearAlgebra.Mkl.MklLinearAlgebraProvider();
ACML (Windows)
Install the Intel Fortran version of ACML on your system (we are using v4.4) -http://developer.amd.com/cpu/Libraries/acml/Pages/default.aspx
Open the NativeWrappers.sln in VS 2010 under \src\NativeWrappers\Windows .
Open the Configuration Manager and select either the 32-bit or 64-bit solution platform.
Right click on the ACMLWrapper project and update the ACML include directory under C/C++/General and the library directory under Linker/General to point to your ACML installation.
Right click on the ACMLWrapper project and click rebuild.
There will be one DLL in the output directory: Math.NET.Numerics.ACML.dll. The output directory will be either \src\NativeWrappers\Windows\Win32\Release or \src\NativeWrappers\Windows\x64\release.
Copy the DLL from #6 to the same directory as MathNet.Numerics.dll.
Copy these DLLS from your ACML installation to the same directory as MathNet.Numerics: libacml_mp_dll.dll, libifcoremd.dll, libiomp5md.dll, and libmmd.dll
Tell the Math.NET Numerics library to use the ACML provider by adding this line to your code:
MathNet.Numerics.Control.LinearAlgebraProvider = new MathNet.Numerics.Algorithms.LinearAlgebra.Acml.AcmlLinearAlgebraProvider();
Note: The ACML wrapper dynamically links the ACML libraries. If you have the Intel Fortran Complier installed you can statically link them.