From 045b9c66f3bf2ee73bc865927b021d9304a4779c Mon Sep 17 00:00:00 2001 From: Markus Holzer <markus.holzer@fau.de> Date: Wed, 9 Feb 2022 15:41:06 +0100 Subject: [PATCH] Fix docstring --- doc/sphinx/kernel_compile_and_call.rst | 6 +++--- pystencils/config.py | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/doc/sphinx/kernel_compile_and_call.rst b/doc/sphinx/kernel_compile_and_call.rst index 5293dc5a..2ceab612 100644 --- a/doc/sphinx/kernel_compile_and_call.rst +++ b/doc/sphinx/kernel_compile_and_call.rst @@ -11,11 +11,11 @@ Creating kernels .. autoclass:: pystencils.CreateKernelConfig :members: -.. autofunction:: pystencils.create_domain_kernel +.. autofunction:: pystencils.kernelcreation.create_domain_kernel -.. autofunction:: pystencils.create_indexed_kernel +.. autofunction:: pystencils.kernelcreation.create_indexed_kernel -.. autofunction:: pystencils.create_staggered_kernel +.. autofunction:: pystencils.kernelcreation.create_staggered_kernel Code printing diff --git a/pystencils/config.py b/pystencils/config.py index 22b0a5ff..3fea3f37 100644 --- a/pystencils/config.py +++ b/pystencils/config.py @@ -75,23 +75,25 @@ class CreateKernelConfig: """ gpu_indexing: str = 'block' """ - Either 'block' or 'line' , or custom indexing class, see `AbstractIndexing` + Either 'block' or 'line' , or custom indexing class, see `pystencils.gpucuda.AbstractIndexing` """ gpu_indexing_params: MappingProxyType = field(default=MappingProxyType({})) """ Dict with indexing parameters (constructor parameters of indexing class) e.g. for 'block' one can specify '{'block_size': (20, 20, 10) }'. """ + # TODO rework this docstring default_assignment_simplifications: bool = False """ If `True` default simplifications are first performed on the Assignments. If problems occur during the - simplification a warning will be thrown. - Furthermore, it is essential to know that this is a two-stage process. The first stage of the process acts - on the level of the `AssignmentCollection`. In this part, `create_simplification_strategy` - from pystencils.simplificationfactory will be used to apply optimisations like insertion of constants to - remove pressure from the registers. Thus the first part of the optimisations can only be executed if - an `AssignmentCollection` is passed. The second part of the optimisation acts on the level of each Assignment - individually. In this stage, all optimisations from `sympy.codegen.rewriting.optims_c99` are applied + simplification a warning will be thrown. + Furthermore, it is essential to know that this is a two-stage process. The first stage of the process acts + on the level of the `pystencils.AssignmentCollection`. In this part, + `pystencil.simp.create_simplification_strategy` from pystencils.simplificationfactory will be used to + apply optimisations like insertion of constants to + remove pressure from the registers. Thus the first part of the optimisations can only be executed if + an `AssignmentCollection` is passed. The second part of the optimisation acts on the level of each Assignment + individually. In this stage, all optimisations from `sympy.codegen.rewriting.optims_c99` are applied to each Assignment. Thus this stage can also be applied if a list of Assignments is passed. """ cpu_prepend_optimizations: List[Callable] = field(default_factory=list) -- GitLab