Refactor collection of header files. Refactor C++ data type modelling. Extend generator script test suite.
This rather large MR introduces a number of changes to header file collection, C++ type modelling and the lang.cpp
API, and the generator script test suite.
Header file collection
This MR simplifies and clarifies the way information about required header files is modelled and collected by the SFG.
- Remove
required_headers
properties fromAugExpr
andSfgVar
- Introduce
HeaderFile
typeclass to model header files - For variables, attach all header information to their data type; introduce
CppType
and thecpptype
utility to simplify creating C++ type classes and specifying their associated headers - Have
DependentExpression
track required headers in the same way as variables; introduceincludes()
query to collect header files form allExprLike
alternatives - Update
ir.call_tree
nodes to allow dynamic tracking of headers - Update composer to transfer header information from AugExprs to the IR where required
- Update header collection to include headers for constructor and function parameters
C++ types and API Mirror
We clean up and refactor the C++ API mirror in accordance to the above changes.
- Deprecate all
std_<field type>_ref
factory functions in favor of<>.from_field()
static methods - Refactor C++ STL AugExpr classes to use the
cpptype
utility - Refactor exposition of STL classes through
lang.cpp.std
Generator Script Test Suite
The generator script test suite is heavily refactored and extended to become the primary testing driver for pystencils-sfg.
- Introduce a YAML index file to define and configure all generator script tests
- Remove static output checking against files in
expected
folder in favor of regex-based checks - Introduce test harnesses that are compiled against generated code and executed to check correctness dynamically
Merge request reports
Activity
changed milestone to %Version 0.1
requested review from @ob28imeq
assigned to @da15siwa
- Resolved by Christoph Alt
- Resolved by Christoph Alt
- Resolved by Christoph Alt
- Resolved by Christoph Alt
I got in the unfortunate situation that my application was dependent on certain of the header includes: When using sycl in combination with the mdspan library <sycl/sycl.hpp> needs to be included before the "experimental/mdspan" header. I solved this by skipping the clang_format and explicitly including the sycl header via
sfg.include("<sycl/sycl.hpp>")
. Is it currently possible to enforce a certain order of header includes? Or might this something to consider? I hope that these kind of issues are more a edge case problem and will be resolved if there is a implementation of thestd::mdspan
in the standard library
added 1 commit
- a487d2e7 - fix ref default value for span and mdspan; set default mdspan extents type to uint64
added 1 commit
- 3eaa5dbb - add `const` parameter to span, mdspan, vector factory functions
added 1 commit
- 5c942c66 - update mdspan implementation; allow to configure mdspan header and namespace
added 1 commit
- 81df328b - remove copy of mdspan reference implementation; instead download a version on-demand.
I've also patched the test suite to download an implementation of
mdspan
on-demand. Seemed cleaner to me than vendoring one, and makes it easier to update. Sorry for all the last-minute changes, I promise this is the last :)Edited by Frederik Hennigmentioned in commit af3aaea8