This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::arch::x86_64::*; | |
| #[target_feature(enable = "avx2")] | |
| pub unsafe fn dot_i4_256_nibbles_unrolled(a_ptr: *const u8, b_ptr: *const u8) -> i32 { | |
| // 1. Constants | |
| let mask = _mm256_set1_epi8(0x0F); | |
| let sub_bias = _mm256_set1_epi8(0x08); | |
| // 2. Accumulators | |
| // acc_dot stores the main product sums (16 x i16) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct ReqWrapper { | |
| req: OperationRequest, | |
| tx: std::sync::mpsc::Sender<Resp>, | |
| } | |
| pub struct DB { | |
| send: std::sync::mpsc::Sender<ReqWrapper>, | |
| } | |
| impl DB { |