@inproceedings{SelgradLierWittmannetal., author = {Selgrad, Kai and Lier, Alexander and Wittmann, Markus and Lohmann, Daniel and Stamminger, Marc}, title = {Defmacro for C: Lightweight, Ad Hoc Code Generation}, series = {Proceedings of ELS 2014 7th European Lisp Symposium ; May 5 - 6 2014, IRCAM, Paris, France}, booktitle = {Proceedings of ELS 2014 7th European Lisp Symposium ; May 5 - 6 2014, IRCAM, Paris, France}, issn = {2677-3465}, pages = {80 -- 87}, abstract = {We describe the design and implementation of CGen, a C code generator with support for Common Lisp-style macro expansion. Our code generator supports the simple and efficient management of variants, ad hoc code generation to capture reoccurring patterns, composable abstractions as well as the implementation of embedded domain specific languages by using the Common Lisp macro system. We demonstrate the applicability of our approach by numerous examples from small scale convenience macros over embedded languages to real-world applications in high-performance computing.}, language = {en} }