Open
Conversation
This preserves BC while allowing compilation on older systems like Debian 10.
jmvalin
reviewed
Sep 17, 2024
| for (i = 0; i < psEncC->subfr_length; i+=4) | ||
| { | ||
| __m256i x = _mm256_cvtepi16_epi64(_mm_loadu_si64(&x16[i])); | ||
| __m256i x = _mm256_cvtepi16_epi64(_mm_loadl_epi64(&x16[i])); |
Member
There was a problem hiding this comment.
_mm_loadl_epi64() takes a __m128i *, which means the PR would break alignment rules. I suspect there should still be a workaround...
Contributor
There was a problem hiding this comment.
Both _mm_loadl_epi64 and _mm_loadu_epi64 take void const *
From gcc-14:
extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
_mm_loadu_si64 (void const *__P)
{
return _mm_loadl_epi64 ((__m128i_u *)__P);
}
/* */
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_loadu_epi64 (void const *__P)
{
return (__m128i) (*(__v2di_u *) __P);
}Maybe just adding an (__m128i_u *) cast would be enough??
Member
There was a problem hiding this comment.
Intel doc says otherwise:
https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_loadl_epi64
Also, __m128i_u is not portable.
Contributor
|
How old compilers are you supporting in this project ? In the Baresip project we support these compilers: Supported compilers:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This preserves BC while allowing compilation on older systems like Debian 10.
Inspired from ggml-org/llama.cpp#1154