Propagate use of XTENSOR_USE_XSIMD and simplify xtensor configuration #2346
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch propagates the use of XTENSOR_USE_XSIMD into installed dolfinx configuration files (DOLFINXTargets.cmake and dolfinx.pc) to facilitate a consistent xtensor (xsimd) configuration.
If a dolfinx build is configured with XTENSOR_USE_XSIMD to enable xtensor to take advantage of XSIMD acceleration, then xsimd gets written into the symbol table for libdolfinx.so (in mesh::locate_entities and mesh::locate_entities_boundary)
Then at run time XTENSOR_USE_XSIMD would need to be added manually to the cmake or CXXFLAGS configuration, otherwise the signature for locate_entities will be discrepant, causing build errors, e.g. undefined reference to
dolfinx::mesh::locate_entities_boundary
. This patch automatically keeps the xtensor/xsimd configuration consistent.The xtl and xsimd packages are related to xtensor support. They are no longer used directly by dolfinx. xtensor finds them itself (xtensor always finds xtl, and finds xsimd if XTENSOR_USE_XSIMD is set). Hence dolfinx cmake config files do not need to find xtl or xsimd. Only xtensor is needed.
Fixes #2326.