summaryrefslogtreecommitdiff
path: root/lib/block_task.cpp
diff options
context:
space:
mode:
authorJosh Blum2012-09-10 02:00:31 -0700
committerJosh Blum2012-09-10 02:00:31 -0700
commit4adb2a384bb06406ffaf3ca4f5a33e42f8a74491 (patch)
tree2e3839e3acc7792f3bb691e864245fdf31dbcac7 /lib/block_task.cpp
parent01a9ef2060e34b7cb6e8863e39854c5a0ae80b58 (diff)
downloadsandhi-4adb2a384bb06406ffaf3ca4f5a33e42f8a74491.tar.gz
sandhi-4adb2a384bb06406ffaf3ca4f5a33e42f8a74491.tar.bz2
sandhi-4adb2a384bb06406ffaf3ca4f5a33e42f8a74491.zip
switch to using sbuffer in gras impl
Diffstat (limited to 'lib/block_task.cpp')
-rw-r--r--lib/block_task.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/block_task.cpp b/lib/block_task.cpp
index c68ebee..7855619 100644
--- a/lib/block_task.cpp
+++ b/lib/block_task.cpp
@@ -31,8 +31,8 @@ void ElementImpl::mark_done(const tsbe::TaskInterface &task_iface)
{
if (this->output_bytes_offset[i] == 0) continue;
ASSERT(this->output_queues.ready(i));
- tsbe::Buffer &buff = this->output_queues.front(i);
- buff.get_length() = this->output_bytes_offset[i];
+ SBuffer &buff = this->output_queues.front(i);
+ buff.length = this->output_bytes_offset[i];
task_iface.post_downstream(i, buff);
this->output_queues.pop(i);
this->output_bytes_offset[i] = 0;
@@ -133,9 +133,9 @@ void ElementImpl::handle_task(const tsbe::TaskInterface &task_iface)
output_tokens_count += this->output_tokens[i].use_count();
ASSERT(this->output_queues.ready(i));
- const tsbe::Buffer &buff = this->output_queues.front(i);
- char *mem = ((char *)buff.get_memory()) + this->output_bytes_offset[i];
- const size_t bytes = buff.get_length() - this->output_bytes_offset[i];
+ const SBuffer &buff = this->output_queues.front(i);
+ char *mem = ((char *)buff.get()) + this->output_bytes_offset[i];
+ const size_t bytes = buff.length - this->output_bytes_offset[i];
const size_t items = bytes/this->output_items_sizes[i];
this->work_io_ptr_mask |= ptrdiff_t(mem);
@@ -223,8 +223,8 @@ void ElementImpl::handle_task(const tsbe::TaskInterface &task_iface)
//and then call work again on the real input buffer, but still yield one output buffer per input buffer.
if (input_allows_flush)
{
- tsbe::Buffer &buff = this->output_queues.front(i);
- buff.get_length() = this->output_bytes_offset[i];
+ SBuffer &buff = this->output_queues.front(i);
+ buff.length = this->output_bytes_offset[i];
task_iface.post_downstream(i, buff);
this->output_queues.pop(i);
this->output_bytes_offset[i] = 0;