diff options
author | Josh Blum | 2012-10-12 22:21:17 -0700 |
---|---|---|
committer | Josh Blum | 2012-10-12 22:21:17 -0700 |
commit | f9c854d3cdd0a9337b41842d15a13d6df4ece408 (patch) | |
tree | 466b1cc8e1470d7e202f1722e93196468d25fa19 /lib/gras_impl | |
parent | 9681d80c37794d66fd8a171efb4b047306b937d3 (diff) | |
download | sandhi-f9c854d3cdd0a9337b41842d15a13d6df4ece408.tar.gz sandhi-f9c854d3cdd0a9337b41842d15a13d6df4ece408.tar.bz2 sandhi-f9c854d3cdd0a9337b41842d15a13d6df4ece408.zip |
working on qa passing, temp input accumulation logic
Diffstat (limited to 'lib/gras_impl')
-rw-r--r-- | lib/gras_impl/input_buffer_queues.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/gras_impl/input_buffer_queues.hpp b/lib/gras_impl/input_buffer_queues.hpp index 5b610d1..a3ca1dc 100644 --- a/lib/gras_impl/input_buffer_queues.hpp +++ b/lib/gras_impl/input_buffer_queues.hpp @@ -212,6 +212,31 @@ GRAS_FORCE_INLINE SBuffer InputBufferQueues::front(const size_t i, const bool co GRAS_FORCE_INLINE void InputBufferQueues::__prepare(const size_t i) { + SBufferConfig config; + config.memory = NULL; + config.length = _enqueued_bytes[i]; + SBuffer newbuff(config); + newbuff.offset = 0; + newbuff.length = 0; + + while (not _queues[i].empty()) + { + std::memcpy(newbuff.get(newbuff.length), _queues[i].front().get(), _queues[i].front().length); + newbuff.length += _queues[i].front().length; + _queues[i].pop_front(); + } + + _queues[i].push_back(newbuff); + return; + + + + + + + + + //HERE(); //assumes that we are always pushing proper history buffs on front //ASSERT(_queues[i].front().length >= _history_bytes[i]); |