For my memorandum
http://cpplapack.sourceforge.net/doc/main_page/Japanese.html BLAS, LAPACK, and PARDISO C ++ class wrappers. Matrix, vector calculation, singular value decomposition, solution of simultaneous equations, etc. can be described very simply.
Basically http://cpplapack.sourceforge.net/tutorial/japanese/index.html It can be introduced if you proceed according to.
Install lapack and gfortran.
sudo apt install libatlas3-base libatlas-base-dev
sudo apt install gfortran
In cpplapack, make and makedepend are used to build the code, so install the following as well.
sudo apt install build-essential xutils-dev
For the main body of cpplapack, check out to ~ / local / using Subversion.
cd ~
mkdir local
cd local
svn checkout https://svn.code.sf.net/p/cpplapack/code/trunk cpplapack
The preparation is now complete.
Check the operation of cpplapack. Create the following code.
#include "cpplapack.h"
int main(){
CPPL::dgematrix A(2, 3);
A(0, 0) = 1; A(0, 1) = 2; A(0, 2) = 3;
A(1, 0) = 4; A(1, 1) = 5; A(1, 2) = 6;
std::cout << A;
return 0;
}
It can be easily built by using the Makefile included in the cpplapack itself.
cp ~/local/cpplapack/makefiles/Makefile ./
make
./A.OUT
If it is displayed as below, it is OK.
1 2 3
4 5 6
Recommended Posts