From f0aba2e948fef8f535644e80b0f7d35e0e5f60e0 Mon Sep 17 00:00:00 2001 From: zy69guqi <richard.angersbach@fau.de> Date: Thu, 24 Apr 2025 20:06:25 +0200 Subject: [PATCH] Document attributes of ReductionInfo --- src/pystencils/backend/kernelcreation/context.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/pystencils/backend/kernelcreation/context.py b/src/pystencils/backend/kernelcreation/context.py index 58a4bd7d1..63bfc2f7b 100644 --- a/src/pystencils/backend/kernelcreation/context.py +++ b/src/pystencils/backend/kernelcreation/context.py @@ -50,7 +50,16 @@ FieldArrayPair = namedtuple("FieldArrayPair", ("field", "array")) @dataclass(frozen=True) class ReductionInfo: """Information about a reduction operation, its neutral element in form of an initial value - and the pointer used by the kernel as write-back argument.""" + and the pointer used by the kernel as write-back argument. + + Attributes: + =========== + + reduction_op : Reduction operation being performed + init_val : Initial value used to initialize local symbol + local_symbol : Kernel-local symbol used to accumulate intermediate reduction result + writeback_ptr_symbol : Symbol that is used to export the final reduction result + """ op: ReductionOp init_val: PsExpression -- GitLab