Crates.io | checkasm |
lib.rs | checkasm |
version | 0.1.0 |
source | src |
created_at | 2020-12-30 07:56:26.83848 |
updated_at | 2020-12-30 07:56:26.83848 |
description | Helper to check stand-alone assembly functions, derived from dav1d |
homepage | https://github.com/rust-av/checkasm-rs |
repository | https://github.com/rust-av/checkasm-rs |
max_upload_size | |
id | 329156 |
size | 98,503 |
It is a port of the dav1d checkasm harness to rust.
#[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());
}
}