Interfacing with raw arrays
Is there a way to interface with raw arrays in Blaze
? Eigen3
provides the Map
class for this purpose: https://eigen.tuxfamily.org/dox/group__TutorialMapClass.html.
Comments (5)
-
-
- changed status to wontfix
The feature to interface with raw arrays and to represent arbitrary memory as Blaze vector or matrix (i.e. the class templates
CustomVector
andCustomMatrix
) has been introduced in Blaze 2.6 (see the Release Archive). -
reporter Thank you very much Klaus. This answers my question.
As I can see, the sizes of
CustomVector
andCustomMatrix
are provided during run-time in the constructor. Do you think there would be any performance benefit from an implementation which can make use of the sizes known at compile time (similar toStaticVector
vsDynamicVector
)? -
Hi Mikhail!
There would be a (slight) performance benefit. That is why eventually we will update several data structures (incl. for instance
CustomVector
,CustomMatrix
,Subvector
, andSubmatrix
) to also work with fixed sizes. However, this is a major upgrade and will take some time.Best regards,
Klaus!
-
reporter Thank you Klaus,
Now all my questions are answered. Going to switch from Eigen3 to Blaze ;-)
Best regards,
Mikhail
- Log in to comment
Hi Mikhail!
For this purpose, Blaze provides the
CustomVector
andCustomMatrix
classes. They allow you to represent any type of memory as native Blaze vector or matrix and flawlessly integrate with the rest of the Blaze functionality. I hope this helps,Best regards,
Klaus!