Commit graph

308 commits

Author SHA1 Message Date
Daphne Preston-Kendal
2781739291 Move REPL condition printing into the SRFI 35 implementation 2024-11-02 01:03:27 +01:00
Daphne Preston-Kendal
76f35bc733 Define define-condition-type/constructor with syntax-rules 2024-11-02 00:49:31 +01:00
Daphne Preston-Kendal
3777c1b935 Add SRFI 35 support 2024-11-02 00:49:31 +01:00
Alex Shinn
dce487fa3a c64/128 default values should be complex 2024-09-11 22:40:46 +09:00
Alex Shinn
2acef43da7 array-freeze! also makes the underlying storage immutable 2024-09-11 10:14:37 +09:00
Alex Shinn
0516e62b0b f*-storage-class defaults should be inexact 2024-09-11 10:14:37 +09:00
Alex Shinn
d4028f953b Tentatively manually encoding non-finite f16 values.
Issue #988.
2024-06-02 22:31:25 +09:00
Alex Shinn
3be1603f45 fix srfi 159 loading
Closes #905.
2024-06-02 17:51:34 +09:00
Alex Shinn
925c044eef Updating AUTHORS. 2024-05-31 19:25:48 +09:00
Alex Shinn
193424f74d Add assertion for copy-on-failure? type.
Closes #987.
2024-05-31 18:46:39 +09:00
Alex Shinn
0b55c0b718 Fix copying reshape.
Closes #986.
2024-05-31 09:50:07 +09:00
Alex Shinn
4b5ab838e2 record the start dir when loading SRFI 193
Closes #922
2024-05-30 23:09:37 +09:00
Alex Shinn
414a23139f Fix reshape zero-dimensional and empty arrays.
Issue #986.
2024-05-30 22:37:06 +09:00
Alex Shinn
5e74c5ff54 add data domain checks for generic-storage-class
Closes #985.
2024-05-30 19:09:54 +09:00
Alex Shinn
8e3fd8f00c Add error checking for storage class data.
Closes #981.
2024-05-30 09:28:38 +09:00
Alex Shinn
832d82c494 Fix array-inner-product, fail fast for empty arrays.
Closes #982.
2024-05-29 21:42:20 +09:00
Alex Shinn
b5de5eca92 interval-cartesian-product should accept zero args
Closes #983.
2024-05-29 09:08:26 +09:00
Alex Shinn
e737e48955 Fix interval-intersect for degenerate axes.
Closes #984.
2024-05-29 09:04:46 +09:00
Alex Shinn
609c78c0ca Forgot to add file for (srfi 160 mini). 2024-05-28 23:13:18 +09:00
Alex Shinn
36d7881763 Update to n-ary array-fold-* with correct arg order.
Closes #973.
2024-05-28 22:35:31 +09:00
Alex Shinn
78a990c73b Don't pre-filter empty arrays in array-append.
Closes #977.
2024-05-28 09:35:39 +09:00
Alex Shinn
11984c6eb3 Fix flatten-vector->list on empty vectors.
Closes #976.

Complements of Bradley Lucier.
2024-05-27 23:05:15 +09:00
Alex Shinn
2b1d2d99a8 Fix array-append for non-zero based intervals.
Closes #972.
2024-05-27 23:01:34 +09:00
Alex Shinn
a8939fecd0 array-stack should use the specified storage-class
The original code was based on (chibi math linalg)
which preferred the domain of the stacked arrays.
2024-05-27 18:33:24 +09:00
Alex Shinn
07f3301cc8 interval-contains-multi-index? should handle 0 dimensions
Closes #974.

Commit on behalf of Bradley Lucier.
2024-05-27 18:28:41 +09:00
Alex Shinn
4396e8dd4e Handle empty vector. 2024-05-27 13:21:24 +09:00
Alex Shinn
418d5c8a8c Build up empty arrays of higher dimensions for list/vector*->array
Issue #962.
2024-05-27 12:40:13 +09:00
Alex Shinn
f9e3ed1639 guard against mutation in make-interval
Closes #971
2024-05-27 09:29:37 +09:00
Alex Shinn
7923b1c46d Add array-empty?
Closes #969.
2024-05-27 09:27:42 +09:00
Alex Shinn
2f32ec6ba1 vector->array fix for optional args
Closes #968

