-
-
Notifications
You must be signed in to change notification settings - Fork 672
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
[core/simd]: Write package documentation #4545
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Laytan <[email protected]>
} | ||
return res | ||
|
||
Example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! I should fix this then. I haven't read your comments below, but it should be okay to surround the code block with text that describes what the example achieves, right? Otherwise I feel like the purpose of example is defeated, unless it's explained at least a little bit.
+-------+-------+-------+-------+ | ||
res: | ||
+-------+-------+-------+--------+ | ||
| 0x44 | 0xaa | 0x06 | 0xfe | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay this one I have to refuse, I was assuming 1-byte lanes, which I should probably make explicit in the comments.
core/simd/simd.odin
Outdated
/* | ||
Saturated addition of SIMD vectors. | ||
|
||
The *saturated sum* is a sum, that upon overflow or underflow, instead of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I should rewrite this.
res := simd.gather(ptrs, defaults, mask) | ||
fmt.println(res) | ||
|
||
The code would print `<2, 127, 10, 127>`. First and the third positions came |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are indented with a tab. Thanks for Output:
tip!
Co-authored-by: Laytan <[email protected]>
Did some fixes, I think this one's ready for the final review. |
No description provided.