Skip to content

Optimizations to the `exponent_max` function used in d-marg

Daniel Wysocki requested to merge daniel.wysocki/rift:dmarg-optimizations into master

Made two optimizations to the exponent_max function used in distance marginalization:

  1. Saved unnecessary data copying when creating the clipped version of x0 by switching to NumPy/Cupy's clip function.

  2. Distributed the factor of 0.5 in the return value. This turns two const * array operations (0.5*b and 2.*x0) into one (0.5*x0_expmax).

Merge request reports