Skip to content

Commit addfd17

Browse files
Merge pull request #28 from SciML/labelledarrays
Remove LabelledArrays support
2 parents eab903a + a981cb7 commit addfd17

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

Project.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
name = "PreallocationTools"
22
uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46"
33
authors = ["Chris Rackauckas <accounts@chrisrackauckas.com>"]
4-
version = "0.3.2"
4+
version = "0.4.0"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
88
ArrayInterfaceCore = "30b0a656-2188-435a-8636-2ec0e6a096e2"
99
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
10-
LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800"
1110

1211
[compat]
1312
Adapt = "3"
1413
ArrayInterfaceCore = "0.1.1"
1514
ForwardDiff = "0.10.3"
16-
LabelledArrays = "1"
1715
julia = "1.6"
1816

1917
[extras]
18+
LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800"
2019
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
2120
Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba"
2221
OptimizationOptimJL = "36348300-93cb-4f02-beb5-3c3902f8871e"
@@ -27,4 +26,4 @@ SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
2726
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2827

2928
[targets]
30-
test = ["LinearAlgebra", "OrdinaryDiffEq", "Test", "RecursiveArrayTools", "Pkg", "SafeTestsets", "Optimization", "OptimizationOptimJL"]
29+
test = ["LabelledArrays", "LinearAlgebra", "OrdinaryDiffEq", "Test", "RecursiveArrayTools", "Pkg", "SafeTestsets", "Optimization", "OptimizationOptimJL"]

src/PreallocationTools.jl

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module PreallocationTools
22

3-
using ForwardDiff, ArrayInterfaceCore, LabelledArrays, Adapt
3+
using ForwardDiff, ArrayInterfaceCore, Adapt
44

55
struct DiffCache{T <: AbstractArray, S <: AbstractArray}
66
du::T
@@ -57,16 +57,6 @@ function get_tmp(dc::DiffCache, u::AbstractArray{T}) where {T <: ForwardDiff.Dua
5757
ArrayInterfaceCore.restructure(dc.du, reinterpret(T, view(dc.dual_du, 1:nelem)))
5858
end
5959

60-
function get_tmp(dc::DiffCache,
61-
u::LabelledArrays.LArray{T, N, D, Syms}) where {T, N, D, Syms}
62-
nelem = div(sizeof(T), sizeof(eltype(dc.dual_du))) * length(dc.du)
63-
if nelem > length(dc.dual_du)
64-
enlargedualcache!(dc, nelem)
65-
end
66-
_x = ArrayInterfaceCore.restructure(dc.du, reinterpret(T, view(dc.dual_du, 1:nelem)))
67-
LabelledArrays.LArray{T, N, D, Syms}(_x)
68-
end
69-
7060
get_tmp(dc::DiffCache, u::Number) = dc.du
7161
get_tmp(dc::DiffCache, u::AbstractArray) = dc.du
7262

0 commit comments

Comments
 (0)