1

I compiled GSL and OpenBLAS from source with all default options in both cases. My GSL libraries are installed in /usr/local/lib and OpenBLAS in /opt/OpenBLAS/lib. How do I use OpenBLAS with GSL in C++?

The main reason I am doing this is because OpenBLAS utilizes all cores which Atlas does not in default configuration. My main aim is to multiply two large matrices (10000 x 10000) and perform 2D convolutions. Is there a better alternative to OpenBLAS or GSL for this?

I am using:

  • Linux Mint 17.2
  • GCC version 4.8.4
  • 20 Core Intel CPU

I have been experimenting with the same thing in Octave with OpenBLAS. Will I get a significant performance improvement by using C++?

Shubham Gupta
  • 93
  • 1
  • 6

1 Answers1

2

I would use an existing linear algebra library like Armadillo. AFAIK it wraps your BLAS implementation for matrix multiplications. I like it because it provides you with a syntax very similar to the one in Matlab or Octave.

Other linear algebra libraries like Eigen will also do the job.

But i do not expect them to perform (much) better than Octave or Matlab as long as the call to the underlying library remains same. Also checkout why matlab is so fast and how armadillo is parallelized.

Community
  • 1
  • 1
Maikel
  • 1,204
  • 7
  • 19