comparison liboctave/dMatrix.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
1014 1014
1015 F77_FUNC (zffti, ZFFTI) (npts, pwsave); 1015 F77_FUNC (zffti, ZFFTI) (npts, pwsave);
1016 1016
1017 for (octave_idx_type j = 0; j < nsamples; j++) 1017 for (octave_idx_type j = 0; j < nsamples; j++)
1018 { 1018 {
1019 OCTAVE_QUIT; 1019 octave_quit ();
1020 1020
1021 F77_FUNC (zfftf, ZFFTF) (npts, &tmp_data[npts*j], pwsave); 1021 F77_FUNC (zfftf, ZFFTF) (npts, &tmp_data[npts*j], pwsave);
1022 } 1022 }
1023 1023
1024 return retval; 1024 return retval;
1055 1055
1056 F77_FUNC (zffti, ZFFTI) (npts, pwsave); 1056 F77_FUNC (zffti, ZFFTI) (npts, pwsave);
1057 1057
1058 for (octave_idx_type j = 0; j < nsamples; j++) 1058 for (octave_idx_type j = 0; j < nsamples; j++)
1059 { 1059 {
1060 OCTAVE_QUIT; 1060 octave_quit ();
1061 1061
1062 F77_FUNC (zfftb, ZFFTB) (npts, &tmp_data[npts*j], pwsave); 1062 F77_FUNC (zfftb, ZFFTB) (npts, &tmp_data[npts*j], pwsave);
1063 } 1063 }
1064 1064
1065 for (octave_idx_type j = 0; j < npts*nsamples; j++) 1065 for (octave_idx_type j = 0; j < npts*nsamples; j++)
1099 1099
1100 F77_FUNC (zffti, ZFFTI) (npts, pwsave); 1100 F77_FUNC (zffti, ZFFTI) (npts, pwsave);
1101 1101
1102 for (octave_idx_type j = 0; j < nsamples; j++) 1102 for (octave_idx_type j = 0; j < nsamples; j++)
1103 { 1103 {
1104 OCTAVE_QUIT; 1104 octave_quit ();
1105 1105
1106 F77_FUNC (zfftf, ZFFTF) (npts, &tmp_data[npts*j], pwsave); 1106 F77_FUNC (zfftf, ZFFTF) (npts, &tmp_data[npts*j], pwsave);
1107 } 1107 }
1108 1108
1109 npts = nc; 1109 npts = nc;
1118 1118
1119 F77_FUNC (zffti, ZFFTI) (npts, pwsave); 1119 F77_FUNC (zffti, ZFFTI) (npts, pwsave);
1120 1120
1121 for (octave_idx_type j = 0; j < nsamples; j++) 1121 for (octave_idx_type j = 0; j < nsamples; j++)
1122 { 1122 {
1123 OCTAVE_QUIT; 1123 octave_quit ();
1124 1124
1125 for (octave_idx_type i = 0; i < npts; i++) 1125 for (octave_idx_type i = 0; i < npts; i++)
1126 prow[i] = tmp_data[i*nr + j]; 1126 prow[i] = tmp_data[i*nr + j];
1127 1127
1128 F77_FUNC (zfftf, ZFFTF) (npts, prow, pwsave); 1128 F77_FUNC (zfftf, ZFFTF) (npts, prow, pwsave);
1165 1165
1166 F77_FUNC (zffti, ZFFTI) (npts, pwsave); 1166 F77_FUNC (zffti, ZFFTI) (npts, pwsave);
1167 1167
1168 for (octave_idx_type j = 0; j < nsamples; j++) 1168 for (octave_idx_type j = 0; j < nsamples; j++)
1169 { 1169 {
1170 OCTAVE_QUIT; 1170 octave_quit ();
1171 1171
1172 F77_FUNC (zfftb, ZFFTB) (npts, &tmp_data[npts*j], pwsave); 1172 F77_FUNC (zfftb, ZFFTB) (npts, &tmp_data[npts*j], pwsave);
1173 } 1173 }
1174 1174
1175 for (octave_idx_type j = 0; j < npts*nsamples; j++) 1175 for (octave_idx_type j = 0; j < npts*nsamples; j++)
1187 1187
1188 F77_FUNC (zffti, ZFFTI) (npts, pwsave); 1188 F77_FUNC (zffti, ZFFTI) (npts, pwsave);
1189 1189
1190 for (octave_idx_type j = 0; j < nsamples; j++) 1190 for (octave_idx_type j = 0; j < nsamples; j++)
1191 { 1191 {
1192 OCTAVE_QUIT; 1192 octave_quit ();
1193 1193
1194 for (octave_idx_type i = 0; i < npts; i++) 1194 for (octave_idx_type i = 0; i < npts; i++)
1195 prow[i] = tmp_data[i*nr + j]; 1195 prow[i] = tmp_data[i*nr + j];
1196 1196
1197 F77_FUNC (zfftb, ZFFTB) (npts, prow, pwsave); 1197 F77_FUNC (zfftb, ZFFTB) (npts, prow, pwsave);
3294 Matrix result (nr, nc); 3294 Matrix result (nr, nc);
3295 3295
3296 for (octave_idx_type j = 0; j < nc; j++) 3296 for (octave_idx_type j = 0; j < nc; j++)
3297 for (octave_idx_type i = 0; i < nr; i++) 3297 for (octave_idx_type i = 0; i < nr; i++)
3298 { 3298 {
3299 OCTAVE_QUIT; 3299 octave_quit ();
3300 result (i, j) = xmin (d, m (i, j)); 3300 result (i, j) = xmin (d, m (i, j));
3301 } 3301 }
3302 3302
3303 return result; 3303 return result;
3304 } 3304 }
3314 Matrix result (nr, nc); 3314 Matrix result (nr, nc);
3315 3315
3316 for (octave_idx_type j = 0; j < nc; j++) 3316 for (octave_idx_type j = 0; j < nc; j++)
3317 for (octave_idx_type i = 0; i < nr; i++) 3317 for (octave_idx_type i = 0; i < nr; i++)
3318 { 3318 {
3319 OCTAVE_QUIT; 3319 octave_quit ();
3320 result (i, j) = xmin (m (i, j), d); 3320 result (i, j) = xmin (m (i, j), d);
3321 } 3321 }
3322 3322
3323 return result; 3323 return result;
3324 } 3324 }
3341 Matrix result (nr, nc); 3341 Matrix result (nr, nc);
3342 3342
3343 for (octave_idx_type j = 0; j < nc; j++) 3343 for (octave_idx_type j = 0; j < nc; j++)
3344 for (octave_idx_type i = 0; i < nr; i++) 3344 for (octave_idx_type i = 0; i < nr; i++)
3345 { 3345 {
3346 OCTAVE_QUIT; 3346 octave_quit ();
3347 result (i, j) = xmin (a (i, j), b (i, j)); 3347 result (i, j) = xmin (a (i, j), b (i, j));
3348 } 3348 }
3349 3349
3350 return result; 3350 return result;
3351 } 3351 }
3361 Matrix result (nr, nc); 3361 Matrix result (nr, nc);
3362 3362
3363 for (octave_idx_type j = 0; j < nc; j++) 3363 for (octave_idx_type j = 0; j < nc; j++)
3364 for (octave_idx_type i = 0; i < nr; i++) 3364 for (octave_idx_type i = 0; i < nr; i++)
3365 { 3365 {
3366 OCTAVE_QUIT; 3366 octave_quit ();
3367 result (i, j) = xmax (d, m (i, j)); 3367 result (i, j) = xmax (d, m (i, j));
3368 } 3368 }
3369 3369
3370 return result; 3370 return result;
3371 } 3371 }
3381 Matrix result (nr, nc); 3381 Matrix result (nr, nc);
3382 3382
3383 for (octave_idx_type j = 0; j < nc; j++) 3383 for (octave_idx_type j = 0; j < nc; j++)
3384 for (octave_idx_type i = 0; i < nr; i++) 3384 for (octave_idx_type i = 0; i < nr; i++)
3385 { 3385 {
3386 OCTAVE_QUIT; 3386 octave_quit ();
3387 result (i, j) = xmax (m (i, j), d); 3387 result (i, j) = xmax (m (i, j), d);
3388 } 3388 }
3389 3389
3390 return result; 3390 return result;
3391 } 3391 }
3408 Matrix result (nr, nc); 3408 Matrix result (nr, nc);
3409 3409
3410 for (octave_idx_type j = 0; j < nc; j++) 3410 for (octave_idx_type j = 0; j < nc; j++)
3411 for (octave_idx_type i = 0; i < nr; i++) 3411 for (octave_idx_type i = 0; i < nr; i++)
3412 { 3412 {
3413 OCTAVE_QUIT; 3413 octave_quit ();
3414 result (i, j) = xmax (a (i, j), b (i, j)); 3414 result (i, j) = xmax (a (i, j), b (i, j));
3415 } 3415 }
3416 3416
3417 return result; 3417 return result;
3418 } 3418 }