ManagedArray reallocation/copy/size semantics.
- Dominant language
- C++
- Stars
- 111
- Forks
- 23
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
There is no functionality to "invalidate" a copy of a ManagedArray nor query if it has been invalidated. I strongly believe any copy of a ManagedArray should maintain it's relationship to the underlying allocations it is pointing to, this upholds proper reference semantics copying and is why pointer records exist.
This tests the behavior changed in the `size` member function of a MA seen above. Perhaps this points to a disconnect between the expected behavior of a MA and a gap in the interface. Chai needs to either be explicit about invalidating copies upon reallocation or maintain correct relationships between.
_Originally posted by @mdavis36 in https://github.com/LLNL/CHAI/pull/298#discussion_r2257777514_
Contributor guide
Research direction
Start with the ManagedArray size member function and the behavior discussed in PR #298, including the linked discussion. Clarify the intended copy and reallocation semantics, then identify or add coverage for invalidation and relationship behavior; done requires an agreed interface and tests that verify it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100