Processing Algorithmic Skeletons at Compile-Time
Résumé
When developing software in Operational Research (OR), one usually aims at getting the shortest execution time. There are multiple means to achieve this, including improving the algorithmic time complexity (finding better suited algorithms and data structures), optimizing the code (e.g. to avoid cache misses), parallelizing the execution... These improvements can be written by the end developer, requiring some coding effort and knowledge, whereas some of them could be achieved automatically.
In previous work, we proposed a library to ease the building of parallel implementations of OR algorithms from the knowledge of their structure with no runtime overhead. We chose to use algorithmic skeletons in order to describe metaheuristics and make them ready for parallelization. For this purpose, Template Metaprogramming (TMP) techniques are used first to provide facilities to describe a metaheuristic as a composition of algorithmic skeletons, and secondly to analyze and transform the skeleton, at compile-time, into an efficient code to be executed at runtime.
C++ TMP allows writing full algorithms to be executed at compile-time, but it is rare for an end developer to use TMP directly, as its syntax greatly differs from the usual language. Hence, we present here some insights of an intermediary library designed to ease the writing of code to process the algorithmic skeletons at compile-time as trees and vectors.
In previous work, we proposed a library to ease the building of parallel implementations of OR algorithms from the knowledge of their structure with no runtime overhead. We chose to use algorithmic skeletons in order to describe metaheuristics and make them ready for parallelization. For this purpose, Template Metaprogramming (TMP) techniques are used first to provide facilities to describe a metaheuristic as a composition of algorithmic skeletons, and secondly to analyze and transform the skeleton, at compile-time, into an efficient code to be executed at runtime.
C++ TMP allows writing full algorithms to be executed at compile-time, but it is rare for an end developer to use TMP directly, as its syntax greatly differs from the usual language. Hence, we present here some insights of an intermediary library designed to ease the writing of code to process the algorithmic skeletons at compile-time as trees and vectors.
Origine | Fichiers produits par l'(les) auteur(s) |
---|