---
# System prepended metadata

title: GridTools C++ FN Backend Development Notes
tags: [Felix’s remains]

---

# GridTools C++ FN Backend Development Notes

###### tags: `Felix’s remains`

## Backend Backend API

```C++
void apply_stencil_stage(auto backend, auto const& sizes, auto stencil_stage, auto &&composite);

void apply_column_stage(auto backend, auto const& sizes, auto column_stage, auto &&composite, auto seed);

auto tmp_allocator(auto backend);

auto allocate_global_tmp(auto allocator, auto const& sizes);

```
`sizes` models the hymap concept, mapping dimension tags to values. Further, `stencil_stage` and `column_stage` follow the definitions at [#1671](https://github.com/GridTools/gridtools/issues/1671) respectively [#1673](https://github.com/GridTools/gridtools/issues/1673). `allocate_global_tmp` has to return an object that models SID.



### Future Considerations

- Temporary allocation should probably be aware of the vertical axis and optimize the data layout according to that knowledge. To enable this, an additional compile time argument to `allocate_global_tmp` is necessary.
- Currently, there are no restrictions on the sizes that may be passed to `allocate_global_tmp`, thus stride compaction has to be disabled (the returned SID should have a stride kind of `sid::unknown_kind`). If this leads to performance issues in the future, which we consider unlikely, the API or semantics require an update.