Skip to content

Commit ce2613c

Browse files
committed
Specialize on typeof(common) in KLU
1 parent d416d03 commit ce2613c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/KLU/klu.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ See the [`klu`](@ref) docs for more information.
134134
135135
You typically should not construct this directly, instead use [`klu`](@ref).
136136
"""
137-
mutable struct KLUFactorization{Tv <: KLUTypes, Ti <: KLUITypes} <:
137+
mutable struct KLUFactorization{Tv <: KLUTypes, Ti <: KLUITypes, Tklu <: Union{klu_l_common, klu_common}} <:
138138
AbstractKLUFactorization{Tv, Ti}
139-
common::Union{klu_l_common, klu_common}
139+
common::Tklu
140140
_symbolic::Ptr{Cvoid}
141141
_numeric::Ptr{Cvoid}
142142
n::Int
@@ -146,7 +146,7 @@ mutable struct KLUFactorization{Tv <: KLUTypes, Ti <: KLUITypes} <:
146146
function KLUFactorization(n, colptr, rowval, nzval)
147147
Ti = eltype(colptr)
148148
common = _common(Ti)
149-
obj = new{eltype(nzval), Ti}(common, C_NULL, C_NULL, n, colptr, rowval, nzval)
149+
obj = new{eltype(nzval), Ti, typeof(common)}(common, C_NULL, C_NULL, n, colptr, rowval, nzval)
150150
function f(klu)
151151
_free_symbolic(klu)
152152
_free_numeric(klu)

0 commit comments

Comments
 (0)