From 919fc757ce8de42c4be6b2dc02904882a4c1cdbb Mon Sep 17 00:00:00 2001 From: Marcus Cuda Date: Wed, 20 Apr 2011 19:25:58 +0800 Subject: [PATCH] fixed transpose enum name and added directions to build the native provider. --- NativeProviders.txt | 26 ++++++++++++++++++++++++++ src/NativeWrappers/ACML/blas.c | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 NativeProviders.txt diff --git a/NativeProviders.txt b/NativeProviders.txt new file mode 100644 index 00000000..cf98829b --- /dev/null +++ b/NativeProviders.txt @@ -0,0 +1,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 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. \ No newline at end of file diff --git a/src/NativeWrappers/ACML/blas.c b/src/NativeWrappers/ACML/blas.c index 7ed9b151..ae037fdf 100644 --- a/src/NativeWrappers/ACML/blas.c +++ b/src/NativeWrappers/ACML/blas.c @@ -1,7 +1,7 @@ #include "acml.h" #include "wrapper_common.h" -enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113, CblasConjNoTrans=114}; +enum TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113, CblasConjNoTrans=114}; char getTransChar(TRANSPOSE); DLLEXPORT void s_axpy(const int n, const float alpha, float x[], float y[]){