Interfacing with raw arrays

Issue #77 wontfix
Mikhail Katliar created an issue

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)

  1. Klaus Iglberger

    Hi Mikhail!

    For this purpose, Blaze provides the CustomVector and CustomMatrix 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!

  2. Klaus Iglberger

    The feature to interface with raw arrays and to represent arbitrary memory as Blaze vector or matrix (i.e. the class templates CustomVector and CustomMatrix) has been introduced in Blaze 2.6 (see the Release Archive).

  3. Mikhail Katliar reporter

    Thank you very much Klaus. This answers my question.

    As I can see, the sizes of CustomVector and CustomMatrix 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 to StaticVector vs DynamicVector)?

  4. Klaus Iglberger

    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, and Submatrix) to also work with fixed sizes. However, this is a major upgrade and will take some time.

    Best regards,

    Klaus!

  5. Mikhail Katliar reporter

    Thank you Klaus,

    Now all my questions are answered. Going to switch from Eigen3 to Blaze ;-)

    Best regards,

    Mikhail

  6. Log in to comment