comparison data/fileio/MatrixFile.cpp @ 555:8accc7969c1c

* Some steps to avoid backward seeks in MatrixFile in common use cases
author Chris Cannam
date Mon, 09 Feb 2009 11:38:08 +0000
parents 60482f13e627
children 8212c9d3b3b3
comparison
equal deleted inserted replaced
554:60482f13e627 555:8accc7969c1c
415 415
416 m_readyToReadColumn = -1; // not ready, unless this is subsequently re-set 416 m_readyToReadColumn = -1; // not ready, unless this is subsequently re-set
417 417
418 off_t off = m_headerSize + x * m_height * m_cellSize + x; 418 off_t off = m_headerSize + x * m_height * m_cellSize + x;
419 419
420 #ifdef DEBUG_MATRIX_FILE_READ_SET
420 if (m_mode == ReadOnly) { 421 if (m_mode == ReadOnly) {
421 std::cerr << "MatrixFile[" << m_fd << "]::seekTo(" << x << "): off = " << off << std::endl; 422 std::cerr << "MatrixFile[" << m_fd << "]::seekTo(" << x << "): off = " << off << std::endl;
422 } 423 }
424 #endif
423 425
424 #ifdef DEBUG_MATRIX_FILE_READ_SET 426 #ifdef DEBUG_MATRIX_FILE_READ_SET
425 std::cerr << "MatrixFile[" << m_fd << "]::seekTo(" << x << "): off = " << off << std::endl; 427 std::cerr << "MatrixFile[" << m_fd << "]::seekTo(" << x << "): off = " << off << std::endl;
426 #endif 428 #endif
427 429