checkasm

Crates.iocheckasm
lib.rscheckasm
version0.1.0
sourcesrc
created_at2020-12-30 07:56:26.83848
updated_at2020-12-30 07:56:26.83848
descriptionHelper to check stand-alone assembly functions, derived from dav1d
homepagehttps://github.com/rust-av/checkasm-rs
repositoryhttps://github.com/rust-av/checkasm-rs
max_upload_size
id329156
size98,503
Luca Barbato (lu-zero)

documentation

README

checkasm helper for rust

It is a port of the dav1d checkasm harness to rust.

Usage


#[cfg(test)]
mod test {
    use checkasm::declare_fn;
    use std::ffi::c_void;

    extern fn variant_avx2(a: *mut u8, len: usize);
    extern fn variant_avx512(a: *mut u8, len: usize);

    declare_fn { check_variant(a: *mut u8, len: usize) };

    #[test]
    fn variant() {
        let mut buf = vec![0u8; 128];

        check_variant(variant_avx512 as *mut c_void, buf.as_mut_ptr(), buf.len());
    }
}

Status

  • builds
  • reports errors on stderr
  • panics correctly
Commit count: 58

cargo fmt