OCTAVE_LOCAL_BUFFER
Jaroslav Hajek
highegg at gmail.com
Thu Dec 4 11:25:37 CST 2008
hi,
currently, OCTAVE_LOCAL_BUFFER is implemented using std::vector, which
has several drawbacks:
1. often doesn't work with bool (std::vector<bool> is not a proper container)
2. is not local (always on heap)
3. always includes the full <vector> header (no big deal, but still)
please see the attached patch that aims to overcome the problem.
The idea is that if dynamic arrays are detected, the buffer is made on
stack if the requested size is small enough, otherwise a simplistic
wrapper class is used that ensures proper destruction.
Note that this is made against a little older snapshot and so may not
apply cleanly.
regards
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: local-buffer.diff
Type: text/x-diff
Size: 24670 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20081204/6ecbbf99/attachment-0001.bin
More information about the Octave-maintainers
mailing list