Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Make UKF implementation work for dynamic dims#663

Merged
sphw merged 25 commits intomainfrom
feature/ukf-dyn
Aug 28, 2024
Merged

Make UKF implementation work for dynamic dims#663
sphw merged 25 commits intomainfrom
feature/ukf-dyn

Conversation

@sphw
Copy link
Contributor

@sphw sphw commented Aug 27, 2024

The original goal of this PR was to make the UKF work with Python, but it turns out the changes needed were way more than I expected. So I'm splitting the PR into this one, which makes the necessary changes to nox and roci-adcs, and a second one for the Python integration.

For nox the major push has been to relax type bounds that only worked with ConstDim. For the most part this means instead of getting the dimension with D1::DIM you instead call D1::array_shape(&arr.buf). In addition I made the following changes:

  • Separate array.rs into mod.rs and a repr.rs file
  • Delete the XlaDim trait, and replace all its uses
  • Rename Dim in ArrayDim to Shape to disambiguate the type level dimension and the potentially dynamic shape
  • Add a new map function to Tensor which maps just along the top-level dim
  • Add a new function iterate over the rows of a Tensor
  • Make concat_many work with iterators instead of fixed length arrays

In roci-adcs the Nox changes were used to replace all the uses of Const<N> with generic dimensions. I have kept the Const api as a wrapper, because that is safer for Rust users. There is a loosely typed internal API that the Python wrapper will use.

@sphw sphw requested review from akhilles and ch-greams August 27, 2024 21:11
@sphw sphw force-pushed the feature/ukf-dyn branch from 027932d to cd31e25 Compare August 27, 2024 21:14
@sphw sphw merged commit e11a2e0 into main Aug 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments