[Genabel-commits] r1614 - pkg/OmicABELnoMM/src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Feb 18 16:16:03 CET 2014
Author: afrank
Date: 2014-02-18 16:16:03 +0100 (Tue, 18 Feb 2014)
New Revision: 1614
Modified:
pkg/OmicABELnoMM/src/Algorithm.cpp
Log:
Removed Variable Length Arrays VLA warnings casued by static arrays when using pedantic g++ flag .
Modified: pkg/OmicABELnoMM/src/Algorithm.cpp
===================================================================
--- pkg/OmicABELnoMM/src/Algorithm.cpp 2014-02-18 12:45:22 UTC (rev 1613)
+++ pkg/OmicABELnoMM/src/Algorithm.cpp 2014-02-18 15:16:03 UTC (rev 1614)
@@ -353,13 +353,22 @@
}
cout << endl;
+
- type_precision Stl[l*l];
- type_precision Str[l*r*a_block_size];
+ //type_precision Stl[l*l];
+ //type_precision Str[l*r*a_block_size];
+ type_precision* Stl = new type_precision[l*l];
+ type_precision* Str = new type_precision[l*r*a_block_size];
+
+ type_precision* Sbr = new type_precision[r * r * a_block_size];
+ type_precision* Ay = new type_precision[p * a_block_size];
+
+ type_precision* S = new type_precision[p * p];
-
type_precision* Ay_top = new type_precision[l * y_amount];
- type_precision* Ay_bot = new type_precision[y_block_size * a_block_size * r];
+ type_precision* Ay_bot = new type_precision[y_block_size * a_block_size * r];
+
+ list<long int>* y_nan_idxs = new list<long int>[y_block_size];
type_precision* AR = new type_precision[n * r * a_block_size * 1];
type_precision* AL = new type_precision[n * l * 1];
@@ -391,8 +400,8 @@
AIOfile.load_Yblock(&Y, y_block_size);
- list<long int> y_nan_idxs[y_block_size];
+
//int total_y_nans = replace_nans(&y_nan_idxs[0], Y, n, y_block_size);
replace_nans(&y_nan_idxs[0], Y, n, y_block_size);
@@ -461,9 +470,10 @@
cpu_freq);
- type_precision Sbr[r * r * a_block_size];
- type_precision Ay[p * a_block_size];
+ //type_precision Sbr[r * r * a_block_size];
+ //type_precision Ay[p * a_block_size];
+
#pragma omp for nowait schedule(dynamic)
for (int ii= 0; ii < a_block_size; ii++)
{
@@ -484,9 +494,10 @@
&Ay[l+ii*p], r);
- //type_precision* B = Ay;
- type_precision S[p * p];
+ //type_precision* B = Ay;
+ //type_precision S[p * p];
+
//! Rebuild S
build_S(S, Stl, &Str[ii*r*l], &Sbr[ii*r*r], l, r);
// matlab_print_matrix("S", p, p, S);
@@ -539,7 +550,13 @@
delete []Ay_top;
delete []Ay_bot;
delete []AR;
- delete []AL;
+ delete []AL;
+ delete []Stl;
+ delete []Str;
+ delete []Sbr;
+ delete []Ay;
+ delete []S;
+ delete []y_nan_idxs;
// delete []backupAL;
// delete []backupAR;
}
More information about the Genabel-commits
mailing list