@@ -812,7 +812,7 @@ function gradient_and_hessian(
812
812
n = length (x)
813
813
∇f = Vector {Any} (undef, n)
814
814
H_by_x, ∇²f_by_x = [Tuple{Int,Int}[] for _ in 1 : n], [Any[] for _ in 1 : n]
815
- Threads . @threads for i in eachindex (x)
815
+ for i in eachindex (x)
816
816
xi = x[i]
817
817
∇fi = simplify! (derivative (f, xi))
818
818
∇f[i] = ∇fi
@@ -1437,7 +1437,7 @@ function _evaluate!(model::Evaluator, x)
1437
1437
if o != = nothing
1438
1438
_evaluate! (model. dag[o. hash], o, x)
1439
1439
end
1440
- Threads . @threads for h in collect (keys (model. constraint_index_by_hash))
1440
+ for h in collect (keys (model. constraint_index_by_hash))
1441
1441
dag = model. dag[h]
1442
1442
for i in model. constraint_index_by_hash[h]
1443
1443
_evaluate! (dag, model. constraints[i], x)
@@ -1461,7 +1461,7 @@ end
1461
1461
function MOI. eval_objective_gradient (model:: Evaluator , ∇f, x)
1462
1462
_evaluate! (model, x)
1463
1463
fill! (∇f, 0.0 )
1464
- Threads . @threads for i in eachindex (model. objective. x)
1464
+ for i in eachindex (model. objective. x)
1465
1465
xi = model. objective. x[i]
1466
1466
∇f[xi] = model. objective. result[1 + i]
1467
1467
end
@@ -1470,7 +1470,7 @@ end
1470
1470
1471
1471
function MOI. eval_constraint (model:: Evaluator , g, x)
1472
1472
_evaluate! (model, x)
1473
- Threads . @threads for i in eachindex (model. constraints)
1473
+ for i in eachindex (model. constraints)
1474
1474
g[i] = model. constraints[i]. result[1 ]
1475
1475
end
1476
1476
return
@@ -1479,7 +1479,7 @@ end
1479
1479
function MOI. jacobian_structure (model:: Evaluator )
1480
1480
d = last (model. constraints)
1481
1481
J = Vector {Tuple{Int,Int}} (undef, d. jac_offset + length (d. x))
1482
- Threads . @threads for i in eachindex (model. constraints)
1482
+ for i in eachindex (model. constraints)
1483
1483
c = model. constraints[i]
1484
1484
for (j, xj) in enumerate (c. x)
1485
1485
J[c. jac_offset+ j] = (i, xj)
@@ -1490,7 +1490,7 @@ end
1490
1490
1491
1491
function MOI. eval_constraint_jacobian (model:: Evaluator , J, x)
1492
1492
_evaluate! (model, x)
1493
- Threads . @threads for c in model. constraints
1493
+ for c in model. constraints
1494
1494
for j in eachindex (c. x)
1495
1495
J[c. jac_offset+ j] = c. result[1 + j]
1496
1496
end
@@ -1514,7 +1514,7 @@ function MOI.hessian_lagrangian_structure(model::Evaluator)
1514
1514
H[k] = (o. x[hi], o. x[hj])
1515
1515
end
1516
1516
end
1517
- Threads . @threads for c in model. constraints
1517
+ for c in model. constraints
1518
1518
for (k, (hi, hj)) in enumerate (model. H[c. hash])
1519
1519
H[c. hess_offset+ k] = (c. x[hi], c. x[hj])
1520
1520
end
@@ -1531,7 +1531,7 @@ function MOI.eval_hessian_lagrangian(model::Evaluator, H, x, σ, μ)
1531
1531
H[offset+ j] = σ * o. result[j]
1532
1532
end
1533
1533
end
1534
- Threads . @threads for i in eachindex (model. constraints)
1534
+ for i in eachindex (model. constraints)
1535
1535
c = model. constraints[i]
1536
1536
# It is important that `offset_c` does not shadow `offset` from the
1537
1537
# objective block. If we use the same name, Julia creates a Core.Box
0 commit comments