Refactoring #1732

Envelope task #1438: === Physics ===

Envelope task #1119: == Reflectivity ==

Optimization in innermost loop in RT computation

Added by wuttke over 2 years ago. Updated almost 2 years ago.

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

100%

Category:-
Target version:-

Description

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.

History

#1 Updated by wuttke over 2 years ago

  • Description updated (diff)
  • Assignee set to wuttke

Implemented in branch bisectRT+test.

#2 Updated by wuttke over 2 years ago

  • % Done changed from 0 to 100

Solved in 2baf9d, pull request 122.

#3 Updated by pospelov almost 2 years ago

  • Status changed from New to Rejected

Rejected, see #1823

Also available in: Atom PDF