Thanks Bradley Lucier!
2024-05-27 09:25:39 +09:00
Alex Shinn
db53df7df4 Fix some array-tile domain assertions.
Closes #966.

Fix complements of Bradley Lucier.
2024-05-26 22:04:22 +09:00
Alex Shinn
953f3ada23 allow noop (index-rotate n n)
Closes #965.
2024-05-26 22:00:43 +09:00
Alex Shinn
c96b0123a0 array-reduce should fail for empty arrays
Closes #964.
2024-05-26 21:58:00 +09:00
Alex Shinn
f4add6d188 Fix list/vector*->array for 0 dimensions.
Closes #962.
2024-05-26 21:54:28 +09:00
Alex Shinn
698dcb2bfb Fix list/vector*->array for list elements.
Issue #962.
2024-05-25 22:41:45 +09:00
Alex Shinn
6c49071833 Factor out (srfi 160 mini) for f8/f16 base.
Closes #961.

Import this instead of the full vector libs for (srfi 231).

Also fix install of full vector libs for (srfi 160).
2024-05-25 22:15:10 +09:00
Alex Shinn
afda4ab979 Fix array-any.
Closes #963.
2024-05-25 22:06:23 +09:00
Alex Shinn
89dd02d55e Fix interval iteration for empty intervals.
Closes #959.
2024-05-24 22:29:44 +09:00
Alex Shinn
0ce4614457 Add array-packed? tests on empty arrays.
Issue #959.
2024-05-24 19:42:00 +09:00
Alex Shinn
09a5c431a2 array-tile widths can exceed the axis width
Closes #958.
2024-05-24 19:35:33 +09:00
Alex Shinn
33a59952a8 Implement and use array-freeze!
Fixes #960.
2024-05-24 19:20:14 +09:00
Alex Shinn
f60298b707 Initial half and quarter precision uniform vectors.
Quarter precision is 1.5.2 format.
Used to implement f16-storage-class and f8-storage-class.
Can be disabled at compile time.
2024-05-24 19:04:44 +09:00
Alex Shinn
e4568bd419 Use #\null as the default for char-storage-class 2024-05-23 21:37:12 +09:00
Alex Shinn
ef4e450af7 Fix element initialization for char arrays.
Closes #957.
2024-05-23 10:47:36 +09:00
Alex Shinn
4677cfb85b fix vector*->array 2024-05-23 10:38:16 +09:00
Alex Shinn
37dda638c3 Implement array-block. 2024-05-22 23:15:43 +09:00
Alex Shinn
65589e3e26 Fix default coeffs for the degenerate dimension case. 2024-05-22 22:02:27 +09:00
Alex Shinn
7ac3cfebe1 Update to new make-specialized-array signature. 2024-05-14 21:46:25 +09:00
Alex Shinn
2e09a082c8 Fix SRFI 231 tests. 2024-05-13 22:10:49 +09:00
Ekaitz Zarraga
967b888d8c Reduce iterations in concatenate!
This commit should reduce the amount of iterations in concatenate to N
where N is the sum of the lengths of the input lists.

The previous implementation iterated from the beginning in each
concatenation because of `last-pair`.

This implementation is significantly faster in this extreme case:

(concatenate! `(,(iota 50000) ,@(map list (iota 500))))

>> Previous implementation:
real	0m0.671s
user	0m0.658s
sys	0m0.013s

>> This implementation:
real	0m0.175s
user	0m0.174s
sys	0m0.001s

The tests is done using `time`, which is not reliable at all, but using
`(trace last-pair)` shows accurately what happens with the iterations.
2024-01-09 17:18:41 +01:00