jdevinney / bale_old

A collection of buffered communication libraries and some mini-applications.
8 stars 10 forks source link

Clarification on semantics of convey_begin for elastic conveyors #6

Open agrippa opened 4 years ago

agrippa commented 4 years ago

While reading through the documentation in convey.h, I found myself confused on the semantics of the item_bytes parameter to convey_begin when I'm calling convey_begin on an elastic conveyor. Since an elastic conveyor can take items of different sizes and item_bytes sets the size of items in a conveyor, there seemed to be a contradiction.

Originally my thought was that elastic conveyors can accept different item sizes, but only in different stages of the program. That is you would have to call begin and reset repeatedly on the same conveyor to get it to accept different item sizes. But the section on elastic conveyors in your paper didn't seem to be saying this, and that use case seemed less than useful anyway...

I believe the correct interpretation is that elastic conveyors can accept any items up to the maximum size at any time as long as you use epull/epush, but because you can also call vanilla push/pull on an elastic conveyor the item_size set by convey_begin still constrains the permissible arguments to those calls (without constraining epull/epush). Is that correct?