Peano
Loading...
Searching...
No Matches
exahype2.api.dslhype.kernels Namespace Reference

Functions

 translate_dslhype_function (function, function_namespace, template_parameters, functor_parameters, pde_terms, output_file_name, Target target, bool stateless, str function_name=None, str output_directory=".")
 function_name: str Name of the generated C++ function.

Function Documentation

◆ translate_dslhype_function()

exahype2.api.dslhype.kernels.translate_dslhype_function ( function,
function_namespace,
template_parameters,
functor_parameters,
pde_terms,
output_file_name,
Target target,
bool stateless,
str function_name = None,
str output_directory = "." )

function_name: str Name of the generated C++ function.

Defaults to the name of the Python DSL function passed in as function.

output_directory: str Directory the kernels/ subdirectory with the generated files is created in, usually the Peano project's directory.

Remarks
Existing files are appended to, not overwritten Several functions of one project end up in the same files (kernels/{output_file_name}.h and .cpph/.cpp), so the translation appends. Running a generator script a second time in the same directory therefore duplicates the kernels, and the project does not compile ("redefinition of ..."). Remove the kernels/ directory before you regenerate.

Definition at line 8 of file kernels.py.