about summary refs log tree commit diff
path: root/library/core/src/intrinsics/simd.rs
AgeCommit message (Collapse)AuthorLines
2025-07-03setup CI and tidy to use typos for spellchecking and fix few typosklensy-2/+2
2025-06-15Add `simd_funnel_sh{l,r}` and `simd_round_ties_even`sayantn-0/+42
2025-05-12update cfg(bootstrap)Pietro Albini-2/+2
2025-05-01Rollup merge of #140034 - RalfJung:simd_select_bitmask-padding, r=workingjubileeGuillaume Gomez-3/+1
simd_select_bitmask: the 'padding' bits in the mask are just ignored Fixes https://github.com/rust-lang/rust/issues/137942: we documented simd_select_bitmask to require the 'padding' bits in the mask (the mask can sometimes be longer than the vector; I am referring to these extra bits as 'padding' here) to be zero, mostly because nobody felt like doing the research for what should be done when they are non-zero. However, codegen is already perfectly happy just ignoring them, so in practice they can have any value. Some of the intrinsic wrappers in stdarch have trouble ensuring that they are zero. So let's just adjust the docs and Miri to permit non-zero 'padding' bits. Cc ````@Amanieu```` ````@workingjubilee````
2025-04-20Rollup merge of #137953 - RalfJung:simd-intrinsic-masks, r=WaffleLapkinChris Denton-5/+5
simd intrinsics with mask: accept unsigned integer masks, and fix some of the errors It's not clear at all why the mask would have to be signed, it is anyway interpreted bitwise. The backend should just make sure that works no matter the surface-level type; our LLVM backend already does this correctly. The note of "the mask may be widened, which only has the correct behavior for signed integers" explains... nothing? Why can't the code do the widening correctly? If necessary, just cast to the signed type first... Also while we are at it, fix the errors. For simd_masked_load/store, the errors talked about the "third argument" but they meant the first argument (the mask is the first argument there). They also used the wrong type for `expected_element`. I have extremely low confidence in the GCC part of this PR. See [discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/257879-project-portable-simd/topic/On.20the.20sign.20of.20masks)
2025-04-20simd intrinsics with mask: accept unsigned integer masksRalf Jung-5/+5
2025-04-19simd_select_bitmask: the 'padding' bits in the mask are just ignoredRalf Jung-3/+1
2025-04-10add `simd_insert_dyn` and `simd_extract_dyn`Folkert de Vries-3/+36
2025-03-12intrinsics: remove unnecessary leading underscore from argument namesRalf Jung-68/+68
2025-03-01Rollup merge of #137828 - folkertdev:simd-intrinsic-doc-fixes, r=workingjubileeMatthias Krüger-36/+34
Fix inaccurate `std::intrinsics::simd` documentation This addresses two issues: - the docs on comparison operators (`simd_gt` etc.) said they only work for floating-point vectors, but they work for integer vectors too. - the docs on various functions that use a mask did not document that the mask must be a signed integer vector. Unsigned integer vectors would cause invalid behavior when the mask vector is widened (unsigned integers would use zero extension, producing incorrect results). r? ``@workingjubilee``
2025-03-01intrinsics::simd: document that masks must be signed integer vectorsFolkert de Vries-27/+27
this is because they may be widened, and that only works when sign extension is used: zero extension would produce invalid results
2025-03-01correct the docs on `simd_` comparison operatorsFolkert de Vries-15/+13
these all also accept integer vectors as arguments
2025-02-27make `simd_insert` and `simd_extract` `const fn`sFolkert de Vries-2/+2
2025-02-24remove uses of rustc_intrinsic_must_be_overridden from standard libraryRalf Jung-272/+68
2025-01-24ports last few library files to new intrinsic styleaaishwarymishra@gmail.com-665/+935
2025-01-08update cfg(bootstrap)Pietro Albini-1/+0
2024-12-04clarify simd_relaxed_fma non-determinismRalf Jung-1/+2
2024-11-23Match simd_relaxed_fma documentation to fmuladd intrinsicCaleb Zulawski-4/+8
2024-11-23Add simd_relaxed_fma intrinsicCaleb Zulawski-0/+10
2024-09-14simd_shuffle: require index argument to be a vectorRalf Jung-1/+1
2024-08-13simd_shuffle intrinsic: allow argument to be passed as vector (not just as ↵Ralf Jung-1/+1
array)
2024-07-26Fix doc nitsJohn Arundel-54/+55
Many tiny changes to stdlib doc comments to make them consistent (for example "Returns foo", rather than "Return foo", per RFC1574), adding missing periods, paragraph breaks, backticks for monospace style, and other minor nits. https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text
2024-07-25Stop using `unsized_const_parameters` in core/stdBoxy-12/+0
2024-07-05Auto merge of #126171 - RalfJung:simd_bitmask_multibyte, r=workingjubileebors-6/+13
simd_bitmask intrinsic: add a non-power-of-2 multi-byte example r? `@calebzulawski` `@workingjubilee`
2024-06-25simd_bitmask intrinsic: add a non-power-of-2 multi-byte exampleRalf Jung-6/+13
2024-06-24Fix simd_gather documentationPetteri Räty-3/+0
There is no idx in the function signature.
2024-06-11remove cfg(bootstrap)Pietro Albini-1/+0
2024-05-24Fix some SIMD intrinsics documentationMees Frensel-4/+4
2024-05-18compiler: add simd_ctpop intrinsicJubilee Young-0/+7
2024-05-01Step bootstrap cfgsMark Rousskov-13/+0
2024-04-03rename `expose_addr` to `expose_provenance`joboet-0/+6
2024-04-02Rollup merge of #122935 - RalfJung:with-exposed-provenance, r=AmanieuJacob Pratt-0/+7
rename ptr::from_exposed_addr -> ptr::with_exposed_provenance As discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/To.20expose.20or.20not.20to.20expose/near/427757066). The old name, `from_exposed_addr`, makes little sense as it's not the address that is exposed, it's the provenance. (`ptr.expose_addr()` stays unchanged as we haven't found a better option yet. The intended interpretation is "expose the provenance and return the address".) The new name nicely matches `ptr::without_provenance`.
2024-03-23Rollup merge of #122762 - RoboSchmied:RoboSchmied-typo, r=workingjubileeJubilee-1/+1
fix typo of endianness fix typo endianess -> endianness
2024-03-23also rename the SIMD intrinsicRalf Jung-0/+7
2024-03-20Update target.rs alloc.rs event.rs simd.rsRoboSchmied-1/+1
fix typos
2024-03-20step cfgsMark Rousskov-12/+1
2024-02-25remove platform-intrinsics ABI; make SIMD intrinsics be regular intrinsicsRalf Jung-1/+79
2024-02-21remove simd_reduce_{min,max}_nanlessRalf Jung-26/+0
2024-02-21make simd_reduce_{mul,add}_unordered use only the 'reassoc' flag, not all ↵Ralf Jung-12/+4
fast-math flags
2024-02-21intrinsics::simd: add missing functionsRalf Jung-0/+103
2024-02-20Rollup merge of #119203 - farnoy:simd-masked-intrinsic-docfix, r=RalfJungMatthias Krüger-4/+6
Correct the simd_masked_{load,store} intrinsic docs Explains the uniform pointer being used for these two operations and how elements are offset from it.
2024-02-20Correct the simd_masked_{load,store} intrinsic docsJakub Okoński-4/+6
2024-02-10various docs tweaksRalf Jung-7/+7
2024-02-10simd_scatter: mention left-to-right orderRalf Jung-0/+3
2024-02-10add more missing simd intrinsicsRalf Jung-0/+32
2024-02-10simd intrinsics: add simd_shuffle_genericRalf Jung-3/+16
2023-12-22update cfg(bootstrap)sPietro Albini-2/+0
2023-12-18Disable new intrinsics for bootstrapCaleb Zulawski-0/+2
2023-12-17Add new intrinsicsCaleb Zulawski-0/+39
2023-12-17Further explain semanticsCaleb Zulawski-2/+13