Commit Graph

260 Commits

Author SHA1 Message Date
dzaima
5098781ffc replace all bitarr_ptr usages with bitany_ptr 2024-08-15 17:36:43 +03:00
dzaima
920a89f019 native ⋈⁼ & ⌾⋈
plus some more undo & under tests
2024-08-14 05:18:13 +03:00
Marshall Lochbaum
ce98efc525 Transform atom⊸⌽⎉k into a single high-rank ⌽ call 2024-07-05 17:44:42 -04:00
Marshall Lochbaum
d89a6da2da Evaluate monadic «» on a length-1 argument by reshaping the fill 2024-07-05 17:44:42 -04:00
Marshall Lochbaum
ab15eaeeeb Length-1 reverse is a no-op 2024-07-04 12:04:00 -04:00
dzaima
ae3128c180 relax CHECK_IA in takedrop_highrank
future overflow in ria*elWidth when allocating shouldn't be a worry as all such calculations should be done in u64, and CHECK_IA(x, 1) guarantees that x is (much) less than 2^60 in both usz configurations
2024-06-05 02:30:00 +03:00
dzaima
8044c560a4 faster atom∾atom 2024-06-01 16:22:34 +03:00
Andrea Piseri
7f28308e44 native path in select_ucw for high rank 𝕩
`𝔽⌾(a⊸⊏)𝕩` now does not need to go through the self-hosted runtime if
`1<=𝕩`. Instead the `select_replace` helper function is parametrized
over the length of `𝕩` (`xl`) and item amount of the cell of `𝕩` (`xcia`).

- The `EQ` macro is modified to not immediately mark the cell as
  populated, so that multiple replacements can be done on the cell
  on the first assignment to it.

- The `DONE_CW` macro is invoked to mark the current cell as populated
  when every element in it has been assigned.

- A loop over the cell contents is introduced to copy the elements in
  `𝕩`. This should be fine as it is an easily predictable jump,
  but a performance regression is possible and a separate code path
  could be introduced in the future.

The change introduces more extensive checking on the shape of `𝔽`'s
result, as for high rank `𝕩` the requirement should be `(≢𝔽a⊏𝕩)≡(≢a)∾1↓≢𝕩`.

The old behaviour of `select_replace` is recovered by passing `xl=xia`
and `xcia=1` in the implementation of `pick_ucw`.
2024-05-18 12:12:17 +02:00
dzaima
a75522c738 fix list⌽𝕩 2024-04-04 02:52:08 +03:00
dzaima
d4f290a897 error on nonInteger⌽⟨⟩ 2024-04-03 17:09:27 +03:00
dzaima
694920c273 minor code cleanup 2024-02-27 00:40:16 +02:00
dzaima
1318026c4e a bunch of vfor 2024-02-13 22:34:16 +02:00
dzaima
f981f6963b use ux for loop index in reverse
makes gcc autovectorizer happier
2024-02-13 22:31:22 +02:00
dzaima
5abb09ca74 remove barely-useful elType==el_i32 path of reshape
perhaps could be replaced with an <=el_i32 path that still uses GetU but just skips numberness/integerness checks and ∘/⌊/⌽/↑ logic
2024-02-13 22:30:11 +02:00
dzaima
73a2b06703 more PLAINLOOP 2024-02-08 19:26:35 +02:00
dzaima
ffffdb5895 relax take/drop overflow checking 2024-01-19 18:03:54 +02:00
dzaima
f0c1962596 more typed ⌾(list⊸⊏) 2023-12-19 17:41:17 +02:00
dzaima
f037754880 more specific empty array types 2023-11-13 23:16:02 +02:00
dzaima
8c7a3be036 remove unused includes 2023-11-13 21:48:01 +02:00
dzaima
9cfc3f3f25 various changes on filling arrays with the same element 2023-07-12 16:23:03 +03:00
dzaima
acbfcd7302 fix another weird case of 𝕨∾𝕩 2023-07-10 22:55:00 +03:00
dzaima
3872f5a625 fix 𝕨∾𝕩 reuse logic 2023-05-22 11:40:37 +03:00
dzaima
b093ebbc66 finish PICK_IDX message 2023-05-22 00:18:59 +03:00
dzaima
7f46de18fc add missed refcount decrements 2023-05-20 01:30:02 +03:00
dzaima
0156d13a5e proper arrow in error messages of ⌾(n⊸↓) vs ⌾(n⊸↑) 2023-05-19 17:32:46 +03:00
dzaima
1ec4415e49 clean up some under functions in sfns.c 2023-05-19 13:15:51 +03:00
dzaima
b46477450d fix shape of argument passed to F in F⌾(is⊸⊑)
& skip computing the argument if not needed
2023-05-18 16:37:24 +03:00
dzaima
0572fcc5b2 native F⌾(list⊸⊑) & ⌾(listOfLists⊸⊑) 2023-05-18 01:54:01 +03:00
dzaima
d310669ae8 unify F⌾(n⊸⊑) and F⌾⊑ 2023-05-18 00:27:38 +03:00
dzaima
0598ce8357 use getFillQ less 2023-05-09 00:14:14 +03:00
dzaima
8177b668f4 fix ∾𝕩 error checking 2023-05-05 19:54:43 +03:00
dzaima
0e79e9f868 fix ubsan notes 2023-04-30 19:50:24 +03:00
dzaima
35786d4f5b m_hVec\d → m_hvec\d 2023-04-29 17:39:13 +03:00
dzaima
3b580cbd0c rename unit creation methods 2023-04-29 17:39:13 +03:00
dzaima
865257fdb6 more header file cleanup 2023-04-29 17:39:13 +03:00
dzaima
7f0390be3f more error messages 2023-04-28 20:49:34 +03:00
dzaima
7dd677a4e2 various fill improvements 2023-04-28 20:31:44 +03:00
dzaima
7a501ffbdf use APD for ∾list 2023-04-28 20:17:44 +03:00
dzaima
e0479adee4 fix rank overflow check in 𝕨⥊𝕩 2023-04-22 11:53:54 +03:00
dzaima
c57e0ba135 more fixes for overflow checking 2023-04-17 13:07:50 +03:00
dzaima
c2754e0fff don't OOM in 𝕨↑𝕩 with 0≡×´𝕨 if product of prefix overflows 2023-04-17 12:53:02 +03:00
dzaima
9951f20751 clean up some error messages 2023-04-08 22:12:15 +03:00
dzaima
0aca470931 more explicit inline requiring 2023-04-06 13:12:11 +03:00
dzaima
1f70c08aa2 fillarr NOGC 2023-03-26 15:43:59 +03:00
Marshall Lochbaum
ff6361e363 Move tranpose to its own file 2023-03-22 15:14:08 -04:00
Marshall Lochbaum
0e2e315e51 Allow an 8x8 row for 2-byte transpose 2023-03-22 15:14:08 -04:00
Marshall Lochbaum
239c765998 SIMD transpose on 2-byte elements 2023-03-22 15:14:08 -04:00
Marshall Lochbaum
c0aaa6f615 SIMD transpose on 8-byte elements 2023-03-22 15:14:08 -04:00
dzaima
4a6877a87a Rank checks 2023-03-19 15:42:11 +02:00
dzaima
8194f51b30 MAKE_MUT_INIT, move mut_init to mut.c 2023-03-11 16:52:09 +02:00