pystencils.backend.ast.vector.PsVecMemAcc#

class pystencils.backend.ast.vector.PsVecMemAcc(base_ptr, offset, vector_entries, stride=None, aligned=False)#

Pointer-based vectorized memory access.

Parameters:
  • base_ptr (PsExpression) – Pointer identifying the accessed memory region

  • offset (PsExpression) – Offset inside the memory region

  • vector_entries (int) – Number of elements to access

  • stride (Optional[PsExpression]) – Optional integer step size for strided access, or None for contiguous access

  • aligned (bool) – For contiguous accesses, whether the access is guaranteed to be naturally aligned according to the vector data type

get_children()#

Retrieve child nodes of this AST node

This operation must be implemented by subclasses.

Return type:

tuple[PsAstNode, ...]

set_child(idx, c)#

Update a child node of this AST node.

This operation must be implemented by subclasses.

Parameters:
_clone_expr()#

Implementation of expression cloning.

Return type:

PsVecMemAcc

structurally_equal(other)#

Check two ASTs for structural equality.

By default this method checks the node’s type and children. If an AST node has additional internal state, it MUST override this method.

Return type:

bool

Parameters:

other (PsAstNode)