{"id":13611723,"url":"https://github.com/rust-lang/packed_simd","last_synced_at":"2025-05-14T16:14:22.732Z","repository":{"id":32781702,"uuid":"138868515","full_name":"rust-lang/packed_simd","owner":"rust-lang","description":"Portable Packed SIMD Vectors for Rust standard library","archived":false,"fork":false,"pushed_at":"2024-05-05T03:29:37.000Z","size":4627,"stargazers_count":617,"open_issues_count":80,"forks_count":73,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-04-04T05:14:31.233Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rust-lang.github.io/packed_simd/packed_simd_2/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-27T10:48:26.000Z","updated_at":"2025-04-01T04:55:59.000Z","dependencies_parsed_at":"2024-06-18T15:29:54.198Z","dependency_job_id":"180d42b0-5eac-4dbf-9558-bc19e0dfe93b","html_url":"https://github.com/rust-lang/packed_simd","commit_stats":{"total_commits":454,"total_committers":40,"mean_commits":11.35,"dds":"0.35242290748898675","last_synced_commit":"d938e39bee9bc5c222f5f2f2a0df9e53b5ce36ae"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Fpacked_simd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Fpacked_simd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Fpacked_simd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Fpacked_simd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-lang","download_url":"https://codeload.github.com/rust-lang/packed_simd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248384825,"owners_count":21094776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T19:02:01.900Z","updated_at":"2025-04-11T11:37:36.929Z","avatar_url":"https://github.com/rust-lang.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# `Simd\u003c[T; N]\u003e`\n\n## Implementation of [Rust RFC #2366: `std::simd`][rfc2366]\n\n[![Latest Version]][crates.io] [![docs]][master_docs]\n\n**WARNING**: this crate only supports the most recent nightly Rust toolchain\nand will be superseded by [`#![feature(portable_simd)]`](https://github.com/rust-lang/portable-simd).\n\n## Documentation\n\n* [API docs (`master` branch)][master_docs]\n* [Performance guide][perf_guide]\n* [API docs (`docs.rs`)][docs.rs]\n* [RFC2366 `std::simd`][rfc2366]: - contains motivation, design rationale,\n  discussion, etc.\n\n## Examples\n\nMost of the examples come with both a scalar and a vectorized implementation.\n\n* [`aobench`](https://github.com/rust-lang-nursery/packed_simd/tree/master/examples/aobench)\n* [`fannkuch_redux`](https://github.com/rust-lang-nursery/packed_simd/tree/master/examples/fannkuch_redux)\n* [`matrix inverse`](https://github.com/rust-lang-nursery/packed_simd/tree/master/examples/matrix_inverse)\n* [`mandelbrot`](https://github.com/rust-lang-nursery/packed_simd/tree/master/examples/mandelbrot)\n* [`n-body`](https://github.com/rust-lang-nursery/packed_simd/tree/master/examples/nbody)\n* [`options_pricing`](https://github.com/rust-lang-nursery/packed_simd/tree/master/examples/options_pricing)\n* [`spectral_norm`](https://github.com/rust-lang-nursery/packed_simd/tree/master/examples/spectral_norm)\n* [`triangle transform`](https://github.com/rust-lang-nursery/packed_simd/tree/master/examples/triangle_xform)\n* [`stencil`](https://github.com/rust-lang-nursery/packed_simd/tree/master/examples/stencil)\n* [`vector dot product`](https://github.com/rust-lang-nursery/packed_simd/tree/master/examples/dot_product)\n\n## Cargo features\n\n* `into_bits` (default: disabled): enables `FromBits`/`IntoBits` trait\n  implementations for the vector types. These allow reinterpreting the bits of a\n  vector type as those of another vector type safely by just using the\n  `.into_bits()` method.\n\n## Performance\n\nThe following [ISPC] examples are also part of `packed_simd`'s\n[`examples/`](https://github.com/rust-lang-nursery/packed_simd/tree/master/examples/)\ndirectory, where `packed_simd`+[`rayon`][rayon] are used to emulate [ISPC]'s\nSingle-Program-Multiple-Data (SPMD) programming model. The performance results\non different hardware is shown in the `readme.md` of each example. The following\ntable summarizes the performance ranges, where `+` means speed-up and `-`\nslowdown:\n\n* `aobench`: `[-1.02x, +1.53x]`,\n* `stencil`: `[+1.06x, +1.72x]`,\n* `mandelbrot`: `[-1.74x, +1.2x]`,\n* `options_pricing`:\n   * `black_scholes`: `+1.0x`\n   * `binomial_put`: `+1.4x`\n\n While SPMD is not the intended use case for `packed_simd`, it is possible to\n combine the library with [`rayon`][rayon] to poorly emulate [ISPC]'s SPMD programming\n model in Rust. Writing performant code is not as straightforward as with\n [ISPC], but with some care (e.g. see the [Performance Guide][perf_guide]) one\n can easily match and often out-perform [ISPC]'s \"default performance\".\n\n## Platform support\n\nThe following table describes the supported platforms: `build` shows whether\nthe library compiles without issues for a given target, while `run` shows\nwhether the test suite passes for a given target.\n\n| **Linux**                             | **build** | **run** |\n|---------------------------------------|-----------|---------|\n| `i586-unknown-linux-gnu`              | ✓         | ✗       |\n| `i686-unknown-linux-gnu`              | ✓         | ✗       |\n| `x86_64-unknown-linux-gnu`            | ✓         | ✓       |\n| `arm-unknown-linux-gnueabihf`         | ✓         | ✓       |\n| `armv7-unknown-linux-gnueabi`         | ✓         | ✓       |\n| `aarch64-unknown-linux-gnu`           | ✓         | ✓       |\n| `powerpc-unknown-linux-gnu`           | ✓         | ✗       |\n| `powerpc64-unknown-linux-gnu`         | ✓         | ✗       |\n| `powerpc64le-unknown-linux-gnu`       | ✓         | ✓       |\n| `s390x-unknown-linux-gnu`             | ✓         | ✗       |\n| `sparc64-unknown-linux-gnu`           | ✓         | ✗       |\n| `thumbv7neon-unknown-linux-gnueabihf` | ✓         | ✓       |\n| **MacOSX**                            | **build** | **run** |\n| `x86_64-apple-darwin`                 | ✓         | ✓       |\n| **Android**                           | **build** | **run** |\n| `x86_64-linux-android`                | ✓         | ✓       |\n| `armv7-linux-androideabi`             | ✓         | ✗       |\n| `aarch64-linux-android`               | ✓         | ✗       |\n| `thumbv7neon-linux-androideabi`       | ✓         | ✗       |\n| **iOS**                               | **build** | **run** |\n| `x86_64-apple-ios`                    | ✗         | ✗       |\n| `aarch64-apple-ios`                   | ✗         | ✗       |\n\n\n## Machine code verification\n\nThe\n[`verify/`](https://github.com/rust-lang-nursery/packed_simd/tree/master/verify)\ncrate tests disassembles the portable packed vector APIs at run-time and\ncompares the generated machine code against the desired one to make sure that\nthis crate remains efficient.\n\n## License\n\nThis project is licensed under either of\n\n* [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n  ([LICENSE-APACHE](LICENSE-APACHE))\n\n* [MIT License](http://opensource.org/licenses/MIT)\n  ([LICENSE-MIT](LICENSE-MIT))\n\nat your option.\n\n## Contributing\n\nWe welcome all people who want to contribute.\nPlease see the [contributing instructions] for more information.\n\nContributions in any form (issues, pull requests, etc.) to this project\nmust adhere to Rust's [Code of Conduct].\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in `packed_simd` by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n\n[travis]: https://travis-ci.com/rust-lang/packed_simd\n[Travis-CI Status]: https://travis-ci.com/rust-lang/packed_simd.svg?branch=master\n[appveyor]: https://ci.appveyor.com/project/gnzlbg/packed-simd\n[Appveyor Status]: https://ci.appveyor.com/api/projects/status/hd7v9dvr442hgdix?svg=true\n[Latest Version]: https://img.shields.io/crates/v/packed_simd.svg\n[crates.io]: https://crates.io/crates/packed_simd\n[docs]: https://docs.rs/packed_simd/badge.svg\n[docs.rs]: https://docs.rs/packed_simd\n[master_docs]: https://rust-lang-nursery.github.io/packed_simd/packed_simd/\n[perf_guide]: https://rust-lang-nursery.github.io/packed_simd/perf-guide/\n[rfc2366]: https://github.com/rust-lang/rfcs/pull/2366\n[ISPC]: https://ispc.github.io/\n[rayon]: https://crates.io/crates/rayon\n[boost_license]: https://www.boost.org/LICENSE_1_0.txt\n[SLEEF]: https://sleef.org/\n[sleef_sys]: https://crates.io/crates/sleef-sys\n[contributing instructions]: contributing.md\n[Code of Conduct]: https://www.rust-lang.org/en-US/conduct.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-lang%2Fpacked_simd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-lang%2Fpacked_simd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-lang%2Fpacked_simd/lists"}