From 4872191edb2d86f0dea008e3c369c12b5b420724 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Tue, 21 Oct 2025 11:11:31 +1300 Subject: [PATCH] Remove dependency on MutableArithmetics --- Project.toml | 2 -- src/MOI_wrapper/hermitian_complex_psd_cone_bridge.jl | 8 ++++---- src/SCS.jl | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Project.toml b/Project.toml index fb90ee29..7b37b6a6 100644 --- a/Project.toml +++ b/Project.toml @@ -6,7 +6,6 @@ repo = "https://github.com/jump-dev/SCS.jl" [deps] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" -MutableArithmetics = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" OpenBLAS32_jll = "656ef2d0-ae68-5445-9ca0-591084a874a2" PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" SCS_jll = "f4f2fc5b-1d94-523c-97ea-2ab488bedf4b" @@ -23,7 +22,6 @@ SCSSCS_MKL_jllExt = ["SCS_MKL_jll"] [compat] LinearAlgebra = "1.10.0" MathOptInterface = "1.20" -MutableArithmetics = "1" OpenBLAS32_jll = "0.3.10" Pkg = "1" PrecompileTools = "1" diff --git a/src/MOI_wrapper/hermitian_complex_psd_cone_bridge.jl b/src/MOI_wrapper/hermitian_complex_psd_cone_bridge.jl index 3b62324c..b3b7469b 100644 --- a/src/MOI_wrapper/hermitian_complex_psd_cone_bridge.jl +++ b/src/MOI_wrapper/hermitian_complex_psd_cone_bridge.jl @@ -35,19 +35,19 @@ function MOI.Utilities.set_dot( y::AbstractVector{T}, set::ComplexPositiveSemidefiniteConeTriangle, ) where {S,T} - U = MA.promote_operation(MA.add_mul, S, T) + U = promote_type(S, T) result = zero(U) d = set.side_dimension k = 0 for j in 1:d for i in 1:j-1 k += 1 - result = MA.add_mul!!(result, 2, x[k], y[k]) + result += 2 * x[k] * y[k] k += 1 - result = MA.add_mul!!(result, 2, x[k], y[k]) + result += 2 * x[k] * y[k] end k += 1 - result = MA.add_mul!!(result, x[k], y[k]) + result += x[k] * y[k] end return result end diff --git a/src/SCS.jl b/src/SCS.jl index e78e7fb3..120b5541 100644 --- a/src/SCS.jl +++ b/src/SCS.jl @@ -7,7 +7,6 @@ module SCS import LinearAlgebra import MathOptInterface as MOI -import MutableArithmetics as MA import OpenBLAS32_jll import SCS_jll: libscsdir, libscsindir import SparseArrays