mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
Merge commit '0557e3478104037c76c2e5be7ea21e56ebbaff6e' into sync-from-portable-simd-2026-04-11
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ For a given vector math operation on TxN, please add tests for interactions with
|
||||
- [ ] 0
|
||||
|
||||
|
||||
For a given vector math operation on TxN where T is a float, please add tests for test interactions with:
|
||||
For a given vector math operation on TxN where T is a float, please add tests for interactions with:
|
||||
- [ ] a really large number, larger than the mantissa
|
||||
- [ ] a really small "subnormal" number
|
||||
- [ ] NaN
|
||||
|
||||
+271
-159
@@ -2,6 +2,17 @@
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "async-trait"
|
||||
version = "0.1.89"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.5.0"
|
||||
@@ -10,41 +21,43 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.3.2"
|
||||
version = "2.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.19.0"
|
||||
version = "3.20.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
|
||||
checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.5.0"
|
||||
name = "cast"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
||||
checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.2.33"
|
||||
version = "1.2.58"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ee0f8803222ba5a7e2777dd72ca451868909b1ac410621b676adf07280e9b5f"
|
||||
checksum = "e1e928d4b69e3077709075a938a05ffbedfa53a84c8f766efbf8220bb1ff60e1"
|
||||
dependencies = [
|
||||
"find-msvc-tools",
|
||||
"shlex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.1"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268"
|
||||
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
||||
|
||||
[[package]]
|
||||
name = "core_simd"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
"proptest",
|
||||
"std_float",
|
||||
"test_helpers",
|
||||
@@ -52,6 +65,12 @@ dependencies = [
|
||||
"wasm-bindgen-test",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "find-msvc-tools"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
|
||||
|
||||
[[package]]
|
||||
name = "float-cmp"
|
||||
version = "0.10.0"
|
||||
@@ -62,31 +81,98 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.77"
|
||||
name = "futures-core"
|
||||
version = "0.3.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
|
||||
checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
|
||||
|
||||
[[package]]
|
||||
name = "futures-task"
|
||||
version = "0.3.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
|
||||
|
||||
[[package]]
|
||||
name = "futures-util"
|
||||
version = "0.3.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-task",
|
||||
"pin-project-lite",
|
||||
"slab",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
"libc",
|
||||
"r-efi",
|
||||
"wasip2",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.92"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cc4c90f45aa2e6eacbe8645f77fdea542ac97a494bcd117a67df9ff4d611f995"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"futures-util",
|
||||
"once_cell",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.27"
|
||||
name = "libc"
|
||||
version = "0.2.183"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
|
||||
checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
|
||||
|
||||
[[package]]
|
||||
name = "libm"
|
||||
version = "0.2.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
||||
|
||||
[[package]]
|
||||
name = "minicov"
|
||||
version = "0.3.7"
|
||||
version = "0.3.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f27fe9f1cc3c22e1687f9446c2083c4c5fc7f0bcf1c7a86bdbded14985895b4b"
|
||||
checksum = "4869b6a491569605d66d3952bcdf03df789e5b536e5f0cf7758a7f08a55ae24d"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nu-ansi-term"
|
||||
version = "0.50.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
|
||||
dependencies = [
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.2.19"
|
||||
@@ -94,13 +180,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"libm",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.21.3"
|
||||
version = "1.21.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
||||
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
||||
|
||||
[[package]]
|
||||
name = "oorandom"
|
||||
version = "11.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e"
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-lite"
|
||||
version = "0.2.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
|
||||
|
||||
[[package]]
|
||||
name = "ppv-lite86"
|
||||
@@ -113,52 +212,58 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.101"
|
||||
version = "1.0.106"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"
|
||||
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proptest"
|
||||
version = "0.10.1"
|
||||
version = "1.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "12e6c80c1139113c28ee4670dc50cc42915228b51f56a9e407f0ec60f966646f"
|
||||
checksum = "4b45fcc2344c680f5025fe57779faef368840d0bd1f42f216291f0dc4ace4744"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"byteorder",
|
||||
"num-traits",
|
||||
"rand",
|
||||
"rand_chacha",
|
||||
"rand_xorshift",
|
||||
"regex-syntax",
|
||||
"unarray",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.40"
|
||||
version = "1.0.45"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
|
||||
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.7.3"
|
||||
name = "r-efi"
|
||||
version = "5.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
|
||||
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.9.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
|
||||
dependencies = [
|
||||
"rand_chacha",
|
||||
"rand_core",
|
||||
"rand_hc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_chacha"
|
||||
version = "0.2.2"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
|
||||
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
|
||||
dependencies = [
|
||||
"ppv-lite86",
|
||||
"rand_core",
|
||||
@@ -166,28 +271,28 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.5.1"
|
||||
version = "0.9.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
|
||||
|
||||
[[package]]
|
||||
name = "rand_hc"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
|
||||
checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
|
||||
dependencies = [
|
||||
"rand_core",
|
||||
"getrandom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_xorshift"
|
||||
version = "0.2.0"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77d416b86801d23dde1aa643023b775c3a462efc0ed96443add11546cdf1dca8"
|
||||
checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a"
|
||||
dependencies = [
|
||||
"rand_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.8.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
|
||||
|
||||
[[package]]
|
||||
name = "rustversion"
|
||||
version = "1.0.22"
|
||||
@@ -203,12 +308,61 @@ dependencies = [
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.228"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
||||
dependencies = [
|
||||
"serde_core",
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_core"
|
||||
version = "1.0.228"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.228"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.149"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"memchr",
|
||||
"serde",
|
||||
"serde_core",
|
||||
"zmij",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "shlex"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
||||
|
||||
[[package]]
|
||||
name = "slab"
|
||||
version = "0.4.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
|
||||
|
||||
[[package]]
|
||||
name = "std_float"
|
||||
version = "0.1.0"
|
||||
@@ -221,9 +375,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.106"
|
||||
version = "2.0.117"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
|
||||
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -239,10 +393,16 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.18"
|
||||
name = "unarray"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
|
||||
checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
||||
|
||||
[[package]]
|
||||
name = "walkdir"
|
||||
@@ -255,49 +415,42 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.100"
|
||||
name = "wasip2"
|
||||
version = "1.0.2+wasi-0.2.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
|
||||
checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5"
|
||||
dependencies = [
|
||||
"wit-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.115"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6523d69017b7633e396a89c5efab138161ed5aafcbc8d3e5c5a42ae38f50495a"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
"rustversion",
|
||||
"wasm-bindgen-macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-backend"
|
||||
version = "0.2.100"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"log",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-futures"
|
||||
version = "0.4.50"
|
||||
version = "0.4.65"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61"
|
||||
checksum = "2d1faf851e778dfa54db7cd438b70758eba9755cb47403f3496edd7c8fc212f0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
"once_cell",
|
||||
"wasm-bindgen",
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.100"
|
||||
version = "0.2.115"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
|
||||
checksum = "4e3a6c758eb2f701ed3d052ff5737f5bfe6614326ea7f3bbac7156192dc32e67"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"wasm-bindgen-macro-support",
|
||||
@@ -305,44 +458,53 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.100"
|
||||
version = "0.2.115"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
|
||||
checksum = "921de2737904886b52bcbb237301552d05969a6f9c40d261eb0533c8b055fedf"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.100"
|
||||
version = "0.2.115"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
|
||||
checksum = "a93e946af942b58934c604527337bad9ae33ba1d5c6900bbb41c2c07c2364a93"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-test"
|
||||
version = "0.3.50"
|
||||
version = "0.3.65"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "66c8d5e33ca3b6d9fa3b4676d774c5778031d27a578c2b007f905acf816152c3"
|
||||
checksum = "1138411301a026d6662dc44e7076a74dbaa76a369312275eea5dee4d7dc68c7c"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"cast",
|
||||
"js-sys",
|
||||
"libm",
|
||||
"minicov",
|
||||
"nu-ansi-term",
|
||||
"num-traits",
|
||||
"oorandom",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
"wasm-bindgen-test-macro",
|
||||
"wasm-bindgen-test-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-test-macro"
|
||||
version = "0.3.50"
|
||||
version = "0.3.65"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "17d5042cc5fa009658f9a7333ef24291b1291a25b6382dd68862a7f3b969f69b"
|
||||
checksum = "186ddfe8383ba7ae7927bae3bb7343fd1f03ba2dbaf1474410f0d831131c269b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -350,113 +512,63 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "web-sys"
|
||||
version = "0.3.77"
|
||||
name = "wasm-bindgen-test-shared"
|
||||
version = "0.2.115"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
checksum = "f032e076ceb8d36d5921c6cef5bf447f2ca2bbd5439ce1683d68d1c99cc2be16"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-util"
|
||||
version = "0.1.9"
|
||||
version = "0.1.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
||||
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
||||
dependencies = [
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-link"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.59.0"
|
||||
version = "0.61.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
||||
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
||||
dependencies = [
|
||||
"windows-targets",
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.52.6"
|
||||
name = "wit-bindgen"
|
||||
version = "0.51.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm",
|
||||
"windows_aarch64_msvc",
|
||||
"windows_i686_gnu",
|
||||
"windows_i686_gnullvm",
|
||||
"windows_i686_msvc",
|
||||
"windows_x86_64_gnu",
|
||||
"windows_x86_64_gnullvm",
|
||||
"windows_x86_64_msvc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
||||
checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy"
|
||||
version = "0.8.26"
|
||||
version = "0.8.48"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f"
|
||||
checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9"
|
||||
dependencies = [
|
||||
"zerocopy-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy-derive"
|
||||
version = "0.8.26"
|
||||
version = "0.8.48"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181"
|
||||
checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zmij"
|
||||
version = "1.0.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
|
||||
|
||||
@@ -11,3 +11,8 @@ opt-level = 2
|
||||
|
||||
[profile.test.package.test_helpers]
|
||||
opt-level = 2
|
||||
|
||||
[workspace.dependencies.proptest]
|
||||
version = "1.11"
|
||||
default-features = false
|
||||
features = ["alloc", "f16"]
|
||||
|
||||
@@ -56,7 +56,7 @@ The list notes the bit widths available at each feature level, though the operat
|
||||
|
||||
### Selecting Additional Target Features
|
||||
|
||||
If you want to enable support for a target feature within your build, generally you should use a [target-feature](https://rust-lang.github.io/packed_simd/perf-guide/target-feature/rustflags.html#target-feature) setting within you `RUSTFLAGS` setting.
|
||||
If you want to enable support for a target feature within your build, generally you should use a [target-feature](https://rust-lang.github.io/packed_simd/perf-guide/target-feature/rustflags.html#target-feature) setting within your `RUSTFLAGS` setting.
|
||||
|
||||
If you know that you're targeting a specific CPU you can instead use the [target-cpu](https://rust-lang.github.io/packed_simd/perf-guide/target-feature/rustflags.html#target-cpu) flag and the compiler will enable the correct set of features for that CPU.
|
||||
|
||||
|
||||
@@ -18,9 +18,13 @@ wasm-bindgen = "0.2"
|
||||
wasm-bindgen-test = "0.3"
|
||||
|
||||
[dev-dependencies.proptest]
|
||||
version = "0.10"
|
||||
workspace = true
|
||||
|
||||
# Enable the `wasm_js` feature so that getrandom works on wasm32-unknown-unknown.
|
||||
[dev-dependencies.getrandom]
|
||||
version = "0.3.4"
|
||||
default-features = false
|
||||
features = ["alloc"]
|
||||
features = ["wasm_js"]
|
||||
|
||||
[dev-dependencies.test_helpers]
|
||||
path = "../test_helpers"
|
||||
|
||||
@@ -153,6 +153,16 @@ macro_rules! mask_alias {
|
||||
usizex64 64
|
||||
}
|
||||
|
||||
f16 = {
|
||||
f16x1 1
|
||||
f16x2 2
|
||||
f16x4 4
|
||||
f16x8 8
|
||||
f16x16 16
|
||||
f16x32 32
|
||||
f16x64 64
|
||||
}
|
||||
|
||||
f32 = {
|
||||
f32x1 1
|
||||
f32x2 2
|
||||
|
||||
@@ -44,6 +44,9 @@ impl SimdCast for u64 {}
|
||||
unsafe impl Sealed for usize {}
|
||||
impl SimdCast for usize {}
|
||||
// Safety: primitive number types can be cast to other primitive number types
|
||||
unsafe impl Sealed for f16 {}
|
||||
impl SimdCast for f16 {}
|
||||
// Safety: primitive number types can be cast to other primitive number types
|
||||
unsafe impl Sealed for f32 {}
|
||||
impl SimdCast for f32 {}
|
||||
// Safety: primitive number types can be cast to other primitive number types
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
#![no_std]
|
||||
#![feature(
|
||||
const_eval_select,
|
||||
convert_float_to_int,
|
||||
f16,
|
||||
core_intrinsics,
|
||||
decl_macro,
|
||||
intra_doc_pointers,
|
||||
repr_simd,
|
||||
simd_ffi,
|
||||
staged_api,
|
||||
prelude_import,
|
||||
ptr_metadata,
|
||||
rustc_attrs
|
||||
)]
|
||||
#![cfg_attr(doc, feature(intra_doc_pointers))]
|
||||
#![cfg_attr(
|
||||
all(
|
||||
any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "arm",),
|
||||
@@ -31,6 +30,7 @@
|
||||
any(target_arch = "powerpc", target_arch = "powerpc64"),
|
||||
feature(stdarch_powerpc)
|
||||
)]
|
||||
#![cfg_attr(target_arch = "hexagon", feature(stdarch_hexagon))]
|
||||
#![warn(missing_docs, clippy::missing_inline_in_public_items)] // basically all items, really
|
||||
#![deny(
|
||||
unsafe_op_in_unsafe_fn,
|
||||
|
||||
@@ -371,22 +371,20 @@ pub fn first_set(self) -> Option<usize> {
|
||||
// * perform _unsigned_ reduce-min
|
||||
// * check if the result is -1 or an index
|
||||
|
||||
let index = Simd::from_array(
|
||||
const {
|
||||
let mut index = [0; N];
|
||||
let mut i = 0;
|
||||
while i < N {
|
||||
index[i] = i;
|
||||
i += 1;
|
||||
}
|
||||
index
|
||||
},
|
||||
);
|
||||
let index: Simd<T, N> = const {
|
||||
let mut index = [0; N];
|
||||
let mut i = 0;
|
||||
while i < N {
|
||||
index[i] = i;
|
||||
i += 1;
|
||||
}
|
||||
// Safety: the input and output are integer vectors
|
||||
unsafe { core::intrinsics::simd::simd_cast(Simd::from_array(index)) }
|
||||
};
|
||||
|
||||
// Safety: the input and output are integer vectors
|
||||
let index: Simd<T, N> = unsafe { core::intrinsics::simd::simd_cast(index) };
|
||||
|
||||
let masked_index = self.select(index, Self::splat(true).to_simd());
|
||||
let masked_index: Simd<T, N> =
|
||||
unsafe { core::intrinsics::simd::simd_or((!self).to_simd(), index) };
|
||||
|
||||
// Safety: the input and output are integer vectors
|
||||
let masked_index: Simd<T::Unsigned, N> =
|
||||
|
||||
@@ -245,7 +245,7 @@ impl Shr::shr {
|
||||
// We don't need any special precautions here:
|
||||
// Floats always accept arithmetic ops, but may become NaN.
|
||||
for_base_ops! {
|
||||
T = (f32, f64);
|
||||
T = (f16, f32, f64);
|
||||
type Lhs = Simd<T, N>;
|
||||
type Rhs = Simd<T, N>;
|
||||
type Output = Self;
|
||||
|
||||
@@ -19,6 +19,8 @@ fn neg(self) -> Self::Output {
|
||||
}
|
||||
|
||||
neg! {
|
||||
impl<const N: usize> Neg for Simd<f16, N>
|
||||
|
||||
impl<const N: usize> Neg for Simd<f32, N>
|
||||
|
||||
impl<const N: usize> Neg for Simd<f64, N>
|
||||
|
||||
@@ -42,7 +42,7 @@ fn simd_ne(self, other: Self) -> Self::Mask {
|
||||
}
|
||||
}
|
||||
|
||||
impl_number! { f32, f64, u8, u16, u32, u64, usize, i8, i16, i32, i64, isize }
|
||||
impl_number! { f16, f32, f64, u8, u16, u32, u64, usize, i8, i16, i32, i64, isize }
|
||||
|
||||
macro_rules! impl_mask {
|
||||
{ $($integer:ty),* } => {
|
||||
|
||||
@@ -144,7 +144,7 @@ fn simd_ge(self, other: Self) -> Self::Mask {
|
||||
}
|
||||
}
|
||||
|
||||
impl_float! { f32, f64 }
|
||||
impl_float! { f16, f32, f64 }
|
||||
|
||||
macro_rules! impl_mask {
|
||||
{ $($integer:ty),* } => {
|
||||
|
||||
@@ -444,4 +444,4 @@ fn reduce_min(self) -> Self::Scalar {
|
||||
}
|
||||
}
|
||||
|
||||
impl_trait! { f32 { bits: u32, mask: i32 }, f64 { bits: u64, mask: i64 } }
|
||||
impl_trait! { f16 { bits: u16, mask: i16 }, f32 { bits: u32, mask: i32 }, f64 { bits: u64, mask: i64 } }
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#[doc(no_inline)]
|
||||
pub use super::{
|
||||
Mask, Simd,
|
||||
Mask, Select, Simd, ToBytes,
|
||||
cmp::{SimdOrd, SimdPartialEq, SimdPartialOrd},
|
||||
num::{SimdFloat, SimdInt, SimdUint},
|
||||
ptr::{SimdConstPtr, SimdMutPtr},
|
||||
|
||||
@@ -363,7 +363,7 @@ pub fn load_or(slice: &[T], or: Self) -> Self {
|
||||
/// corresponding element in `enable` is `true`.
|
||||
///
|
||||
/// When the element is disabled or out of bounds for the slice, that memory location
|
||||
/// is not accessed and the corresponding value from `or` is passed through.
|
||||
/// is not accessed and the default value for the element type is returned.
|
||||
///
|
||||
/// # Examples
|
||||
/// ```
|
||||
@@ -371,12 +371,11 @@ pub fn load_or(slice: &[T], or: Self) -> Self {
|
||||
/// # #[cfg(feature = "as_crate")] use core_simd::simd;
|
||||
/// # #[cfg(not(feature = "as_crate"))] use core::simd;
|
||||
/// # use simd::{Simd, Mask};
|
||||
/// let vec: Vec<i32> = vec![10, 11, 12, 13, 14, 15, 16, 17, 18];
|
||||
/// let enable = Mask::from_array([true, true, false, true]);
|
||||
/// let or = Simd::from_array([-5, -4, -3, -2]);
|
||||
/// let vec: Vec<i32> = vec![10, 11, 12];
|
||||
/// let enable = Mask::from_array([false, true, true, true]);
|
||||
///
|
||||
/// let result = Simd::load_select(&vec, enable, or);
|
||||
/// assert_eq!(result, Simd::from_array([10, 11, -3, 13]));
|
||||
/// let result = Simd::load_select_or_default(&vec, enable);
|
||||
/// assert_eq!(result, Simd::from_array([0, 11, 12, 0]));
|
||||
/// ```
|
||||
#[must_use]
|
||||
#[inline]
|
||||
@@ -1147,6 +1146,13 @@ unsafe impl SimdElement for isize {
|
||||
type Mask = isize;
|
||||
}
|
||||
|
||||
impl Sealed for f16 {}
|
||||
|
||||
// Safety: f16 is a valid SIMD element type, and is supported by this API
|
||||
unsafe impl SimdElement for f16 {
|
||||
type Mask = i16;
|
||||
}
|
||||
|
||||
impl Sealed for f32 {}
|
||||
|
||||
// Safety: f32 is a valid SIMD element type, and is supported by this API
|
||||
|
||||
@@ -32,3 +32,6 @@ fn from(value: $from) -> $to {
|
||||
|
||||
#[cfg(target_arch = "loongarch64")]
|
||||
mod loongarch64;
|
||||
|
||||
#[cfg(target_arch = "hexagon")]
|
||||
mod hexagon;
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
//! Conversions to Hexagon HVX SIMD types.
|
||||
|
||||
use crate::simd::*;
|
||||
|
||||
// HVX 128-byte mode (1024-bit vectors)
|
||||
// Enable with: -C target-feature=+hvx-length128b
|
||||
#[cfg(target_feature = "hvx-length128b")]
|
||||
mod hvx_128b {
|
||||
use super::*;
|
||||
use core::arch::hexagon::v128::HvxVector;
|
||||
|
||||
// Full vectors (1024-bit) map to HvxVector
|
||||
from_transmute! { unsafe u16x64 => HvxVector }
|
||||
from_transmute! { unsafe i16x64 => HvxVector }
|
||||
from_transmute! { unsafe u32x32 => HvxVector }
|
||||
from_transmute! { unsafe i32x32 => HvxVector }
|
||||
from_transmute! { unsafe u64x16 => HvxVector }
|
||||
from_transmute! { unsafe i64x16 => HvxVector }
|
||||
|
||||
// FIXME: u8x128/i8x128 don't exist in portable-simd (max lane count is 64)
|
||||
// u8x64/i8x64 are only 512-bit (half of HvxVector in 128B mode)
|
||||
}
|
||||
|
||||
// HVX 64-byte mode (512-bit vectors)
|
||||
// Default when hvx-length128b is not specified
|
||||
#[cfg(not(target_feature = "hvx-length128b"))]
|
||||
mod hvx_64b {
|
||||
use super::*;
|
||||
use core::arch::hexagon::v64::HvxVector;
|
||||
|
||||
// Full vectors (512-bit) map to HvxVector
|
||||
from_transmute! { unsafe u8x64 => HvxVector }
|
||||
from_transmute! { unsafe i8x64 => HvxVector }
|
||||
from_transmute! { unsafe u16x32 => HvxVector }
|
||||
from_transmute! { unsafe i16x32 => HvxVector }
|
||||
from_transmute! { unsafe u32x16 => HvxVector }
|
||||
from_transmute! { unsafe i32x16 => HvxVector }
|
||||
from_transmute! { unsafe u64x8 => HvxVector }
|
||||
from_transmute! { unsafe i64x8 => HvxVector }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#![feature(portable_simd)]
|
||||
#![feature(f16)]
|
||||
|
||||
#[macro_use]
|
||||
mod ops_macros;
|
||||
|
||||
// FIXME: some f16 operations cause rustc to hang on wasm simd
|
||||
// https://github.com/llvm/llvm-project/issues/189251
|
||||
#[cfg(not(all(target_arch = "wasm32", target_feature = "simd128")))]
|
||||
impl_float_tests! { f16, i16 }
|
||||
@@ -133,6 +133,19 @@ fn cast_impl<T: core_simd::simd::MaskElement>()
|
||||
cast_impl::<i64>();
|
||||
cast_impl::<isize>();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn first_set() {
|
||||
for bitmask in 0..=u8::MAX {
|
||||
let mask = Mask::<$type, 8>::from_bitmask(bitmask as u64);
|
||||
let expected = if bitmask == 0 {
|
||||
None
|
||||
} else {
|
||||
Some(bitmask.trailing_zeros() as usize)
|
||||
};
|
||||
assert_eq!(mask.first_set(), expected);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,14 @@ fn trunc<const LANES: usize>() {
|
||||
)
|
||||
}
|
||||
|
||||
fn round_ties_even<const LANES: usize>() {
|
||||
test_helpers::test_unary_elementwise(
|
||||
&Vector::<LANES>::round_ties_even,
|
||||
&Scalar::round_ties_even,
|
||||
&|_| true,
|
||||
)
|
||||
}
|
||||
|
||||
fn fract<const LANES: usize>() {
|
||||
test_helpers::test_unary_elementwise_flush_subnormals(
|
||||
&Vector::<LANES>::fract,
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
feature = "as_crate",
|
||||
feature(core_intrinsics),
|
||||
feature(portable_simd),
|
||||
feature(f16),
|
||||
allow(internal_features)
|
||||
)]
|
||||
#[cfg(not(feature = "as_crate"))]
|
||||
@@ -156,14 +157,30 @@ fn trunc(self) -> Self {
|
||||
unsafe { intrinsics::simd_trunc(self) }
|
||||
}
|
||||
|
||||
/// Rounds each element to the nearest integer-valued float.
|
||||
/// Ties are resolved by rounding to the number with an even least significant digit.
|
||||
#[must_use = "method returns a new vector and does not mutate the original value"]
|
||||
#[inline]
|
||||
fn round_ties_even(self) -> Self {
|
||||
unsafe { intrinsics::simd_round_ties_even(self) }
|
||||
}
|
||||
|
||||
/// Returns the floating point's fractional value, with its integer part removed.
|
||||
#[must_use = "method returns a new vector and does not mutate the original value"]
|
||||
fn fract(self) -> Self;
|
||||
}
|
||||
|
||||
impl<const N: usize> Sealed for Simd<f16, N> {}
|
||||
impl<const N: usize> Sealed for Simd<f32, N> {}
|
||||
impl<const N: usize> Sealed for Simd<f64, N> {}
|
||||
|
||||
impl<const N: usize> StdFloat for Simd<f16, N> {
|
||||
#[inline]
|
||||
fn fract(self) -> Self {
|
||||
self - self.trunc()
|
||||
}
|
||||
}
|
||||
|
||||
impl<const N: usize> StdFloat for Simd<f32, N> {
|
||||
#[inline]
|
||||
fn fract(self) -> Self {
|
||||
|
||||
@@ -25,7 +25,7 @@ fn $func<const LANES: usize>() {
|
||||
&core_simd::simd::Simd::<$scalar, LANES>::$func,
|
||||
&$scalar::$func,
|
||||
&|_| true,
|
||||
8,
|
||||
16,
|
||||
)
|
||||
}
|
||||
)*
|
||||
@@ -71,7 +71,7 @@ macro_rules! impl_tests {
|
||||
mod $scalar {
|
||||
use std_float::StdFloat;
|
||||
|
||||
unary_test! { $scalar, sqrt, ceil, floor, round, trunc }
|
||||
unary_test! { $scalar, sqrt, ceil, floor, round, trunc, round_ties_even }
|
||||
ternary_test! { $scalar, mul_add }
|
||||
|
||||
// https://github.com/rust-lang/miri/issues/3555
|
||||
|
||||
@@ -5,5 +5,5 @@ edition = "2021"
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
proptest = { version = "0.10", default-features = false, features = ["alloc"] }
|
||||
proptest = { workspace = true, features = ["alloc", "std"] }
|
||||
float-cmp = "0.10"
|
||||
|
||||
@@ -53,7 +53,7 @@ fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
|
||||
};
|
||||
}
|
||||
|
||||
impl_float_biteq! { f32, f64 }
|
||||
impl_float_biteq! { f16, f32, f64 }
|
||||
|
||||
impl<T> BitEq for *const T {
|
||||
fn biteq(&self, other: &Self) -> bool {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#![feature(powerpc_target_feature)]
|
||||
#![feature(f16)]
|
||||
#![cfg_attr(
|
||||
any(target_arch = "powerpc", target_arch = "powerpc64"),
|
||||
feature(stdarch_powerpc)
|
||||
feature(powerpc_target_feature, stdarch_powerpc)
|
||||
)]
|
||||
|
||||
pub mod array;
|
||||
@@ -47,6 +47,7 @@ fn default_strategy() -> Self::Strategy {
|
||||
impl_num! { u32 }
|
||||
impl_num! { u64 }
|
||||
impl_num! { usize }
|
||||
impl_num! { f16 }
|
||||
impl_num! { f32 }
|
||||
impl_num! { f64 }
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ impl FlushSubnormals for $ty {}
|
||||
}
|
||||
}
|
||||
|
||||
impl_float! { f32, f64 }
|
||||
impl_float! { f16, f32, f64 }
|
||||
impl_else! { i8, i16, i32, i64, isize, u8, u16, u32, u64, usize }
|
||||
|
||||
/// AltiVec should flush subnormal inputs to zero, but QEMU seems to only flush outputs.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[toolchain]
|
||||
channel = "nightly-2026-01-26"
|
||||
channel = "nightly-2026-03-18"
|
||||
components = ["rustfmt", "clippy", "miri", "rust-src"]
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
## See <https://forge.rust-lang.org/triagebot/index.html> for documentation
|
||||
## of these features.
|
||||
|
||||
# Allow users to use labels commands.
|
||||
# Documentation at: https://forge.rust-lang.org/triagebot/labeling.html
|
||||
[relabel]
|
||||
allow-unauthenticated = [
|
||||
"A-*",
|
||||
"C-*",
|
||||
"E-*",
|
||||
"F-*",
|
||||
"I-*",
|
||||
"ISA-*",
|
||||
"O-*",
|
||||
]
|
||||
|
||||
# Allow users to assign 'r?` someone to an issue or PR.
|
||||
# Documentation at: https://forge.rust-lang.org/triagebot/issue-assignment.html
|
||||
[assign]
|
||||
warn_non_default_branch = true
|
||||
|
||||
# Warns when a PR contains merge commits
|
||||
# Documentation at: https://forge.rust-lang.org/triagebot/no-merge.html
|
||||
[no-merges]
|
||||
exclude_titles = ["Sync from"]
|
||||
|
||||
# Canonicalize issue numbers to avoid closing the wrong issue
|
||||
# when commits are included in upstream sync, as well as warning links in commits.
|
||||
# Documentation at: https://forge.rust-lang.org/triagebot/issue-links.html
|
||||
[issue-links]
|
||||
check-commits = "uncanonicalized"
|
||||
|
||||
# Enable issue transfers within the org
|
||||
# Documentation at: https://forge.rust-lang.org/triagebot/transfer.html
|
||||
[transfer]
|
||||
|
||||
# Enable comments linking to triagebot range-diff when a PR is rebased
|
||||
# onto a different base commit
|
||||
# Documentation at: https://forge.rust-lang.org/triagebot/range-diff.html
|
||||
[range-diff]
|
||||
|
||||
# Add link to the review body to review changes since posting it.
|
||||
# Documentation at: https://forge.rust-lang.org/triagebot/review-changes-since.html
|
||||
[review-changes-since]
|
||||
Reference in New Issue
Block a user