comparison src/ov-re-diag.cc @ 10315:57a59eae83cc

untabify src C++ source files
author John W. Eaton <jwe@octave.org>
date Thu, 11 Feb 2010 12:41:46 -0500
parents f80c566bc751
children 0eb323b71957
comparison
equal deleted inserted replaced
10314:07ebe522dac2 10315:57a59eae83cc
185 Matrix m = Matrix (matrix.diag ()); 185 Matrix m = Matrix (matrix.diag ());
186 save_type st = LS_DOUBLE; 186 save_type st = LS_DOUBLE;
187 if (save_as_floats) 187 if (save_as_floats)
188 { 188 {
189 if (m.too_large_for_float ()) 189 if (m.too_large_for_float ())
190 { 190 {
191 warning ("save: some values too large to save as floats --"); 191 warning ("save: some values too large to save as floats --");
192 warning ("save: saving as doubles instead"); 192 warning ("save: saving as doubles instead");
193 } 193 }
194 else 194 else
195 st = LS_FLOAT; 195 st = LS_FLOAT;
196 } 196 }
197 else if (matrix.length () > 8192) // FIXME -- make this configurable. 197 else if (matrix.length () > 8192) // FIXME -- make this configurable.
198 { 198 {
199 double max_val, min_val; 199 double max_val, min_val;
200 if (m.all_integers (max_val, min_val)) 200 if (m.all_integers (max_val, min_val))
201 st = get_save_type (max_val, min_val); 201 st = get_save_type (max_val, min_val);
202 } 202 }
203 203
204 const double *mtmp = m.data (); 204 const double *mtmp = m.data ();
205 write_doubles (os, mtmp, st, m.numel ()); 205 write_doubles (os, mtmp, st, m.numel ());
206 206
207 return true; 207 return true;
208 } 208 }
209 209
210 bool 210 bool
211 octave_diag_matrix::load_binary (std::istream& is, bool swap, 211 octave_diag_matrix::load_binary (std::istream& is, bool swap,
212 oct_mach_info::float_format fmt) 212 oct_mach_info::float_format fmt)
213 { 213 {
214 int32_t r, c; 214 int32_t r, c;
215 char tmp; 215 char tmp;
216 if (! (is.read (reinterpret_cast<char *> (&r), 4) 216 if (! (is.read (reinterpret_cast<char *> (&r), 4)
217 && is.read (reinterpret_cast<char *> (&c), 4) 217 && is.read (reinterpret_cast<char *> (&c), 4)