From 6c67e31aba32a9d1d90de8667653923b972f8928 Mon Sep 17 00:00:00 2001 From: Mus M Date: Tue, 22 Aug 2017 18:23:55 -0400 Subject: [PATCH] Update deprecated `&x` syntax in cholmod --- base/sparse/cholmod.jl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/base/sparse/cholmod.jl b/base/sparse/cholmod.jl index 2644bd7b5cd41..b29f4ed701103 100644 --- a/base/sparse/cholmod.jl +++ b/base/sparse/cholmod.jl @@ -487,21 +487,21 @@ function allocate_sparse(nrow::Integer, ncol::Integer, nzmax::Integer, end function free_sparse!(ptr::Ptr{C_Sparse{Tv}}) where Tv<:VTypes @isok ccall((@cholmod_name("free_sparse", SuiteSparse_long), :libcholmod), Cint, - (Ptr{Ptr{C_Sparse{Tv}}}, Ptr{UInt8}), - &ptr, common()) + (Ref{Ptr{C_Sparse{Tv}}}, Ptr{UInt8}), + ptr, common()) end function free_sparse!(ptr::Ptr{C_SparseVoid}) @isok ccall((@cholmod_name("free_sparse", SuiteSparse_long), :libcholmod), Cint, - (Ptr{Ptr{C_SparseVoid}}, Ptr{UInt8}), - &ptr, common()) + (Ref{Ptr{C_SparseVoid}}, Ptr{UInt8}), + ptr, common()) end function free_factor!(ptr::Ptr{C_Factor{Tv}}) where Tv<:VTypes # Warning! Important that finalizer doesn't modify the global Common struct. @isok ccall((@cholmod_name("free_factor", SuiteSparse_long), :libcholmod), Cint, - (Ptr{Ptr{C_Factor{Tv}}}, Ptr{Void}), - &ptr, common()) + (Ref{Ptr{C_Factor{Tv}}}, Ptr{Void}), + ptr, common()) end function aat(A::Sparse{Tv}, fset::Vector{SuiteSparse_long}, mode::Integer) where Tv<:VRealTypes @@ -1725,7 +1725,7 @@ function logdet(F::Factor{Tv}) where Tv<:VTypes f = unsafe_load(pointer(F)) res = zero(Tv) for d in diag(F); res += log(abs(d)) end - f.is_ll!=0 ? 2res : res + f.is_ll != 0 ? 2res : res end det(L::Factor) = exp(logdet(L))