Mercurial > octave
comparison liboctave/fMatrix.cc @ 10142:829e69ec3110
make OCTAVE_QUIT a function
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 20 Jan 2010 10:38:00 +0100 |
parents | f80c566bc751 |
children | 4c0cdbe0acca |
comparison
equal
deleted
inserted
replaced
10141:e409546ac0a8 | 10142:829e69ec3110 |
---|---|
1013 | 1013 |
1014 F77_FUNC (cffti, CFFTI) (npts, pwsave); | 1014 F77_FUNC (cffti, CFFTI) (npts, pwsave); |
1015 | 1015 |
1016 for (octave_idx_type j = 0; j < nsamples; j++) | 1016 for (octave_idx_type j = 0; j < nsamples; j++) |
1017 { | 1017 { |
1018 OCTAVE_QUIT; | 1018 octave_quit (); |
1019 | 1019 |
1020 F77_FUNC (cfftf, CFFTF) (npts, &tmp_data[npts*j], pwsave); | 1020 F77_FUNC (cfftf, CFFTF) (npts, &tmp_data[npts*j], pwsave); |
1021 } | 1021 } |
1022 | 1022 |
1023 return retval; | 1023 return retval; |
1054 | 1054 |
1055 F77_FUNC (cffti, CFFTI) (npts, pwsave); | 1055 F77_FUNC (cffti, CFFTI) (npts, pwsave); |
1056 | 1056 |
1057 for (octave_idx_type j = 0; j < nsamples; j++) | 1057 for (octave_idx_type j = 0; j < nsamples; j++) |
1058 { | 1058 { |
1059 OCTAVE_QUIT; | 1059 octave_quit (); |
1060 | 1060 |
1061 F77_FUNC (cfftb, CFFTB) (npts, &tmp_data[npts*j], pwsave); | 1061 F77_FUNC (cfftb, CFFTB) (npts, &tmp_data[npts*j], pwsave); |
1062 } | 1062 } |
1063 | 1063 |
1064 for (octave_idx_type j = 0; j < npts*nsamples; j++) | 1064 for (octave_idx_type j = 0; j < npts*nsamples; j++) |
1098 | 1098 |
1099 F77_FUNC (cffti, CFFTI) (npts, pwsave); | 1099 F77_FUNC (cffti, CFFTI) (npts, pwsave); |
1100 | 1100 |
1101 for (octave_idx_type j = 0; j < nsamples; j++) | 1101 for (octave_idx_type j = 0; j < nsamples; j++) |
1102 { | 1102 { |
1103 OCTAVE_QUIT; | 1103 octave_quit (); |
1104 | 1104 |
1105 F77_FUNC (cfftf, CFFTF) (npts, &tmp_data[npts*j], pwsave); | 1105 F77_FUNC (cfftf, CFFTF) (npts, &tmp_data[npts*j], pwsave); |
1106 } | 1106 } |
1107 | 1107 |
1108 npts = nc; | 1108 npts = nc; |
1117 | 1117 |
1118 F77_FUNC (cffti, CFFTI) (npts, pwsave); | 1118 F77_FUNC (cffti, CFFTI) (npts, pwsave); |
1119 | 1119 |
1120 for (octave_idx_type j = 0; j < nsamples; j++) | 1120 for (octave_idx_type j = 0; j < nsamples; j++) |
1121 { | 1121 { |
1122 OCTAVE_QUIT; | 1122 octave_quit (); |
1123 | 1123 |
1124 for (octave_idx_type i = 0; i < npts; i++) | 1124 for (octave_idx_type i = 0; i < npts; i++) |
1125 prow[i] = tmp_data[i*nr + j]; | 1125 prow[i] = tmp_data[i*nr + j]; |
1126 | 1126 |
1127 F77_FUNC (cfftf, CFFTF) (npts, prow, pwsave); | 1127 F77_FUNC (cfftf, CFFTF) (npts, prow, pwsave); |
1164 | 1164 |
1165 F77_FUNC (cffti, CFFTI) (npts, pwsave); | 1165 F77_FUNC (cffti, CFFTI) (npts, pwsave); |
1166 | 1166 |
1167 for (octave_idx_type j = 0; j < nsamples; j++) | 1167 for (octave_idx_type j = 0; j < nsamples; j++) |
1168 { | 1168 { |
1169 OCTAVE_QUIT; | 1169 octave_quit (); |
1170 | 1170 |
1171 F77_FUNC (cfftb, CFFTB) (npts, &tmp_data[npts*j], pwsave); | 1171 F77_FUNC (cfftb, CFFTB) (npts, &tmp_data[npts*j], pwsave); |
1172 } | 1172 } |
1173 | 1173 |
1174 for (octave_idx_type j = 0; j < npts*nsamples; j++) | 1174 for (octave_idx_type j = 0; j < npts*nsamples; j++) |
1186 | 1186 |
1187 F77_FUNC (cffti, CFFTI) (npts, pwsave); | 1187 F77_FUNC (cffti, CFFTI) (npts, pwsave); |
1188 | 1188 |
1189 for (octave_idx_type j = 0; j < nsamples; j++) | 1189 for (octave_idx_type j = 0; j < nsamples; j++) |
1190 { | 1190 { |
1191 OCTAVE_QUIT; | 1191 octave_quit (); |
1192 | 1192 |
1193 for (octave_idx_type i = 0; i < npts; i++) | 1193 for (octave_idx_type i = 0; i < npts; i++) |
1194 prow[i] = tmp_data[i*nr + j]; | 1194 prow[i] = tmp_data[i*nr + j]; |
1195 | 1195 |
1196 F77_FUNC (cfftb, CFFTB) (npts, prow, pwsave); | 1196 F77_FUNC (cfftb, CFFTB) (npts, prow, pwsave); |
3293 FloatMatrix result (nr, nc); | 3293 FloatMatrix result (nr, nc); |
3294 | 3294 |
3295 for (octave_idx_type j = 0; j < nc; j++) | 3295 for (octave_idx_type j = 0; j < nc; j++) |
3296 for (octave_idx_type i = 0; i < nr; i++) | 3296 for (octave_idx_type i = 0; i < nr; i++) |
3297 { | 3297 { |
3298 OCTAVE_QUIT; | 3298 octave_quit (); |
3299 result (i, j) = xmin (d, m (i, j)); | 3299 result (i, j) = xmin (d, m (i, j)); |
3300 } | 3300 } |
3301 | 3301 |
3302 return result; | 3302 return result; |
3303 } | 3303 } |
3313 FloatMatrix result (nr, nc); | 3313 FloatMatrix result (nr, nc); |
3314 | 3314 |
3315 for (octave_idx_type j = 0; j < nc; j++) | 3315 for (octave_idx_type j = 0; j < nc; j++) |
3316 for (octave_idx_type i = 0; i < nr; i++) | 3316 for (octave_idx_type i = 0; i < nr; i++) |
3317 { | 3317 { |
3318 OCTAVE_QUIT; | 3318 octave_quit (); |
3319 result (i, j) = xmin (m (i, j), d); | 3319 result (i, j) = xmin (m (i, j), d); |
3320 } | 3320 } |
3321 | 3321 |
3322 return result; | 3322 return result; |
3323 } | 3323 } |
3340 FloatMatrix result (nr, nc); | 3340 FloatMatrix result (nr, nc); |
3341 | 3341 |
3342 for (octave_idx_type j = 0; j < nc; j++) | 3342 for (octave_idx_type j = 0; j < nc; j++) |
3343 for (octave_idx_type i = 0; i < nr; i++) | 3343 for (octave_idx_type i = 0; i < nr; i++) |
3344 { | 3344 { |
3345 OCTAVE_QUIT; | 3345 octave_quit (); |
3346 result (i, j) = xmin (a (i, j), b (i, j)); | 3346 result (i, j) = xmin (a (i, j), b (i, j)); |
3347 } | 3347 } |
3348 | 3348 |
3349 return result; | 3349 return result; |
3350 } | 3350 } |
3360 FloatMatrix result (nr, nc); | 3360 FloatMatrix result (nr, nc); |
3361 | 3361 |
3362 for (octave_idx_type j = 0; j < nc; j++) | 3362 for (octave_idx_type j = 0; j < nc; j++) |
3363 for (octave_idx_type i = 0; i < nr; i++) | 3363 for (octave_idx_type i = 0; i < nr; i++) |
3364 { | 3364 { |
3365 OCTAVE_QUIT; | 3365 octave_quit (); |
3366 result (i, j) = xmax (d, m (i, j)); | 3366 result (i, j) = xmax (d, m (i, j)); |
3367 } | 3367 } |
3368 | 3368 |
3369 return result; | 3369 return result; |
3370 } | 3370 } |
3380 FloatMatrix result (nr, nc); | 3380 FloatMatrix result (nr, nc); |
3381 | 3381 |
3382 for (octave_idx_type j = 0; j < nc; j++) | 3382 for (octave_idx_type j = 0; j < nc; j++) |
3383 for (octave_idx_type i = 0; i < nr; i++) | 3383 for (octave_idx_type i = 0; i < nr; i++) |
3384 { | 3384 { |
3385 OCTAVE_QUIT; | 3385 octave_quit (); |
3386 result (i, j) = xmax (m (i, j), d); | 3386 result (i, j) = xmax (m (i, j), d); |
3387 } | 3387 } |
3388 | 3388 |
3389 return result; | 3389 return result; |
3390 } | 3390 } |
3407 FloatMatrix result (nr, nc); | 3407 FloatMatrix result (nr, nc); |
3408 | 3408 |
3409 for (octave_idx_type j = 0; j < nc; j++) | 3409 for (octave_idx_type j = 0; j < nc; j++) |
3410 for (octave_idx_type i = 0; i < nr; i++) | 3410 for (octave_idx_type i = 0; i < nr; i++) |
3411 { | 3411 { |
3412 OCTAVE_QUIT; | 3412 octave_quit (); |
3413 result (i, j) = xmax (a (i, j), b (i, j)); | 3413 result (i, j) = xmax (a (i, j), b (i, j)); |
3414 } | 3414 } |
3415 | 3415 |
3416 return result; | 3416 return result; |
3417 } | 3417 } |