You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the file definitions.h we have several typedefs for containers of XxxPulse containers (see bottom of post).
I've been going round the way memory is allocated during I/O all afternoon, and I've come to the conclusion these aren't useful. The scheme I planned out with Ben is that each container of XxxPulses resulting from a particular source is stored in a branch. That means I have to be able to pass the address of each container to the tree, and it will stream to and from those memory locations. This is not compatible with the containers that have been typedef below because they all store the XxxPulse containers by value, and STL containers reserve the right to reorder things in memory, meaning I can't do
and furthermore it isn't sensible to pass in pointers to known locations, then refer to these when to create a map - it would require mass copying of the vector each time. Much more efficient to have maps where the value_type is a pointer.
So the I/O is not going to use these containers internally, and as a result it isn't ever going to accept or return one. Would it be sensible to replace them containers of pointers?
Oh come now, we don't follow any of the conventions in that guide (or any other, AFAIK). Why single that one out for special treatment? =)
Less flippantly, I like that there are typedefs for some of these (the ones we actually use), since they are central enough to be practically be classes---in a bigger project, they almost certainly would be. It's just they are currently defined to types I can't make use of.
In the file
definitions.h
we have several typedefs for containers of XxxPulse containers (see bottom of post).I've been going round the way memory is allocated during I/O all afternoon, and I've come to the conclusion these aren't useful. The scheme I planned out with Ben is that each container of XxxPulses resulting from a particular source is stored in a branch. That means I have to be able to pass the address of each container to the tree, and it will stream to and from those memory locations. This is not compatible with the containers that have been typedef below because they all store the XxxPulse containers by value, and STL containers reserve the right to reorder things in memory, meaning I can't do
and furthermore it isn't sensible to pass in pointers to known locations, then refer to these when to create a map - it would require mass copying of the vector each time. Much more efficient to have maps where the value_type is a pointer.
So the I/O is not going to use these containers internally, and as a result it isn't ever going to accept or return one. Would it be sensible to replace them containers of pointers?
The text was updated successfully, but these errors were encountered: