TL;DR
The paper introduces a new, more readable and flexible interface for functions in the dune-functions module, utilizing operator overloading and type erasure to enhance usability and incorporate modern C++ features.
Contribution
It presents a novel function interface based on operator() and type erasure, improving code readability and supporting lambda expressions in the dune-functions module.
Findings
Enhanced code readability with operator() overloading
Type erasure generalizes std::function for better polymorphism
Performance impact of type erasure and return-by-value analyzed
Abstract
The dune-functions dune module introduces a new programmer interface for discrete and non-discrete functions. Unlike the previous interfaces considered in the existing dune modules, it is based on overloading operator(), and returning values by-value. This makes user code much more readable, and allows the incorporation of newer C++ features such as lambda expressions. Run-time polymorphism is implemented not by inheritance, but by type erasure, generalizing the ideas of the std::function class from the C++11 standard library. We describe the new interface, show its possibilities, and measure the performance impact of type erasure and return-by-value.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
