Skip to content

Commit

Permalink
Make assoc lists the right shape
Browse files Browse the repository at this point in the history
  • Loading branch information
gussmith23 committed Sep 17, 2024
1 parent 249efbe commit bddf86f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions racket/sketches.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -624,16 +624,20 @@
;;; TODO(@gussmith23): Resolve this hack. We are just calling the sketch generator to get the
;;; internal data, so we don't actually need to provide valid inputs, but we do need to
;;; indicate that there are two inputs.
(make-sketch-inputs #:data (list (cons 'unused 'unused) (cons 'unused 'unused))
(make-sketch-inputs #:data (list (cons 'unused (cons 'unused 'unused))
(cons 'unused (cons 'unused 'unused)))
#:output-width bitwidth)
#:internal-data bitwise-with-carry-internal-data)]

;;; TODO(@gussmith23): support more than 2 inputs on bitwise/bitwise-with-carry.
[fold-fn (lambda (next-to-add-expr acc-expr)
(first (bitwise-with-carry-sketch-generator
architecture-description
(make-sketch-inputs #:data (list (cons next-to-add-expr bitwidth)
(cons acc-expr bitwidth))
;;; TODO(@gussmith23): The use of 'unused here is ugly, but also the keys
;;; themselves are unused.
(make-sketch-inputs #:data
(list (cons 'unused (cons next-to-add-expr bitwidth))
(cons 'unused (cons acc-expr bitwidth)))
#:output-width bitwidth)
#:internal-data bitwise-with-carry-internal-data)))]

Expand Down

0 comments on commit bddf86f

Please sign in to comment.