Skip to content
Snippets Groups Projects
Commit 54d66e14 authored by Carsten Gräser's avatar Carsten Gräser
Browse files

[cleanup] Replaced runtime-sized array by dynamic allocation

While gcc supports them (as extension) runtime sized arrays
are not standard c++. They are not even contained in c++14
but postponed to a later TS.
parent 11596fe4
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
#ifndef DUNE_DYNMATRIXEIGENVALUES_HH #ifndef DUNE_DYNMATRIXEIGENVALUES_HH
#define DUNE_DYNMATRIXEIGENVALUES_HH #define DUNE_DYNMATRIXEIGENVALUES_HH
#include <memory>
#include <dune/common/std/memory.hh>
#include "dynmatrix.hh" #include "dynmatrix.hh"
/*! /*!
...@@ -42,7 +46,7 @@ namespace Dune { ...@@ -42,7 +46,7 @@ namespace Dune {
// matrix to put into dgeev // matrix to put into dgeev
double matrixVector[N * N]; std::unique_ptr<double[]> matrixVector = Std::make_unique<double[]>(N*N);
// copy matrix // copy matrix
int row = 0; int row = 0;
...@@ -55,9 +59,9 @@ namespace Dune { ...@@ -55,9 +59,9 @@ namespace Dune {
} }
// working memory // working memory
double eigenR[N]; std::unique_ptr<double[]> eigenR = Std::make_unique<double[]>(N);
double eigenI[N]; std::unique_ptr<double[]> eigenI = Std::make_unique<double[]>(N);
double work[3*N]; std::unique_ptr<double[]> work = Std::make_unique<double[]>(3*N);
// return value information // return value information
long int info = 0; long int info = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment