Replace Scalar and Vector to a single Quantity that use @Vector #1

Merged
adrien merged 12 commits from simd into main 2026-04-25 23:29:30 +00:00
Owner
No description provided.
adrien added 12 commits 2026-04-25 23:29:19 +00:00
I did some benchmark, and @Vector(1, type) is just as fast as type for
float and around 40% slower for int.

But the traide off is ok for me, because for @Vector(>1, type), we are
between 2 and 32x faster! And I dont think single value int will be use
for high performance computing, so I am ok with how simple it make
everything.

Because now I dont have to one struct that use @Vector and one that use
just type, I can just use one. Making it even easier to integrate GPU
later. I will even be able to have a single place in my code with a + -
* and / basically. A single function for all, so I only need to optimize
that one.
.
Some checks failed
Deploy MkDocs to Garage / build-and-deploy (push) Failing after 2m17s
89e46f4cd4
Totally replaced Scalar with Quantity
Some checks failed
Deploy MkDocs to Garage / build-and-deploy (push) Failing after 49s
a591736b19
Working vector initiate
Some checks failed
Deploy MkDocs to Garage / build-and-deploy (push) Failing after 30s
c350ffd1d6
Replaced Vector with Quantity
Some checks failed
Deploy MkDocs to Garage / build-and-deploy (push) Failing after 25s
4b01dfe412
Added simd ref to action
Some checks failed
Deploy MkDocs to Garage / build-and-deploy (push) Failing after 27s
ae6b069da1
Fix
Some checks failed
Deploy MkDocs to Garage / build-and-deploy (push) Failing after 29s
58fd4d5797
adrien merged commit 81effc9815 into main 2026-04-25 23:29:30 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adrien/zig-dimal#1
No description provided.