use std::{arch::is_aarch64_feature_detected, error::Error, str::FromStr};
use crate::{Matrix, MatrixElement};
pub fn get_optimized_matmul<T>(lhs: Matrix<T>, other: Matrix<T>)
where
T: MatrixElement,
<T as FromStr>::Err: Error,
{
#[cfg(any(target_arch = "x86", target_arch = "x86-64"))]
{
if is_x86_feature_detected!("avx2") {
unsafe {
}
} else if is_x86_feature_detected!("sse") {
unsafe {
}
}
}
#[cfg(any(target_arch = "aarch64"))]
{
if is_aarch64_feature_detected!("avx2") {
unsafe {}
}
}
}
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
#[target_feature(enable = "avx2")]
unsafe fn avx_matmul<'a, T>(lhs: &Matrix<'a, T>, other: &Matrix<'a, T>) -> Matrix<'a, T>
where
T: MatrixElement,
<T as FromStr>::Err: Error,
{
#[cfg(target_arch = "x86")]
use std::arch::x86::_mm256_add_epi64;
#[cfg(target_arch = "x86_64")]
use std::arch::x86_64::{
__m128d, _mm256_add_epi64, _mm_add_pd, _mm_load_pd, _mm_mul_pd, _mm_prefetch, _mm_store_pd,
_mm_unpacklo_pd, _MM_HINT_NTA,
};
Matrix::default()
}