File tree Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1414 rival-compile
1515 rival-apply
1616 rival-analyze
17+ rival-analyze-with-hints
1718 (struct-out exn:rival)
1819 (struct-out exn:rival:invalid)
1920 (struct-out exn:rival:unsamplable)
8283 [else (loop (+ 1 iter))])))
8384
8485; Assumes that hint (if provided) is correct for the given rect
85- (define (rival-analyze machine rect [hint #f ])
86+ (define (rival-analyze-with-hints machine rect [hint #f ])
8687 ; Load arguments
8788 (rival-machine-load machine rect)
8889 (define-values (good? done? bad? stuck? fvec)
9192 (define-values (hint* hint*-converged?)
9293 (make-hint machine (or hint (rival-machine-default-hint machine))))
9394 (list (ival (or bad? stuck?) (not good?)) hint* hint*-converged?))
95+
96+ (define (rival-analyze machine rect)
97+ (car (rival-analyze-with-hints machine rect)))
Original file line number Diff line number Diff line change 9797 (define no-hint-cnt 0 )
9898 (for ([n (in-range number-of-random-hyperrects)])
9999 (define hyperrect (sample-hyperrect-within-bounds rect-lo rect-hi varc))
100- (match-define (list res hint converged?) (rival-analyze machine hyperrect))
100+ (match-define (list res hint converged?) (rival-analyze-with-hints machine hyperrect))
101101
102102 ; A little hack, the analyze below uses hint from the previous run
103103 ; The analyze results must be equal. If not, something wrong has happened
104- (match-define (list res* hint* converged?*) (rival-analyze machine hyperrect hint))
104+ (match-define (list res* hint* converged?*) (rival-analyze-with-hints machine hyperrect hint))
105105
106106 (with-check-info (['hyperrect hyperrect] ['hint hint])
107107 (check-equal? hint hint*)
Original file line number Diff line number Diff line change 11#lang info
22
33(define collection "rival " )
4- (define version "2.0 " )
4+ (define version "2.2 " )
55(define license 'MIT )
66
77;; Packaging information
Original file line number Diff line number Diff line change 9797 (->* (rival-machine? (vectorof value?))
9898 ((or/c (vectorof any/c) boolean?))
9999 (vectorof any/c))]
100- [rival-analyze
100+ [rival-analyze-with-hints
101101 (->* (rival-machine? (vectorof ival?)) ((or/c (vectorof any/c) boolean?)) (listof any/c))]
102+ [rival-analyze (-> rival-machine? (vectorof ival?) ival?)]
102103 [rival-profile (-> rival-machine? symbol? any/c)]
103104 [baseline-compile
104105 (-> (listof any/c) (listof symbol?) (listof discretization?) baseline-machine?)]
You can’t perform that action at this time.
0 commit comments