Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ version = "0.8.1"
AMD = "14f7f29c-3bd6-536c-9a0b-7339e30b5a3e"
COSMOAccelerators = "bbd8fffe-5ad0-4d78-a55e-85575421b4ac"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
GenericLinearAlgebra = "14197337-ba66-59df-a3e3-ca00e7dcff7a"
IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
Expand All @@ -29,8 +30,8 @@ DataStructures = "^0.17.0, ^0.18.0"
IterTools = "^1"
MathOptInterface = "~0.9.16"
QDLDL = "~0.1.4"
Requires = "^1"
Reexport = "0.2, ^1"
Requires = "^1"
UnsafeArrays = "0.3, 1"
julia = "^1"

Expand Down
2 changes: 1 addition & 1 deletion src/COSMO.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__precompile__()
module COSMO

using SparseArrays, LinearAlgebra, SuiteSparse, QDLDL, Pkg, DataStructures, Requires, Printf, IterTools
using SparseArrays, LinearAlgebra, SuiteSparse, QDLDL, Pkg, DataStructures, Requires, Printf, IterTools, GenericLinearAlgebra
using Reexport
using COSMOAccelerators

Expand Down
6 changes: 6 additions & 0 deletions src/convexset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ function _project!(X::AbstractMatrix, ws::PsdBlasWorkspace{T}) where{T}
rank_k_update!(X, ws)
end

function _project!(X::AbstractMatrix{BigFloat}, ws::PsdBlasWorkspace{BigFloat})
w,Z = GenericLinearAlgebra.eigen(GenericLinearAlgebra.Hermitian(X))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reallocates w and Z at every iteration. Is there a non-allocating version of GenericAlgebra.eigen ? eigen! perhaps?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a function with that name but I do not understand how it works (and where it stores the result). I tried several things and no luck yet :/

D = LinearAlgebra.Diagonal(max.(w,0))
X .= Z'D'Z
Comment thread
lrnv marked this conversation as resolved.
Outdated
end

function rank_k_update!(X::AbstractMatrix, ws::COSMO.PsdBlasWorkspace{T}) where {T}
n = size(X, 1)
@. X = zero(T)
Expand Down
2 changes: 0 additions & 2 deletions src/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,6 @@ function type_checks(constraints::Vector{COSMO.Constraint{T}}) where {T <: Abstr
return nothing
end
type_checks(convex_set::AbstractConvexSet) = nothing
type_checks(convex_set::Union{PsdCone{BigFloat}, PsdConeTriangle{BigFloat}}) = throw(ArgumentError("COSMO currently does not support the combination of PSD constraints and BigFloat."))



function check_A_dim(A::Union{AbstractVector{<:Real},AbstractMatrix{<:Real}}, n::Int)
Expand Down