Skip to content

Instantly share code, notes, and snippets.

@hyunsik
Created November 28, 2015 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyunsik/7fa689200ee5ee6ecf3d to your computer and use it in GitHub Desktop.
Save hyunsik/7fa689200ee5ee6ecf3d to your computer and use it in GitHub Desktop.
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