#[macro_export]
macro_rules! gemm_batch_frame_loop_avx2 {
($f:ident, $num_frames:expr, { $($batch_body:tt)* }, { $($tail_frame:tt)* }) => {
while $f + 4 <= $num_frames {
{ $($batch_body)* }
$f += 4;
}
while $f < $num_frames {
{ $($tail_frame)* }
$f += 1;
}
};
}
#[macro_export]
macro_rules! gemm_batch_outc_loop_avx2 {
($out_c:ident, $out_len:expr, { $($simd_body:tt)* }, { $($tail_body:tt)* }) => {
while $out_c + 8 <= $out_len {
{ $($simd_body)* }
$out_c += 8;
}
while $out_c < $out_len {
{ $($tail_body)* }
$out_c += 1;
}
};
}
#[macro_export]
macro_rules! gemm_batch_inner_dual_avx2 {
($in_c:ident, $in_len:expr, { $($simd_body:tt)* }, { $($tail_body:tt)* }) => {
while $in_c + 2 <= $in_len {
{ $($simd_body)* }
$in_c += 2;
}
if $in_c < $in_len {
{ $($tail_body)* }
}
};
}