Use OMP pragma for PhasingArray
Description
Some time ago I added a utility function to lalsuite to make numerous calls to the TaylorF2 PhasingArray. This can be used (for e.g.) in template bank construction, or any other case where an analytical F2 metric can help. It was requested (by Tom Dent and student) that I parallelise this to speed up their use case. The simplest place to do this is adding OMP in the function here.
API Changes and Justification
No API changes. If you compile lalsuite with OpenMP this function will now use threads. No change in output/inputs anywhere!
Backwards Compatible Changes
-
This change does not modify any class/function/struct/type definitions in a public C header file or any Python class/function definitions -
This change adds new classes/functions/structs/types to a public C header file or Python module
Backwards Incompatible Changes
-
This change modifies an existing class/function/struct/type definition in a public C header file or Python module -
This change removes an existing class/function/struct/type from a public C header file or Python module
If any of the Backwards Incompatible check boxes are ticked please provide a justification why this change is necessary and why it needs to be done in a backwards incompatible way.
Review Status
This code is not used by the "standard" waveform generation pathway. TaylorF2 itself will never call the function I am changing. This is really used to quickly get at TaylorF2 internals for other purposes. So in short, this isn't currently in the scope of any review, though Tom et al's use case may be reviewed in the future.
(@geraint.pratten as this touches lalsimulation I assign to you, please reassign as needed! Please note the change is mostly moving code around, the only functional change is adding the OMP pragma line, the rest is moving code into it and indenting)