-
Notifications
You must be signed in to change notification settings - Fork 88
Implement core::ops
#10
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
c919d49
Add vector-vector arithmetic ops
calebzulawski 7eef31e
Improve operator implementations
calebzulawski 3124cea
Add operators and integer conversions for masks
calebzulawski 54dff9f
Add unary traits
calebzulawski 163f6eb
Implement Index and IndexMut
calebzulawski 8e60378
Implement by-ref ops for masks
calebzulawski 65ab3c0
Add missing assignment ops on masks
calebzulawski cc75371
Document intrinsics
calebzulawski 913efef
Remove some macro magic and unnecessary trait
calebzulawski aa0caa9
Fix Not implementation
calebzulawski 6512c6e
Add lhs scalar ops, fix Rem unsoundness
calebzulawski 2266775
Implement format traits for masks and add floating point ops tests
calebzulawski f4ebc9d
Fix Neg for floats
calebzulawski f1273af
Simplify operator generation macros
calebzulawski d428859
Add integer tests
calebzulawski d4c5d2d
Add mask tests
calebzulawski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
//! This module contains the LLVM intrinsics bindings that provide the functionality for this | ||
//! crate. | ||
//! | ||
//! The LLVM assembly language is documented here: https://llvm.org/docs/LangRef.html | ||
|
||
/// These intrinsics aren't linked directly from LLVM and are mostly undocumented, however they are | ||
/// simply lowered to the matching LLVM instructions by the compiler. The associated instruction | ||
/// is documented alongside each intrinsic. | ||
extern "platform-intrinsic" { | ||
/// add/fadd | ||
pub(crate) fn simd_add<T>(x: T, y: T) -> T; | ||
|
||
/// sub/fsub | ||
pub(crate) fn simd_sub<T>(x: T, y: T) -> T; | ||
|
||
/// mul/fmul | ||
pub(crate) fn simd_mul<T>(x: T, y: T) -> T; | ||
|
||
/// udiv/sdiv/fdiv | ||
pub(crate) fn simd_div<T>(x: T, y: T) -> T; | ||
|
||
/// urem/srem/frem | ||
pub(crate) fn simd_rem<T>(x: T, y: T) -> T; | ||
|
||
/// shl | ||
pub(crate) fn simd_shl<T>(x: T, y: T) -> T; | ||
|
||
/// lshr/ashr | ||
pub(crate) fn simd_shr<T>(x: T, y: T) -> T; | ||
|
||
/// and | ||
pub(crate) fn simd_and<T>(x: T, y: T) -> T; | ||
|
||
/// or | ||
pub(crate) fn simd_or<T>(x: T, y: T) -> T; | ||
|
||
/// xor | ||
pub(crate) fn simd_xor<T>(x: T, y: T) -> T; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.