// TODO: add opt argument dev to toMatSparse()/to_sparse() doing nothing for Cpu and converting to Cpu for GPU2.
// it would allow to define one generic function per matrix type (instead of one for Cpu and the other for GPU2)
// TODO: (better solution) generic function toMatSparse in Faust::MatGeneric<FPP, Cpu/GPU2> which throws exception if not possible, device argument still necessary but no need to make the difference among matrix types