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
I'm not sure why we use this approach to calculate layout(probably to keep the same with iceoryx in c++). I found we can rely on rust to calculate the layout as if we define a structure for the whole sample. Hence, sample_layout_genric::<i32, bool, i64>(2) works as if we define a structure S1:
I have the committed the change for you to check in my forked repo.
Do you think it's a better solution comparing with current one? Note that I don't know whether we have the compatible concerns, so please let me know if the underlying layout calculation is crucial.
@xieyuschen it seems that I can look at your proposal earliest the beginning of next week. But when wrote this piece of code I was still coming from the C++ world and was unaware of extend or pad_to_align in Layout so most likely your approach is the more idiomatic one.
If all corner cases are tested and the tests are passed for both approaches I would prefer your proposal.
@xieyuschen it seems that I can look at your proposal earliest the beginning of next week. But when wrote this piece of code I was still coming from the C++ world and was unaware of extend or pad_to_align in Layout so most likely your approach is the more idiomatic one.
If all corner cases are tested and the tests are passed for both approaches I would prefer your proposal.
Acked. The calculated layouts are different between the current approach and my proposal, so that's probably a concern for the compatibility issue. I will try to revise the existing code for the project to test, so we can know more about this approach when you dive into it next week.
Method
sample_layout
calculates the layout by appending and call functions with unsafe.iceoryx2/iceoryx2/src/service/static_config/message_type_details.rs
Lines 104 to 118 in ca22976
I'm not sure why we use this approach to calculate layout(probably to keep the same with iceoryx in c++). I found we can rely on rust to calculate the layout as if we define a structure for the whole sample. Hence,
sample_layout_genric::<i32, bool, i64>(2)
works as if we define a structureS1
:The sample_layout_genric is shown below:
I have the committed the change for you to check in my forked repo.
Do you think it's a better solution comparing with current one? Note that I don't know whether we have the compatible concerns, so please let me know if the underlying layout calculation is crucial.
@elfenpiff @elBoberido @orecham
The text was updated successfully, but these errors were encountered: