Skip to content

Commit

Permalink
Changed depricated nelem() to numel() in OCT files
Browse files Browse the repository at this point in the history
  • Loading branch information
susnak committed Nov 23, 2016
1 parent 2b80e05 commit f527e68
Show file tree
Hide file tree
Showing 19 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion oct/comp_dwilt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)

MArray<LTFAT_TYPE> f = ltfatOctArray<LTFAT_TYPE>(args(0));
MArray<LTFAT_TYPE> g = ltfatOctArray<LTFAT_TYPE>(args(1));
const octave_idx_type gl = g.nelem();
const octave_idx_type gl = g.numel();
const octave_idx_type W = f.columns();
const octave_idx_type L = f.rows();
const octave_idx_type N = L / M;
Expand Down
2 changes: 1 addition & 1 deletion oct/comp_dwiltiii.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)

MArray<LTFAT_TYPE> f = ltfatOctArray<LTFAT_TYPE>(args(0));
MArray<LTFAT_TYPE> g = ltfatOctArray<LTFAT_TYPE>(args(1));
const octave_idx_type gl = g.nelem();
const octave_idx_type gl = g.numel();
const octave_idx_type W = f.columns();
const octave_idx_type L = f.rows();
const octave_idx_type N = L / M;
Expand Down
2 changes: 1 addition & 1 deletion oct/comp_filterbank_fft.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)
// Number of channels
const octave_idx_type W = F.columns();
// Number of filters
const octave_idx_type M = G.nelem();
const octave_idx_type M = G.numel();

// Allocating temporary arrays
// Output subband lengths
Expand Down
2 changes: 1 addition & 1 deletion oct/comp_filterbank_fftbl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)
// Number of channels
const octave_idx_type W = F.columns();
// Number of filters
const octave_idx_type M = G.nelem();
const octave_idx_type M = G.numel();


OCTAVE_LOCAL_BUFFER (double, afrac, M);
Expand Down
2 changes: 1 addition & 1 deletion oct/comp_filterbank_td.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)
// Number of channels
const octave_idx_type W = f.columns();
// Number of filters
const octave_idx_type M = g.nelem();
const octave_idx_type M = g.numel();

// Allocating temporary arrays
// Filter lengts
Expand Down
2 changes: 1 addition & 1 deletion oct/comp_filterbankreassign.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ octFunction(const octave_value_list& args, int nargout)
Matrix aMat = args(3).matrix_value();
Matrix cfreqMat = args(4).matrix_value();

const ltfatInt M = (ltfatInt) sCell.nelem();
const ltfatInt M = (ltfatInt) sCell.numel();


OCTAVE_LOCAL_BUFFER (ltfatInt, NPtr, M);
Expand Down
2 changes: 1 addition & 1 deletion oct/comp_gga.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ octFunction(const octave_value_list& args, int nargout)
// Number of channels
const octave_idx_type W = f.columns();
// Number of coefficients
const octave_idx_type M = indVec.nelem();
const octave_idx_type M = indVec.numel();

//dims_out.chop_trailing_singletons();
MArray<LTFAT_COMPLEX> c(dim_vector(M,W));
Expand Down
2 changes: 1 addition & 1 deletion oct/comp_heapint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)
const octave_idx_type M = args(0).rows();
const octave_idx_type N = args(0).columns();
const octave_idx_type L = N * a;
const octave_idx_type W = s.nelem() / (M * N);
const octave_idx_type W = s.numel() / (M * N);

MArray<LTFAT_TYPE> phase(dim_vector(M, N, W));

Expand Down
2 changes: 1 addition & 1 deletion oct/comp_heapintreal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)
const octave_idx_type M2 = args(0).rows();
const octave_idx_type N = args(0).columns();
const octave_idx_type L = N * a;
const octave_idx_type W = s.nelem() / (M2 * N);
const octave_idx_type W = s.numel() / (M2 * N);

MArray<LTFAT_TYPE> phase(dim_vector(M2, N, W));

Expand Down
4 changes: 2 additions & 2 deletions oct/comp_idwilt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)
MArray<LTFAT_TYPE> g = ltfatOctArray<LTFAT_TYPE>(args(1));

const octave_idx_type M = c.rows() / 2;
const octave_idx_type gl = g.nelem();
const octave_idx_type gl = g.numel();
const octave_idx_type N = 2 * c.columns();
const octave_idx_type L = N * M;
const octave_idx_type W = c.nelem() / L;
const octave_idx_type W = c.numel() / L;

MArray<LTFAT_TYPE> f(dim_vector(L, W));

Expand Down
4 changes: 2 additions & 2 deletions oct/comp_idwiltiii.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)
MArray<LTFAT_TYPE> g = ltfatOctArray<LTFAT_TYPE>(args(1));

const octave_idx_type M = c.rows();
const octave_idx_type gl = g.nelem();
const octave_idx_type gl = g.numel();
const octave_idx_type N = c.columns();
const octave_idx_type L = N * M;
const octave_idx_type W = c.nelem() / L;
const octave_idx_type W = c.numel() / L;


