-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds an array reference type #1440
base: master
Are you sure you want to change the base?
Commits on Oct 14, 2024
-
The reference type, `RefBase<A, D, R>`, is parameterized by its element type, a dimensionality type, and its "referent" type. This last type is only a `PhantomData` marker, and acts to differentiate references that are "safe" from those that are "raw", i.e., references that come from an array whose storage is `Data` vs an array whose stoarge is `RawData`. The `DerefMut` implementation contains a check of uniqueness, guaranteeing that an `&mut RefBase` is safe to mutate. This comes with one breaking change and one important internal library note. The breaking change is that `ArrayBase` no longer implements `Copy` for views. This is because a `RefBase` does not know where it is pointing, and therefore cannot implement `Copy`; this, in turn, prohibits `ArrayBase` from implementing `Copy`. Users will now have to explicitly invoke `Clone` in the same way that they do for non-view arrays. The important library note has to do with the `.try_ensure_unique` check that occurs in the `DerefMut` implementation. The library's methods are allowed to *temporarily* break the invariant that an array's `ptr` is contained within `data`. The issue comes when trying to then alter `ptr`, `shape`, or `dim` while that invariant is broken. Code was using `self.ptr = ...` (where `self` is `ArrayBase`), which triggers `DerefMut`, which calls `try_ensure_unique`, which panics on the pointer inbounds check. As a result, code that is altering `RefBase` fields while the array's invariants are broken must be sure to write `self.aref.ptr = ...` instead.
Configuration menu - View commit details
-
Copy full SHA for 99722fa - Browse repository at this point
Copy the full SHA 99722faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 44079cc - Browse repository at this point
Copy the full SHA 44079ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d32c08 - Browse repository at this point
Copy the full SHA 3d32c08View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8bf86df - Browse repository at this point
Copy the full SHA 8bf86dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for dda4b66 - Browse repository at this point
Copy the full SHA dda4b66View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c75150 - Browse repository at this point
Copy the full SHA 3c75150View commit details -
Configuration menu - View commit details
-
Copy full SHA for 28fea66 - Browse repository at this point
Copy the full SHA 28fea66View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a180c1 - Browse repository at this point
Copy the full SHA 3a180c1View commit details -
Introduces LayoutRef and starts to move functionality from ArrayBase …
…to RefBase and LayoutRef
Configuration menu - View commit details
-
Copy full SHA for 6b64678 - Browse repository at this point
Copy the full SHA 6b64678View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c440a8 - Browse repository at this point
Copy the full SHA 4c440a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for c183903 - Browse repository at this point
Copy the full SHA c183903View commit details -
Configuration menu - View commit details
-
Copy full SHA for 476dac5 - Browse repository at this point
Copy the full SHA 476dac5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 68d6f53 - Browse repository at this point
Copy the full SHA 68d6f53View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2fde998 - Browse repository at this point
Copy the full SHA 2fde998View commit details -
Configuration menu - View commit details
-
Copy full SHA for d63d26e - Browse repository at this point
Copy the full SHA d63d26eView commit details -
Adds some aliases to avoid breaking changes, and adds an example of h…
…ow to write functionality with the new types
Configuration menu - View commit details
-
Copy full SHA for b7281f5 - Browse repository at this point
Copy the full SHA b7281f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 663e2f9 - Browse repository at this point
Copy the full SHA 663e2f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5204f68 - Browse repository at this point
Copy the full SHA 5204f68View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a3d131 - Browse repository at this point
Copy the full SHA 6a3d131View commit details -
Configuration menu - View commit details
-
Copy full SHA for 289130d - Browse repository at this point
Copy the full SHA 289130dView commit details
Commits on Oct 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for db52eab - Browse repository at this point
Copy the full SHA db52eabView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b34bf8 - Browse repository at this point
Copy the full SHA 2b34bf8View commit details -
Configuration menu - View commit details
-
Copy full SHA for a40307b - Browse repository at this point
Copy the full SHA a40307bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5adbb31 - Browse repository at this point
Copy the full SHA 5adbb31View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e61e83 - Browse repository at this point
Copy the full SHA 6e61e83View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0cd4334 - Browse repository at this point
Copy the full SHA 0cd4334View commit details -
Configuration menu - View commit details
-
Copy full SHA for f77ad96 - Browse repository at this point
Copy the full SHA f77ad96View commit details
Commits on Oct 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3888399 - Browse repository at this point
Copy the full SHA 3888399View commit details -
Adds a short snippet of documentation for
RawRef
and some top-level…… bullets on the new types
Configuration menu - View commit details
-
Copy full SHA for 0a3cad3 - Browse repository at this point
Copy the full SHA 0a3cad3View commit details
Commits on Oct 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for cbed837 - Browse repository at this point
Copy the full SHA cbed837View commit details -
Restore remove_index to DataOwned
I think I accidentally moved this over to ArrayRef, but we're not sure it should still require DataOwned
Configuration menu - View commit details
-
Copy full SHA for 945f70d - Browse repository at this point
Copy the full SHA 945f70dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 93dfb38 - Browse repository at this point
Copy the full SHA 93dfb38View commit details