dolfinx icon indicating copy to clipboard operation
dolfinx copied to clipboard

Remove dynamic memory allocations inside lowest level assembly functions

Open garth-wells opened this issue 7 months ago • 2 comments

This will allow the lowest lever assembly functions to be executed efficiently for small batches of cells.

Also makes a number of simplifications following careful review of code.

garth-wells avatar Jun 11 '25 20:06 garth-wells

It would be also neat to check no heap allocation in certain scopes. Clang (>=19) has [[clang::nonallocating]] attribute, https://clang.llvm.org/docs/FunctionEffectAnalysis.html#the-nonblocking-and-nonallocating-attributes Requires extra -Wfunction-effects pass.

michalhabera avatar Jun 15 '25 14:06 michalhabera

That flag could be passed to the clang-tidy linting run in https://github.com/FEniCS/dolfinx/pull/3722. Clang tidy hooks into a LLVM based compile anyways.

schnellerhase avatar Jun 16 '25 07:06 schnellerhase

Will update and merge in smaller pieces.

garth-wells avatar Sep 11 '25 13:09 garth-wells