Fortran style multidimensional arrays in C ++

Is there a C ++ library that provides Fortran multidimensional arrays with support for slicing, passing in both procedural parameter and decent documentation? I looked at blitz ++ , but its dead!

+6
source share
2 answers

I suggest Armadillo :

Armadillo - C ++ linear algebra library (mathematical mathematics), aimed at achieving a good balance between speed and ease of use

This is the C ++ template library:

A delayed-estimation approach is used (at compile time) to combine several operations into one and reduce (or eliminate) the need for temporary; this is automatically done through template metaprograms

A simple example from a web page:

#include <iostream> #include <armadillo> int main(int argc, char** argv) { arma::mat A = arma::randu<arma::mat>(4,5); arma::mat B = arma::randu<arma::mat>(4,5); std::cout << A*Bt() << std::endl; return 0; } 
+1
source

If you use OSX, you can use the vDSP libraries for free.

If you want to deploy across Windows objects, then either license intel equivalents (MKL), or I think AMD vector text libraries (ACML) are free.

0
source

Source: https://habr.com/ru/post/910555/


All Articles