MArray<LTFAT_TYPE> f(dim_vector(L, W));
Expand Down
2 changes: 1 addition & 1 deletion oct/comp_ifilterbank_fft.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)
// Number of channels
const octave_idx_type W = c.elem(0).columns();
// Number of filters
const octave_idx_type M = G.nelem();
const octave_idx_type M = G.numel();

// Output signal
MArray<LTFAT_COMPLEX> F(dim_vector(L, W));
Expand Down
4 changes: 2 additions & 2 deletions oct/comp_ifilterbank_fftbl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)
// Number of channels
const octave_idx_type W = c.elem(0).columns();
// Number of filters
const octave_idx_type M = G.nelem();
const octave_idx_type M = G.numel();

OCTAVE_LOCAL_BUFFER (double, afrac, M);
memcpy(afrac,a,M*sizeof(double));
Expand Down Expand Up @@ -86,7 +86,7 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)
GPtrs[m] = GElems[m].data();
cElems[m] = ltfatOctArray<LTFAT_COMPLEX>(c.elem(m));
cPtrs[m] = cElems[m].data();
Gl[m] = GElems[m].nelem();
Gl[m] = GElems[m].numel();
}

// Output length
Expand Down
4 changes: 2 additions & 2 deletions oct/comp_ifilterbank_td.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)
charMatrix extMat = args(5).char_matrix_value();
ltfatExtType ext = ltfatExtStringToEnum(extMat.row_as_string(0).c_str());
// Number of filters
const octave_idx_type M = g.nelem();
const octave_idx_type M = g.numel();

// Allocating temporary arrays
// Filter lengts
Expand All @@ -97,7 +97,7 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)
c_elems[m] = ltfatOctArray<LTFAT_TYPE>(c.elem(m));
gPtrs[m] = g_elems[m].data();
cPtrs[m] = c_elems[m].data();
filtLen[m] = (ltfatInt) g_elems[m].nelem();
filtLen[m] = (ltfatInt) g_elems[m].numel();
}

const octave_idx_type W = c_elems[0].columns();
Expand Down
2 changes: 1 addition & 1 deletion oct/comp_isepdgt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)
const octave_idx_type N = L / a;
const octave_idx_type gl = gf.rows();

const octave_idx_type W = coef.nelem() / (M * N);
const octave_idx_type W = coef.numel() / (M * N);

MArray<LTFAT_COMPLEX> f(dim_vector(L, W));

Expand Down
2 changes: 1 addition & 1 deletion oct/comp_isepdgtreal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)
const octave_idx_type ptype = args(5).int_value();
const octave_idx_type N = L / a;
const octave_idx_type M2 = M / 2 + 1;
const octave_idx_type W = coef.nelem() / (N * M2);
const octave_idx_type W = coef.numel() / (N * M2);
const octave_idx_type gl = gf.rows();

MArray<LTFAT_REAL> f(dim_vector(L, W));
Expand Down
2 changes: 1 addition & 1 deletion oct/comp_maskedheapint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)
const octave_idx_type M = args(0).rows();
const octave_idx_type N = args(0).columns();
const octave_idx_type L = N * a;
const octave_idx_type W = s.nelem() / (M * N);
const octave_idx_type W = s.numel() / (M * N);

MArray<LTFAT_REAL> phase(dim_vector(M, N, W));

Expand Down
2 changes: 1 addition & 1 deletion oct/comp_maskedheapintreal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ octave_value_list octFunction(const octave_value_list& args, int nargout)
const octave_idx_type M2 = args(0).rows();
const octave_idx_type N = args(0).columns();
const octave_idx_type L = N * a;
const octave_idx_type W = s.nelem() / (M2 * N);
const octave_idx_type W = s.numel() / (M2 * N);

MArray<LTFAT_REAL> phase(dim_vector(M2, N, W));

Expand Down
4 changes: 2 additions & 2 deletions oct/ltfat_oct_template_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ octave_value recastToSingle(const octave_value& ov)
{
Cell ov_cell = ov.cell_value();
Cell ovtmp_cell(ov.dims());
for(int jj=0;jj<ovtmp_cell.nelem();jj++)
for(int jj=0;jj<ovtmp_cell.numel();jj++)
{
ovtmp_cell(jj) = recastToSingle(ov_cell.elem(jj));
}
Expand Down Expand Up @@ -162,7 +162,7 @@ octave_value recastToComplex(const octave_value& ov)
{
Cell ov_cell = ov.cell_value();
Cell ovtmp_cell(ov.dims());
for(int jj=0;jj<ovtmp_cell.nelem();jj++)
for(int jj=0;jj<ovtmp_cell.numel();jj++)
{
ovtmp_cell(jj) = recastToComplex(ov_cell.elem(jj));
}
Expand Down

0 comments on commit f527e68

Please sign in to comment.