Delite icon indicating copy to clipboard operation
Delite copied to clipboard

Suggestion: Enrich ForgeArray types to have .toVector method (OptiML only)

Open malcolmgreaves opened this issue 8 years ago • 1 comments

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)

malcolmgreaves avatar Nov 08 '16 02:11 malcolmgreaves

I believe this doesn't exist at the moment primarily because the user isn't generally supposed to handle ForgeArray instances in OptiML apps.

dkoeplin avatar Nov 08 '16 04:11 dkoeplin