All Projects → calebzulawski → multiversion

calebzulawski / multiversion

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT
Easy function multiversioning for Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to multiversion

Decomposed
CATransform3D manipulation made easy.
Stars: ✭ 184 (+21.05%)
Mutual labels:  simd
Hh Suite
Remote protein homology detection suite.
Stars: ✭ 230 (+51.32%)
Mutual labels:  simd
hermes
A Haskell library for fast, memory-efficient decoding of JSON documents using the simdjson C++ library
Stars: ✭ 37 (-75.66%)
Mutual labels:  simd
Laser
The HPC toolbox: fused matrix multiplication, convolution, data-parallel strided tensor primitives, OpenMP facilities, SIMD, JIT Assembler, CPU detection, state-of-the-art vectorized BLAS for floats and integers
Stars: ✭ 191 (+25.66%)
Mutual labels:  simd
42 cheatsheet
Also referred to as "The C Man"
Stars: ✭ 204 (+34.21%)
Mutual labels:  simd
Boost.simd
Boost SIMD
Stars: ✭ 238 (+56.58%)
Mutual labels:  simd
Computelibrary
The Compute Library is a set of computer vision and machine learning functions optimised for both Arm CPUs and GPUs using SIMD technologies.
Stars: ✭ 2,123 (+1296.71%)
Mutual labels:  simd
simd-byte-lookup
SIMDized check which bytes are in a set
Stars: ✭ 23 (-84.87%)
Mutual labels:  simd
Turbo Run Length Encoding
TurboRLE-Fastest Run Length Encoding
Stars: ✭ 212 (+39.47%)
Mutual labels:  simd
lsp-dsp-lib
DSP library for signal processing
Stars: ✭ 37 (-75.66%)
Mutual labels:  simd
Streamvbyte
Fast integer compression in C using the StreamVByte codec
Stars: ✭ 195 (+28.29%)
Mutual labels:  simd
Reedsolomon
Reed-Solomon Erasure Code engine in Go, could more than 15GB/s per core
Stars: ✭ 203 (+33.55%)
Mutual labels:  simd
Mipp
MIPP is a portable wrapper for SIMD instructions written in C++11. It supports NEON, SSE, AVX and AVX-512.
Stars: ✭ 253 (+66.45%)
Mutual labels:  simd
Simdjson
Parsing gigabytes of JSON per second
Stars: ✭ 15,115 (+9844.08%)
Mutual labels:  simd
quick-adc
Quick ADC
Stars: ✭ 20 (-86.84%)
Mutual labels:  simd
Ugm
Ubpa Graphics Mathematics
Stars: ✭ 178 (+17.11%)
Mutual labels:  simd
Js
turbo.js - perform massive parallel computations in your browser with GPGPU.
Stars: ✭ 2,591 (+1604.61%)
Mutual labels:  simd
aes-gcm-siv
.NET Core 3.0 implementation of AES-GCM-SIV nonce misuse-resistant authenticated encryption
Stars: ✭ 22 (-85.53%)
Mutual labels:  simd
Guided Missile Simulation
Guided Missile, Radar and Infrared EOS Simulation Framework written in Fortran.
Stars: ✭ 33 (-78.29%)
Mutual labels:  simd
ternary-logic
Support for ternary logic in SSE, XOP, AVX2 and x86 programs
Stars: ✭ 21 (-86.18%)
Mutual labels:  simd

Multiversion

Crates.io Rust Documentation Rustc Version 1.61+ License

Function multiversioning attribute macros for Rust.

What is function multiversioning?

Many CPU architectures have a variety of instruction set extensions that provide additional functionality. Common examples are single instruction, multiple data (SIMD) extensions such as SSE and AVX on x86/x86-64 and NEON on ARM/AArch64. When available, these extended features can provide significant speed improvements to some functions. These optional features cannot be haphazardly compiled into programs--executing an unsupported instruction will result in a crash.

Function multiversioning is the practice of compiling multiple versions of a function with various features enabled and safely detecting which version to use at runtime.

Example

The multiversion macro compiles a function for multiple possible targets, and selects the optimal one at runtime:

use multiversion::multiversion;

#[multiversion(targets("x86_64+avx", "aarch64+neon"))]
fn square(x: &mut [f32]) {
    for v in x {
        *v *= *v;
    }
}

License

Multiversion is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.

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].