Delite
Delite copied to clipboard
Suggestion: Enrich ForgeArray types to have .toVector method (OptiML only)
Using an implicit class, we could add a .toVector method on the ForgeArray type that would convert the data into a DenseVector type. E.g.
val x: ForgeArray[Int] = ...
val y: DenseVector[Int] = x.toVector
This would be equivalent to the following (current way):
val y: DenseVector[Int] = DenseVector(x)
I believe this doesn't exist at the moment primarily because the user isn't generally supposed to handle ForgeArray instances in OptiML apps.