[Phi] fixing compilation error from _mm512_set1_epi32 and fixing zlint
Mirror Gitea refs to GitHub / mirror (push) Successful in 19s
Test / build_and_test (push) Successful in 3m13s
Build / build (push) Successful in 5m5s

issue
This commit is contained in:
2026-08-18 03:16:04 +02:00
parent d5a794aa64
commit 8360d8edfe
4 changed files with 22 additions and 6 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ int HandleNewMemory(PhiEndpoint endpoint, const PhiMessageHeader* header)
return SendReply(endpoint, header, &reply, sizeof(reply));
}
Memory* memory;
Memory* memory = NULL;
if(header->type == PHI_PACKET_ALLOC_MEMORY)
{
+6 -4
View File
@@ -1,10 +1,12 @@
#include <immintrin.h>
#include <stdint.h>
#include <avx/Intrinsic.h>
// Dst must be 64-byte aligned
void PhiFill256KNC(void* dst, uint32_t value)
void AvxFill256(void* dst, uint32_t value)
{
__m512i v = _mm512_set1_epi32((int)value);
__m512i v = _mm512_set1_epi32_knc((int)value);
uint8_t* d = (uint8_t*)dst;
@@ -15,9 +17,9 @@ void PhiFill256KNC(void* dst, uint32_t value)
}
// Dst must be 64-byte aligned
void PhiFill64KNC(void* dst, uint32_t value)
void AvxFill64(void* dst, uint32_t value)
{
__m512i v = _mm512_set1_epi32((int)value);
__m512i v = _mm512_set1_epi32_knc((int)value);
_mm512_store_epi32(dst, v);
}
+14
View File
@@ -0,0 +1,14 @@
#ifndef APE_PHI_AVX_INTRINSIC_H
#define APE_PHI_AVX_INTRINSIC_H
#include <immintrin.h>
#include <stdint.h>
static inline __attribute__((always_inline)) __m512i _mm512_set1_epi32_knc(uint32_t value)
{
__m512i result;
__asm__("vpbroadcastd %1, %0" : "=x"(result) : "m"(value));
return result;
}
#endif