Skip to content

Commit ab41468

Browse files
committed
run formatter
1 parent 29d5aa9 commit ab41468

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ tries to do this with a bump allocator.
316316

317317
- See the [SciML Style Guide](https://github.com/SciML/SciMLStyle) for common coding practices and other style decisions.
318318
- There are a few community forums:
319-
319+
320320
+ The #diffeq-bridged and #sciml-bridged channels in the
321321
[Julia Slack](https://julialang.org/slack/)
322322
+ The #diffeq-bridged and #sciml-bridged channels in the

src/PreallocationTools.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ struct FixedSizeDiffCache{T <: AbstractArray, S <: AbstractArray}
99
end
1010

1111
function FixedSizeDiffCache(u::AbstractArray{T}, siz,
12-
::Type{Val{chunk_size}}) where {T, chunk_size}
12+
::Type{Val{chunk_size}}) where {T, chunk_size}
1313
x = ArrayInterface.restructure(u,
1414
zeros(ForwardDiff.Dual{nothing, T, chunk_size},
1515
siz...))
@@ -25,8 +25,8 @@ and for the `Dual` version of `u`, allowing use of pre-cached vectors with
2525
forward-mode automatic differentiation.
2626
"""
2727
function FixedSizeDiffCache(u::AbstractArray,
28-
::Type{Val{N}} = Val{ForwardDiff.pickchunksize(length(u))}) where {
29-
N,
28+
::Type{Val{N}} = Val{ForwardDiff.pickchunksize(length(u))}) where {
29+
N,
3030
}
3131
FixedSizeDiffCache(u, size(u), Val{N})
3232
end
@@ -75,7 +75,7 @@ function get_tmp(dc::FixedSizeDiffCache, u::Union{Number, AbstractArray})
7575
end
7676
end
7777

78-
function get_tmp(dc::FixedSizeDiffCache, ::Type{T}) where T <: Number
78+
function get_tmp(dc::FixedSizeDiffCache, ::Type{T}) where {T <: Number}
7979
if promote_type(eltype(dc.du), T) <: eltype(dc.du)
8080
dc.du
8181
else
@@ -111,7 +111,7 @@ forward-mode automatic differentiation. Supports nested AD via keyword `levels`
111111
or specifying an array of chunk_sizes.
112112
"""
113113
function DiffCache(u::AbstractArray, N::Int = ForwardDiff.pickchunksize(length(u));
114-
levels::Int = 1)
114+
levels::Int = 1)
115115
DiffCache(u, size(u), N * ones(Int, levels))
116116
end
117117
DiffCache(u::AbstractArray, N::AbstractArray{<:Int}) = DiffCache(u, size(u), N)
@@ -164,7 +164,7 @@ function get_tmp(dc::DiffCache, u::Union{Number, AbstractArray})
164164
end
165165
end
166166

167-
function get_tmp(dc::DiffCache, ::Type{T}) where T <: Number
167+
function get_tmp(dc::DiffCache, ::Type{T}) where {T <: Number}
168168
if promote_type(eltype(dc.du), T) <: eltype(dc.du)
169169
dc.du
170170
else

0 commit comments

Comments
 (0)