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
will throw an error. What happens is that the MyStruct is created on a different buffer, and when assigning the field newstruct.refdata = thisref the ElementRefData is moved to the new buffer, but the Drift and Multipole elements themselves are not moved (this, or they are moved but their offsets are not correctly updated - I don't know which is the underlying issue).
I know this can be avoided by creating the ElementRefData in the same buffer as the MyStruct, but this cannot be done in my use case, because in practice the creation of ElementRefData is rather wastefull and creates a buffer that is several times larger than needed (which is an issue for xboinc).
The text was updated successfully, but these errors were encountered:
When moving a
Ref
(that itself points to an array ofRef
s) to another buffer, the original elements are not copied to that buffer.I don't know if that is intentional, but as it is now I do not have a way to move the original elements to the new buffer.
This is blocking the development of
xboinc
.MWE:
will throw an error. What happens is that the
MyStruct
is created on a different buffer, and when assigning the fieldnewstruct.refdata = thisref
theElementRefData
is moved to the new buffer, but theDrift
andMultipole
elements themselves are not moved (this, or they are moved but their offsets are not correctly updated - I don't know which is the underlying issue).I know this can be avoided by creating the
ElementRefData
in the same buffer as theMyStruct
, but this cannot be done in my use case, because in practice the creation ofElementRefData
is rather wastefull and creates a buffer that is several times larger than needed (which is an issue forxboinc
).The text was updated successfully, but these errors were encountered: