Skip to content

Commit aaf0b51

Browse files
hoangmitblackhole89
authored andcommitted
inline -> static inline for "bytesFromNibbles" (#161)
Without "static" prefix, it fails to compile in clang
1 parent e95085a commit aaf0b51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ggml.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ static const size_t CACHE_LINE_SIZE_F32 = CACHE_LINE_SIZE/sizeof(float);
364364
#if __AVX2__
365365
// Unpack 32 4-bit fields into 32 bytes
366366
// The output vector contains 32 bytes, each one in [ 0 .. 15 ] interval
367-
inline __m256i bytesFromNibbles( const uint8_t* rsi )
367+
static inline __m256i bytesFromNibbles( const uint8_t* rsi )
368368
{
369369
// Load 16 bytes from memory
370370
__m128i tmp = _mm_loadu_si128( ( const __m128i* )rsi );
@@ -381,7 +381,7 @@ inline __m256i bytesFromNibbles( const uint8_t* rsi )
381381
return bytes;
382382
}
383383

384-
inline __m128i packNibbles( __m256i bytes )
384+
static inline __m128i packNibbles( __m256i bytes )
385385
{
386386
// Move bits within 16-bit lanes from 0000_abcd_0000_efgh into 0000_0000_abcd_efgh
387387
const __m256i lowByte = _mm256_set1_epi16( 0xFF );

0 commit comments

Comments
 (0)