Skip to content

Commit

Permalink
fix AVX alignment of pow~
Browse files Browse the repository at this point in the history
  • Loading branch information
dromer committed Nov 28, 2023
1 parent f548a94 commit 2e6da70
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Next Release
* DPF: enum for UI parameter IDs
* DPF bugfixes: correct input PortGroup names; correct UI slider updates; midiout reimplementation
* Wwise: complete rewrite/refactor - now uses SDK build tools - thanks to @eu-ch !!
* Bugfix: correct alignment in AVX pow~ implementation
* Cleanup: remove deprecated build.json
* Deprecate py37, enable py312

Expand Down
16 changes: 8 additions & 8 deletions hvcc/generators/ir2c/static/HvMath.h
Original file line number Diff line number Diff line change
Expand Up @@ -539,14 +539,14 @@ static inline void __hv_pow_f(hv_bInf_t bIn0, hv_bInf_t bIn1, hv_bOutf_t bOut) {
_mm256_store_ps(b, bIn0);
_mm256_store_ps(b+8, bIn1);
*bOut = _mm256_set_ps(
hv_pow_f(b[7], b[7]),
hv_pow_f(b[6], b[6]),
hv_pow_f(b[5], b[5]),
hv_pow_f(b[4], b[4]),
hv_pow_f(b[3], b[3]),
hv_pow_f(b[2], b[2]),
hv_pow_f(b[1], b[1]),
hv_pow_f(b[0], b[0]));
hv_pow_f(b[7], b[15]),
hv_pow_f(b[6], b[14]),
hv_pow_f(b[5], b[13]),
hv_pow_f(b[4], b[12]),
hv_pow_f(b[3], b[11]),
hv_pow_f(b[2], b[10]),
hv_pow_f(b[1], b[9]),
hv_pow_f(b[0], b[8]));
#elif HV_SIMD_SSE
float *b = (float *) hv_alloca(8*sizeof(float));
_mm_store_ps(b, bIn0);
Expand Down

0 comments on commit 2e6da70

Please sign in to comment.