- Timestamp:
- 08/18/09 13:14:51 (15 years ago)
- Location:
- library/bdm/base
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/base/loggers.cpp
r477 r551 9 9 10 10 namespace bdm { 11 12 void memlog::init() { 13 int i; 14 int n = entries.length(); 15 vectors.set_size ( n ); 16 for ( i = 0; i < n; i++ ) { 17 vectors ( i ).set_size ( maxlen, entries ( i )._dsize() ); 18 19 // avoid uninitialized memory 20 for ( int j = 0; j < vectors ( i ).rows(); ++j ) { 21 for (int k = 0; k < vectors ( i ).cols(); ++k ) { 22 vectors ( i )(j, k) = 0; 23 } 24 } 25 } 26 } 27 11 28 void memlog::itsave ( const char* fname ) { 12 29 it_file itf ( fname ); -
library/bdm/base/loggers.h
r548 r551 41 41 42 42 //! Initialize storage 43 void init() { 44 int i; 45 int n = entries.length(); 46 vectors.set_size ( n ); 47 for ( i = 0; i < n; i++ ) { 48 vectors ( i ).set_size ( maxlen, entries ( i )._dsize() ); 49 } 50 } 43 void init(); 44 51 45 void step() { 52 46 if ( ind < maxlen ) ind++;