Skip to content

Limited use of vectorclass to required places in MagneticFieldGrid

Sebastien Ponce requested to merge sponce_MagneticFieldGrid into master

In details :

  • dropped vectorclass from the members used for storage. Used std::array there. This gives exactly same storage and perf (strictly same assembly code) and allows to write a scalar version easily
  • dropped vectorclass from fieldVectorClosestPoint and fieldGradient functions. Reverted to a scalar code, as it's much faster (15 vs 10.3 and 27 vs 19.8 cycles per call respectively)
  • adapted fieldVector code to use new storage. Resulting assembly code is unchanged. Note that here, vectorized version is much faster than scalar one as more computation is involved : 25.7 vs 34.2 cycles per call

Merge request reports