All Projects → starkat99 → Half Rs

starkat99 / Half Rs

Licence: other
Half-precision floating point types f16 and bf16 for Rust.

Programming Languages

rust
11053 projects

Labels

Projects that are alternatives of or similar to Half Rs

rs-poker
No description or website provided.
Stars: ✭ 32 (-52.94%)
Mutual labels:  crates
Cargo Deny
❌ Cargo plugin for linting your dependencies 🦀
Stars: ✭ 533 (+683.82%)
Mutual labels:  crates
Tantivy Jieba
An adapter that bridges between tantivy and jieba-rs.
Stars: ✭ 17 (-75%)
Mutual labels:  crates
MysteryCrate
PLUGIN ARCHIVED. USE https://github.com/DaPigGuy/PiggyCrates instead!
Stars: ✭ 30 (-55.88%)
Mutual labels:  crates
Rspotify
Spotify Web API SDK implemented in Rust
Stars: ✭ 255 (+275%)
Mutual labels:  crates
Prettytable Rs
A rust library to print aligned and formatted tables
Stars: ✭ 552 (+711.76%)
Mutual labels:  crates
crate-trends
🦀Visualize Rust Package: Crates comparison website
Stars: ✭ 14 (-79.41%)
Mutual labels:  crates
Syntect
Rust library for syntax highlighting using Sublime Text syntax definitions.
Stars: ✭ 972 (+1329.41%)
Mutual labels:  crates
Ggez
Rust library to create a Good Game Easily
Stars: ✭ 3,120 (+4488.24%)
Mutual labels:  crates
Ritual
Use C++ libraries from Rust
Stars: ✭ 792 (+1064.71%)
Mutual labels:  crates
ffizer
ffizer is a files and folders initializer / generator. Create any kind (or part) of project from template.
Stars: ✭ 57 (-16.18%)
Mutual labels:  crates
sorceress
A Rust environment for sound synthesis and algorithmic composition.
Stars: ✭ 64 (-5.88%)
Mutual labels:  crates
Bracket Lib
The Roguelike Toolkit (RLTK), implemented for Rust.
Stars: ✭ 631 (+827.94%)
Mutual labels:  crates
rtriangulate
A Rust implementation of the Bourke Delaunay triangulation algorithm.
Stars: ✭ 20 (-70.59%)
Mutual labels:  crates
Rusticsom
Rust library for Self Organising Maps (SOM).
Stars: ✭ 18 (-73.53%)
Mutual labels:  crates
tokio-tun
Asynchronous allocation of TUN/TAP devices in Rust using tokio
Stars: ✭ 17 (-75%)
Mutual labels:  crates
Rust Search Extension
🦀 The ultimate search extension for Rust
Stars: ✭ 540 (+694.12%)
Mutual labels:  crates
Rust Skiplist
Skiplist implementation in rust
Stars: ✭ 38 (-44.12%)
Mutual labels:  crates
Rust Multibase
Multibase in rust
Stars: ✭ 30 (-55.88%)
Mutual labels:  crates
Colored
(Rust) Coloring terminal so simple you already know how to do it !
Stars: ✭ 715 (+951.47%)
Mutual labels:  crates

f16 and bf16 floating point types for Rust

Crates.io docs.rs Build Status Build status

This crate implements a half-precision floating point f16 type for Rust implementing the IEEE 754-2008 standard binary16 a.k.a half format, as well as a bf16 type implementing the bfloat16 format.

Usage

The f16 and bf16 types provides conversion operations as a normal Rust floating point type, but since they are primarily leveraged for minimal floating point storage and most major hardware does not implement them, all math operations should be done as an f32 type.

This crate provides no_std support by default so can easily be used in embedded code where a smaller float format is most useful.

Requires Rust 1.32 or greater. If you need support for older versions of Rust, use versions 1.3 and earlier of this crate.

See the crate documentation for more details.

Optional Features

  • serde - Implement Serialize and Deserialize traits for f16 and bf16. This adds a dependency on the serde crate.

  • use-intrinsics - Use hardware intrinsics for f16 and bf16 conversions if available on the compiler host target. By default, without this feature, conversions are done only in software, which will be the fallback if the host target does not have hardware support. Available only on Rust nightly channel.

  • alloc - Enable use of the alloc crate when not using the std library.

    This enables the vec module, which contains zero-copy conversions for the Vec type. This allows fast conversion between raw Vec<u16> bits and Vec<f16> or Vec<bf16> arrays, and vice versa. Requires Rust 1.36 or greater.

  • std - Enable features that depend on the Rust std library, including everything in the alloc feature.

    Enabling the std feature enables runtime CPU feature detection when the use-intrsincis feature is also enabled. Without this feature detection, intrinsics are only used when compiler host target supports them.

  • num-traits - Enable ToPrimitive and FromPrimitive trait implementations from the num-traits crate.

  • bytemuck - Enable Zeroable and Pod trait implementations from the bytemuck crate.

More Documentation

License

This library is distributed under the terms of either of:

at your option.

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].