Skip to content

Commit

Permalink
add precendece to MultiIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorBaratta committed Dec 20, 2023
1 parent 4f6d40b commit 97ae5f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ffcx/codegeneration/expression_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def __init__(self, ir: ExpressionIR, backend: FFCXBackend):
def generate(self):
parts = []
parts += self.generate_element_tables()

# Generate the tables of geometry data that are needed
parts += self.generate_geometry_tables()
parts += self.generate_piecewise_partition()
Expand Down Expand Up @@ -122,7 +123,6 @@ def generate_quadrature_loop(self):
iq = self.backend.symbols.quadrature_loop_index
num_points = self.quadrature_rule.points.shape[0]
quadparts = [L.ForRange(iq, 0, num_points, body=body)]

return preparts, quadparts

def generate_varying_partition(self):
Expand Down
2 changes: 2 additions & 0 deletions ffcx/codegeneration/lnodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ def __repr__(self):
class MultiIndex(LExpr):
"""A multi-index for accessing tensors flattened in memory."""

precedence = PRECEDENCE.SYMBOL

def __init__(self, symbols: list, sizes: list):
self.dtype = DataType.INT
self.sizes = sizes
Expand Down

0 comments on commit 97ae5f5

Please sign in to comment.