QMCPACK / miniqmc

QMCPACK miniapp: a simplified real space QMC code for algorithm development, performance portability testing, and computer science experiments
Other
27 stars 35 forks source link

[WIP] Add class for managing spline coefficients. #149

Closed markdewing closed 5 years ago

markdewing commented 6 years ago

This PR is only for discussion, not for check-in.

With a well defined API, it would be easier to implement alternate storage ideas, such as memory mapping from a file or global arrays.

This implementation uses a base class with virtual functions. The performance would need to be tested. If this interferes with performance, it could be implemented where the spline class takes a coefficient management class as a template parameter.

Side note - this PR adds a flag to einspline_spo.hpp to differentiate the reference implementation from the new implementation. Using a separate einspline_spo_ref.hpp (#146) would eliminate the need for this.

ye-luo commented 6 years ago

I think the einspline_spo.hpp has some drawbacks. My feeling is that this prototype is actually going worse unfortunately.

The problem of einspline_spo is that it plays both the row of builder and built object type. The data setup routines should remain in the builder while the lightweight object class only do computing. So when porting to a specific architecture, we only need to deal with the object class instead of everything. However, this prototype makes routines and classes even more entangled.

For your needs, I think the builder needs to have abstraction and hierarchy and then the object class needs to have hierarchy as well but the construction and computing must be separated.