DrTimothyAldenDavis / SuiteSparse

The official SuiteSparse library: a suite of sparse matrix algorithms authored or co-authored by Tim Davis, Texas A&M University.
https://people.engr.tamu.edu/davis/suitesparse.html
Other
1.14k stars 258 forks source link

Copying form of `cholmod_*_xtype` #720

Open rayegun opened 7 months ago

rayegun commented 7 months ago

Currently the semantics of cholmod_*_xtype are not great since it mutates the data type of an object. It would be nicer in most cases to have cholmod_*_copy_xtype which returns a new object with the new data type. This would avoid the double memory allocation of cholmod_*_copy followed by cholmod_*_xtype.

DrTimothyAldenDavis commented 7 months ago

That would be useful. I'll consider it for CHOLMOD 5.2 (I would bump the 2nd digit from 1 to 2, because this would be a new addition to the user-visible API). I'd like to keep CHOLMOD 5.1.1 as-is for SuiteSparse 7.5.0.