Refactoring #234

avoid templates - e.g. in integration wrapper MemberFunctionIntegrator.h

Added by wuttke over 7 years ago. Updated over 6 years ago.

Status:RejectedStart date:21 Mar 2013
Priority:LowDue date:
Assignee:wuttke% Done:

0%

Category:-
Target version:-

Description

To accelerate compilation, review use of class-valued templates.

Prefer static functions (file scope) over unnecessary class structures.

Example: try to simplify MemberFunctionIntegrator.h

History

#1 Updated by wuttke over 7 years ago

  • Assignee set to wuttke

#2 Updated by herck over 7 years ago

Just a remark on the use of templates in the case of MemberFunctionIntegrator:
The idea is that in an OO program, the functions one wants to integrate are generally member functions of a class.
Either one must wrap these into global functions (à la Boost), which would compromise execution time (since these would be called quite often during a single integration), either one must parametrize the integrator by the class whose function one wants to integrate. We chose the last option.
Another remark is that compilation time is less critical than execution time and on modern computer systems there is not so much need in optimizing a single shot compilation step (compared to multiple executions of the code).
Personally, I also prefer the syntax of class templated integrator to a member function wrapper.

#3 Updated by pospelov over 7 years ago

Another remark, is that apart of technicalities, Integrator redesign is not the most urgent task. It does his job, for the moment it is enough. In the future, we probably will do much more integration and it will be more clear, which kind of redesign is required.

#4 Updated by wuttke over 7 years ago

  • Status changed from New to Backlog
  • Priority changed from Normal to Low

#5 Updated by wuttke over 7 years ago

note: used not only in form factors, but also in interference function and at top-level integration

#6 Updated by herck over 6 years ago

  • Status changed from Backlog to Rejected

Also available in: Atom PDF