Skip to content

Commit 65b8897

Browse files
committed
final tweaks
1 parent 756f252 commit 65b8897

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

pkg/air/gadgets/lexicographic_sort.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import (
4040
// ensure it is positive. The delta column is constrained to a given bitwidth,
4141
// with constraints added as necessary to ensure this.
4242
func ApplyLexicographicSortingGadget(prefix string, columns []uint, signs []bool, bitwidth uint, schema *air.Schema) {
43-
fmt.Printf("Columns: source (%d) vs signs (%d), bitwidth: %d\n", len(columns), len(signs), bitwidth)
4443
// Check preconditions
4544
if len(columns) < len(signs) {
4645
panic("Inconsistent number of columns and signs for lexicographic sort.")

pkg/mir/lower.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ func lowerSortedConstraintToAir(c SortedConstraint, mirSchema *Schema, airSchema
214214
sources[i] = air_gadgets.Expand(c.Context, sourceBitwidth, source, airSchema)
215215
}
216216
// Determine number of ordered columns
217-
ncols := len(c.Signs)
217+
numSignedCols := len(c.Signs)
218218
// finally add the constraint
219-
if ncols == 1 {
219+
if numSignedCols == 1 {
220220
// For a single column sort, its actually a bit easier because we don't
221221
// need to implement a multiplexor (i.e. to determine which column is
222222
// differs, etc). Instead, we just need a delta column which ensures
@@ -231,7 +231,7 @@ func lowerSortedConstraintToAir(c SortedConstraint, mirSchema *Schema, airSchema
231231
// Sanity check bitwidth
232232
bitwidth := uint(0)
233233

234-
for i := 0; i < ncols; i++ {
234+
for i := 0; i < numSignedCols; i++ {
235235
// Extract bitwidth of ith column
236236
ith := mirSchema.Columns().Nth(sources[i]).DataType.AsUint().BitWidth()
237237
if ith > bitwidth {

0 commit comments

Comments
 (0)