mirror of
https://github.com/mborgerding/kissfft.git
synced 2026-05-25 13:08:42 -04:00
loongarch: add lasx simd opt
This commit is contained in:
@@ -154,7 +154,11 @@ kiss_fastfir_cfg kiss_fastfir_alloc(
|
||||
|
||||
for ( i=0; i < st->n_freq_bins; ++i ) {
|
||||
#ifdef USE_SIMD
|
||||
#ifdef HAVE_LSX
|
||||
#ifdef HAVE_LASX
|
||||
__m256 tmp = (__m256)__lasx_xvldrepl_w(&scale, 0);
|
||||
st->fir_freq_resp[i].r = __lasx_xvfmul_s(tmp, st->fir_freq_resp[i].r);
|
||||
st->fir_freq_resp[i].i = __lasx_xvfmul_s(tmp, st->fir_freq_resp[i].i);
|
||||
#elif defined(HAVE_LSX)
|
||||
__m128 tmp = (__m128)__lsx_vldrepl_w(&scale, 0);
|
||||
st->fir_freq_resp[i].r = __lsx_vfmul_s(tmp, st->fir_freq_resp[i].r);
|
||||
st->fir_freq_resp[i].i = __lsx_vfmul_s(tmp, st->fir_freq_resp[i].i);
|
||||
@@ -292,7 +296,9 @@ void direct_file_filter(
|
||||
tmph = imp_resp+nlag;
|
||||
#ifdef REAL_FASTFIR
|
||||
# ifdef USE_SIMD
|
||||
# ifdef HAVE_LSX
|
||||
#ifdef HAVE_LASX
|
||||
outval = (__m256)(__lasx_xvreplgr2vr_w(0));
|
||||
#elif defined(HAVE_LSX)
|
||||
outval = (__m128)(__lsx_vreplgr2vr_w(0));
|
||||
#else
|
||||
outval = _mm_set1_ps(0);
|
||||
@@ -307,7 +313,10 @@ void direct_file_filter(
|
||||
outval += buf[k] * *tmph;
|
||||
#else
|
||||
# ifdef USE_SIMD
|
||||
# ifdef HAVE_LSX
|
||||
#ifdef HAVE_LASX
|
||||
outval.i = (__m256)(__lasx_xvreplgr2vr_w(0));
|
||||
outval.r = outval.i;
|
||||
#elif defined(HAVE_LSX)
|
||||
outval.i = (__m128)(__lsx_vreplgr2vr_w(0));
|
||||
outval.r = outval.i;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user