Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SRFI 231: Declare char-storage-class, fix interval-projections #937

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/srfi/231.sld
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
u64-storage-class f8-storage-class f16-storage-class
f32-storage-class f64-storage-class
c64-storage-class c128-storage-class
char-storage-class
storage-class-data? storage-class-data->body
;; Arrays
make-array array? array-domain array-getter array-dimension
Expand Down
10 changes: 6 additions & 4 deletions lib/srfi/231/base.scm
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,12 @@
(vector-every < i (interval-ub iv)))))

(define (interval-projections iv rd)
(values (make-interval (vector-copy (interval-lb iv) 0 rd)
(vector-copy (interval-ub iv) 0 rd))
(make-interval (vector-copy (interval-lb iv) rd)
(vector-copy (interval-ub iv) rd))))
(assert (interval? iv))
(let ((n (vector-length (interval-lb iv))))
(values (make-interval (vector-copy (interval-lb iv) 0 (- n rd))
(vector-copy (interval-ub iv) 0 (- n rd)))
(make-interval (vector-copy (interval-lb iv) (- n rd))
(vector-copy (interval-ub iv) (- n rd))))))

(define (rev-index-next! rev-index rev-lowers rev-uppers)
(cond
Expand Down
Loading