HEXRD / hexrd

A cross-platform, open-source library for the analysis of X-ray diffraction data.
Other
55 stars 26 forks source link

Add xtensor support, remove Eigen #607

Closed psavery closed 6 months ago

psavery commented 7 months ago

We have decided to use xtensor instead of Eigen for the C++ code, for a few reasons:

  1. Eigen doesn't really support tensors (3 or more dimensions) all that well, and we need tensor support. xtensor has better support.
  2. Eigen uses Fortran-ordering, whereas xtensor uses C-ordering. Numpy also uses C-ordering, so we sometimes must make deep copies when converting to Eigen, but we do not need to for xtensor.
  3. xtensor maintains xsimd, which we are already using anyways

Adding xtensor support is a great step towards accelerating other functions.

psavery commented 7 months ago

@ZackAttack614 Ready for merging after you approve.