Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
LLVM Intrinsics using Rust feature gate
#![feature(link_llvm_intrinsics)]
extern {
#[link_name = “llvm.sqrt.f32”]
fn sqrt(x: f32) -> f32;
}
fn main(){
unsafe { sqrt(32.0f32); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment