Refactoring #1732

Optimization in innermost loop in RT computation

Added by wuttke about 4 years ago. Updated 4 months ago.

Status:RejectedStart date:12 Dec 2016
Priority:NormalDue date:
Assignee:wuttke% Done:


Target version:-


SpecularMatrix::calculateUpFromLayer contains an innermost loop.
For thick multilayer system with few scattering layers, this loop dominates the overall computation time. Therefore stringent optimization is in order.

- Precompute aux = std::exp(ix), and divide by aux instead
of multiplying with std::exp(-ix).

- Use exp_I(x) from Complex.h instead of exp(I*x)

- And most importantly, use bisection instead of linear search to determine from which layer the computation can be started without running into overflow.


#1 Updated by wuttke about 4 years ago

  • Description updated (diff)
  • Assignee set to wuttke

Implemented in branch bisectRT+test.

#2 Updated by wuttke about 4 years ago

  • % Done changed from 0 to 100

Solved in 2baf9d, pull request 122.

#3 Updated by pospelov over 3 years ago

  • Status changed from New to Rejected

Rejected, see #1823

#4 Updated by wuttke 4 months ago

  • Parent task deleted (#1119)

Also available in: Atom PDF