Mercurial > octave-nkf
comparison libinterp/corefcn/oct-stream.h @ 17453:669ad11f282d
improve efficiency of fread
* oct-stream.cc, oct-stream.h (octave_stream::finalize_read,
convert_and_copy): New functions.
(TABLE_ELT): New macro.
(FILL_TABLE_ROW, conv_fptr): Update to new conversion function.
(do_read): Delete function.
(octave_stream::read): Read data in bigger chunks. Convert format
once all data has been read.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 19 Sep 2013 11:20:28 -0400 |
parents | 6690dba6078a |
children | d63878346099 |
comparison
equal
deleted
inserted
replaced
17452:68f9b3bf0840 | 17453:669ad11f282d |
---|---|
29 class octave_value_list; | 29 class octave_value_list; |
30 | 30 |
31 #include <iosfwd> | 31 #include <iosfwd> |
32 #include <sstream> | 32 #include <sstream> |
33 #include <string> | 33 #include <string> |
34 #include <list> | |
34 #include <map> | 35 #include <map> |
35 | 36 |
36 #include "Array.h" | 37 #include "Array.h" |
37 #include "data-conv.h" | 38 #include "data-conv.h" |
38 #include "lo-utils.h" | 39 #include "lo-utils.h" |
646 void invalid_operation (const std::string& who, const char *rw) | 647 void invalid_operation (const std::string& who, const char *rw) |
647 { | 648 { |
648 if (rep) | 649 if (rep) |
649 rep->invalid_operation (who, rw); | 650 rep->invalid_operation (who, rw); |
650 } | 651 } |
652 | |
653 octave_value | |
654 finalize_read (std::list<void *>& input_buf_list, | |
655 octave_idx_type input_buf_elts, | |
656 octave_idx_type elts_read, | |
657 octave_idx_type nr, octave_idx_type nc, | |
658 oct_data_conv::data_type input_type, | |
659 oct_data_conv::data_type output_type, | |
660 oct_mach_info::float_format ffmt); | |
651 }; | 661 }; |
652 | 662 |
653 class | 663 class |
654 OCTINTERP_API | 664 OCTINTERP_API |
655 octave_stream_list | 665 octave_stream_list |