-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Typed instance-free allocation (#192)
* Typed instance-free allocation * specialize for ProductManifold * specialize for nested PowerManifold * add default_type * add a test * rename allocate_as to allocate_on * improved quaternion allocation * fix CI? * fix CI on 1.6 too * update Julia versions on CI * 1.10 == 1.1 * quarto * update date
- Loading branch information
1 parent
5fb1add
commit 2ac6a52
Showing
15 changed files
with
265 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "ManifoldsBase" | ||
uuid = "3362f125-f0bb-47a3-aa74-596ffd7ef2fb" | ||
authors = ["Seth Axen <[email protected]>", "Mateusz Baran <[email protected]>", "Ronny Bergmann <[email protected]>", "Antoine Levitt <[email protected]>"] | ||
version = "0.15.10" | ||
version = "0.15.11" | ||
|
||
[deps] | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
|
@@ -12,11 +12,13 @@ Requires = "ae029012-a4dd-5104-9daa-d747884805df" | |
|
||
[weakdeps] | ||
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" | ||
Quaternions = "94ee1d12-ae83-5a48-8b1c-48b8ff168ae0" | ||
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" | ||
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" | ||
|
||
[extensions] | ||
ManifoldsBasePlotsExt = "Plots" | ||
ManifoldsBaseQuaternionsExt = "Quaternions" | ||
ManifoldsBaseRecursiveArrayToolsExt = "RecursiveArrayTools" | ||
ManifoldsBaseStatisticsExt = "Statistics" | ||
|
||
|
@@ -35,6 +37,7 @@ Requires = "1" | |
ReverseDiff = "1" | ||
StaticArrays = "1" | ||
Statistics = "1.6" | ||
Quaternions = "0.7" | ||
Test = "1.6" | ||
julia = "1.6" | ||
|
||
|
@@ -44,11 +47,12 @@ DoubleFloats = "497a8b3b-efae-58df-a0af-a86822472b78" | |
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" | ||
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" | ||
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" | ||
Quaternions = "94ee1d12-ae83-5a48-8b1c-48b8ff168ae0" | ||
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" | ||
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" | ||
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" | ||
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[targets] | ||
test = ["Test", "Aqua", "DoubleFloats", "ForwardDiff", "OrdinaryDiffEq", "Plots", "ReverseDiff", "StaticArrays", "Statistics", "RecursiveArrayTools"] | ||
test = ["Test", "Aqua", "DoubleFloats", "ForwardDiff", "OrdinaryDiffEq", "Plots", "Quaternions", "ReverseDiff", "StaticArrays", "Statistics", "RecursiveArrayTools"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module ManifoldsBaseQuaternionsExt | ||
|
||
if isdefined(Base, :get_extension) | ||
using ManifoldsBase | ||
using ManifoldsBase: ℍ | ||
using Quaternions | ||
else | ||
# imports need to be relative for Requires.jl-based workflows: | ||
# https://github.com/JuliaArrays/ArrayInterface.jl/pull/387 | ||
using ..ManifoldsBase | ||
using ..ManifoldsBase: ℍ | ||
using ..Quaternions | ||
end | ||
|
||
@inline function ManifoldsBase.allocate_result_type( | ||
::AbstractManifold{ℍ}, | ||
f::TF, | ||
args::Tuple{}, | ||
) where {TF} | ||
return QuaternionF64 | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
2ac6a52
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
Release notes:
Added
allocate_on
to generically allocate point and tangent vectors on a manifold without a pre-existing instance but of a particular type.default_type
to get the default type of points and tangent vectors for a manifold.Quaternions.jl
package that handles allocation.Changed
2ac6a52
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/111933
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: