-
Notifications
You must be signed in to change notification settings - Fork 11
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
MVector
type yields ImmutableDiffResult
#25
Comments
RomeoV
pushed a commit
to RomeoV/LsqFit.jl
that referenced
this issue
Aug 15, 2023
This package is almost ready to be used straight up with StaticArrays. Most variables are already written in a general way, there are just two blockers: The preallocated buffers `JJ` and `n_buffer`, aswell as the LMResults type. This commit fixes that, and almost allows usage of StaticArrays. However, there's still JuliaDiff/DiffResults.jl#25, but that can be currently overcome by two typedefs.
I agree that this behavior is not wanted, and I am actually questioning the utility of the mutable/immutable split (see #26) If we do keep it, perhaps we should base the distinction on the output of |
I have opened #28 to keep track |
Reopened cause the PR was temporarily reverted |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, I'm using this package through
LsqFit.jl
. I have a 3d parameter vector, and would like to speed up the code by leveragingStaticArrays.jl
, which basically come for free by passing aStaticVector
instead of aVector
. In order to support in-place operations, we can further pass anMVector
, i.e. a modifiable statically sized array. However, as seen below, Static Arrays always lead toImmutableDiffResult
s.DiffResults.jl/src/DiffResults.jl
Lines 31 to 52 in 80f085e
I've done the following overloads to make it work for my case:
I think this is a useful feature and currently can be considered a bug. If there's interest in merging this I can also open a PR.
The text was updated successfully, but these errors were encountered: