Skip to content

Commit 2e89ed4

Browse files
Format .jl files (#121)
1 parent 72b56d4 commit 2e89ed4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

ext/ExaModelsKernelAbstractions.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ function ExaModels.jprod_nln!(
340340
x::AbstractVector,
341341
v::AbstractVector,
342342
Jv::AbstractVector,
343-
) where {T,VT,N <: NamedTuple, E<:KAExtension{T,VT,N}}
343+
) where {T,VT,N<:NamedTuple,E<:KAExtension{T,VT,N}}
344344

345345
fill!(Jv, zero(eltype(Jv)))
346346
fill!(m.ext.prodhelper.jacbuffer, zero(eltype(Jv)))
@@ -362,7 +362,7 @@ function ExaModels.jtprod_nln!(
362362
x::AbstractVector,
363363
v::AbstractVector,
364364
Jtv::AbstractVector,
365-
) where {T,VT,N <: NamedTuple, E<:KAExtension{T,VT,N}}
365+
) where {T,VT,N<:NamedTuple,E<:KAExtension{T,VT,N}}
366366

367367
fill!(Jtv, zero(eltype(Jtv)))
368368
fill!(m.ext.prodhelper.jacbuffer, zero(eltype(Jtv)))
@@ -386,13 +386,13 @@ function ExaModels.hprod!(
386386
v::AbstractVector,
387387
Hv::AbstractVector;
388388
obj_weight = one(eltype(x)),
389-
) where {T,VT,N <: NamedTuple, E<:KAExtension{T,VT,N}}
389+
) where {T,VT,N<:NamedTuple,E<:KAExtension{T,VT,N}}
390390

391391
if isnothing(m.ext.prodhelper)
392392
error("Prodhelper is not defined. Use ExaModels(c; prod=true) to use hprod!")
393393
end
394394

395-
fill!(Hv, zero(eltype(Hv)))
395+
fill!(Hv, zero(eltype(Hv)))
396396
fill!(m.ext.prodhelper.hessbuffer, zero(eltype(Hv)))
397397

398398
_obj_hess_coord!(m.ext.backend, m.ext.prodhelper.hessbuffer, m.objs, x, obj_weight)
@@ -459,7 +459,7 @@ function ExaModels.hess_coord!(
459459
y::V,
460460
hess::V;
461461
obj_weight = one(eltype(y)),
462-
) where {T,VT,E<:KAExtension, V<:AbstractVector}
462+
) where {T,VT,E<:KAExtension,V<:AbstractVector}
463463
fill!(hess, zero(eltype(hess)))
464464
_obj_hess_coord!(m.ext.backend, hess, m.objs, x, obj_weight)
465465
_con_hess_coord!(m.ext.backend, hess, m.cons, x, y)

ext/ExaModelsMOI.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ end
5555

5656
float_type(::MOIU.Model{T}) where {T} = T
5757

58-
function ExaModels.ExaModel(jm_cache::MOI.ModelLike; backend = nothing, prod=false)
58+
function ExaModels.ExaModel(jm_cache::MOI.ModelLike; backend = nothing, prod = false)
5959

6060
T = float_type(jm_cache.model)
6161
minimize = jm_cache.model.objective.sense == MOI.MIN_SENSE
@@ -116,7 +116,7 @@ function ExaModels.ExaModel(jm_cache::MOI.ModelLike; backend = nothing, prod=fal
116116
cons = ExaModels.constraint(c, offset; start = y0, lcon = lcon, ucon = ucon)
117117
build_constraint!(c, cons, bin)
118118

119-
return ExaModels.ExaModel(c; prod=prod)
119+
return ExaModels.ExaModel(c; prod = prod)
120120
end
121121

122122
function exafy_con(cons::Nothing, bin, offset, lcon, ucon)

src/nlp.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ end
733733
@inbounds @inline offset0(a::C, i) where {C<:ConstraintAug} = offset0(a.f, a.itr, i)
734734
@inbounds @inline offset0(f::F, itr, i) where {P<:Pair,F<:SIMDFunction{P}} =
735735
f.o0 + f.f.first(itr[i], nothing)
736-
@inbounds @inline offset0(f::F, itr, i) where {I <: Integer, P<:Pair{I},F<:SIMDFunction{P}} =
736+
@inbounds @inline offset0(f::F, itr, i) where {I<:Integer,P<:Pair{I},F<:SIMDFunction{P}} =
737737
f.o0 + f.f.first
738738
@inbounds @inline offset0(f::F, itr, i) where {T<:Tuple,P<:Pair{T},F<:SIMDFunction{P}} =
739739
f.o0 + idxx(coord(itr, i, f.f.first), Base.size(itr))

0 commit comments

Comments
 (0)