octave-maintainers
[Top][All Lists]
Advanced

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

OCTAVE_LOCAL_BUFFER


From: Jaroslav Hajek
Subject: OCTAVE_LOCAL_BUFFER
Date: Thu, 4 Dec 2008 18:25:37 +0100

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

Attachment: local-buffer.diff
Description: Text Data


reply via email to

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