octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #54100] fread using SKIP larger than zero is e


From: Rik
Subject: [Octave-bug-tracker] [bug #54100] fread using SKIP larger than zero is extremely slow
Date: Mon, 23 Jul 2018 19:04:57 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Update of bug #54100 (project octave):

                  Status:               Confirmed => In Progress            

    _______________________________________________________

Follow-up Comment #16:

I think this is a good start.  The improvements in speed are impressive.  For
testing, try


cd test
test io.tst


In this case, at least one of the tests is failing because while the
block_size is correct, it doesn't read N_blocks.



block_size: 2
N_block: 262144
***** test
 [id, msg] = tmpfile ();
 if (id < 0)
   __printf_assert__ ("tmpfile failed: %s\n", msg);
 else
   unwind_protect
     fwrite (id, char (0:15));
     frewind (id);
     [data, count] = fread (id, inf, "2*uint8", 2);
     assert (data, [0; 1; 4; 5; 8; 9; 12; 13]);
     assert (count, 8);
   unwind_protect_cleanup
     fclose (id);
   end_unwind_protect
 endif
!!!!! test failed
ASSERT errors for:  assert (data,[0; 1; 4; 5; 8; 9; 12; 13])

  Location  |  Observed  |  Expected  |  Reason
     .          O(4x1)       E(8x1)      Dimensions don't match
octave:7>  [id, msg] = tmpfile ();
octave:8>     fwrite (id, char (0:15));
octave:9>      frewind (id);
octave:10>      [data, count] = fread (id, inf, "2*uint8", 2);
while
block_size: 2
N_block: 262144
octave:11> count
count =  4
octave:12> data
data =

   0
   1
   4
   5





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54100>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]