Skip to content

Instantly share code, notes, and snippets.

View leo60228's full-sized avatar
🦀
🦀

leo60228 leo60228

🦀
🦀
View GitHub Profile
@leo60228
leo60228 / playground.rs
Created December 16, 2019 15:25 — forked from rust-play/playground.rs
Code shared from the Rust Playground
use std::arch::x86_64::*;
use std::mem::transmute;
#[target_feature(enable = "avx2")]
#[target_feature(enable = "avx")]
pub unsafe fn alpha_mask(a: __m256i, b: __m256i) -> __m256i {
let mask = _mm256_set_epi8(
0, 0, 0, -1,
0, 0, 0, -1,
0, 0, 0, -1,
@leo60228
leo60228 / playground.rs
Created March 6, 2019 17:35 — forked from rust-play/playground.rs
Code shared from the Rust Playground
use std::path::PathBuf;
use std::ffi::CString;
use std::os::raw::c_char;
mod libnx {
use std::os::raw::c_char;
#[derive(Default)]
pub struct FsFileSystem;