Skip to content
Snippets Groups Projects
Commit 979ee93b authored by João Victor Tozatti Risso's avatar João Victor Tozatti Risso Committed by Martin Bauer
Browse files

Code generation for field serialization into buffers

Concept: Generate code involving the (un)packing of fields (from)to linear
(1D) arrays, i.e. (de)serialization of the field values for buffered
communication.

A linear index is generated for the buffer, by inferring the strides and
variables of the loops over fields in the AST. In the CPU, this information is
obtained through the makeLoopOverDomain function, in
pystencils/transformations/transformations.py. On CUDA, the strides of
the fields (excluding buffers) are combined with the indexing variables to infer
the indexing of the buffer.

What is supported:
    - code generation for both CPU and GPU
    - (un)packing of fields with all the memory layouts supported by
    pystencils
    - (un)packing slices of fields (from)into the buffer
    - (un)packing subsets of cell values from the fields (from)into the buffer

Limitations:

- assumes that only one buffer and one field are being operated within
each kernel, however multiple equations involving the...
parent 5c0375c4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment