[Phi] fixing compilation error from _mm512_set1_epi32 and fixing zlint
issue
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user