FairMQ
FairMQ copied to clipboard
Support min alignment in ChannelResource
Related to #265
How is MinAlignment set? is it something that can be set "globally"? (say once per factory or so?)
It would be per factory, but one could create more than one per factory as before, see usage in the unit test in this PR. The TransportFactory::GetMemoryResource()
is unchanged.
ok, so it looks essentially like the workaround we have in O2 (@ktf ?). This would give us no further advantage aside from not having this specific allocator in our code base. How about the thing we briefly discussed with @rbx (https://github.com/AliceO2Group/AliceO2/pull/3674#issuecomment-643357655) for a bit more transparency?
ok, so it looks essentially like the workaround we have in O2 (@ktf ?). This would give us no further advantage aside from not having this specific allocator in our code base.
Yes, it is nothing more.
How about the thing we briefly discussed with @rbx (AliceO2Group/AliceO2#3674 (comment)) for a bit more transparency?
Sure, I am fine with making the default alignment configurable on that API layer, too.
Just the same question for my understanding, whats the improvement over just using the pmr interface above to create messages? Or, in other words, what makes the pmr solution - even if only a specialized pmr class in O2 repo - just a workaorund? Are we just talking about API design or is there any technical difference you want to see?
@dennisklein I'd say it is about API design mostly, technically we have all the pieces, but just would like to avoid confusion. TransportFactory::GetMemoryResource() (and the implicit conversion operator) are just too seductive not to use :) Just saying it could be potentially dangerous if the default API (above) and the thing we actually need (explicitly constructed allocator as it is now) return the same thing different only in subtle ways like (over-)alignment.