Closed tkoolen closed 6 years ago
Merging #12 into master will decrease coverage by
0.61%
. The diff coverage is79.66%
.
@@ Coverage Diff @@
## master #12 +/- ##
=========================================
- Coverage 79.91% 79.3% -0.62%
=========================================
Files 4 4
Lines 488 488
=========================================
- Hits 390 387 -3
- Misses 98 101 +3
Impacted Files | Coverage Δ | |
---|---|---|
src/interface.jl | 68.31% <79.66%> (-1.24%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 69d25e7...32730d2. Read the comment docs.
That's great! Thank you so much for this. The garbage collector changes can give lots of problems in Julia 0.7 and it is good to fix them before it is released.
Everything looks good and the tests pass. I will merge it.
I was running into some issues and decided to clean up
update!
.Summary:
pointer
in theccall
s, which violates GC safety. Before this change, I was running into segfaults while trying toupdate!
P
. This may also have been partly because of https://github.com/oxfordcontrol/OSQP.jl/blob/69d25e71c6d68c043ae6437a6c45dbd902ba4bda/src/interface.jl#L325 which, ifPx_idx
was a vector, can make it unreachable from the point of view of the garbage collector and hence up for garbage collection (in addition to being type-unstable).update_q!
,update_l!
, etc.) to match the C interface. Some users might prefer using these, especially since keyword args have a bit of overhead in Julia 0.6. These functions are also type stable and hence faster.Dict
.=
so that they work completely in-place and hence don't allocate.