Active Libraries: Rethinking the roles of compilers and libraries
Todd L. Veldhuizen, Dennis Gannon
TL;DR
Active Libraries integrate code generation and optimization into library design to deliver readable, high-performance domain abstractions for scientific computing. The paper surveys representative libraries (Blitz++, POOMA, MTL, GMCL, FFTW, PhiPAC/ATLAS) and articulates four optimization models—transformational, generative, explorative, and compositional—to illustrate design trade-offs. It then reviews enabling technologies such as generic programming, templates, RTCG, partial evaluation, and metalevel processing, plus extensible tooling like Tau for profiling and debugging. The results suggest that Active Libraries can provide near-peak performance with configurable abstractions, addressing the limitations of language extensions and DSLs by uniting abstraction with optimization control.
Abstract
We describe Active Libraries, which take an active role in compilation. Unlike traditional libraries which are passive collections of functions and objects, Active Libraries may generate components, specialize algorithms, optimize code, configure and tune themselves for a target machine, and describe themselves to tools (such as profilers and debuggers) in an intelligible way. Several such libraries are described, as are implementation technologies.
