summaryrefslogtreecommitdiff
path: root/ggml.c
diff options
context:
space:
mode:
authorMaxime <672982+maximegmd@users.noreply.github.com>2023-05-20 09:22:37 +0200
committerGitHub <noreply@github.com>2023-05-20 10:22:37 +0300
commit503db28849d8641d66244385e7e9649608a2e4d0 (patch)
treee578c018f764660b445f976d9b4f50b13d366856 /ggml.c
parent8a203f9fa1b24e010be8f35ebbbd6786293684cb (diff)
llama : fix name shadowing and C4146 (#1526)
* Fix name shadowing and C4146 * Fix if macros not using defined when required * Update llama-util.h Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update llama-util.h Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Code style Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Diffstat (limited to 'ggml.c')
-rw-r--r--ggml.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ggml.c b/ggml.c
index 101cb733..939ab4d6 100644
--- a/ggml.c
+++ b/ggml.c
@@ -512,7 +512,7 @@ static inline int hsum_i32_4(const __m128i a) {
return _mm_cvtsi128_si32(_mm_add_epi32(sum64, hi32));
}
-#if __AVX2__ || __AVX512F__
+#if defined(__AVX2__) || defined(__AVX512F__)
// spread 32 bits to 32 bytes { 0x00, 0xFF }
static inline __m256i bytes_from_bits_32(const uint8_t * x) {
uint32_t x32;
@@ -688,7 +688,7 @@ static inline float hsum_float_4x4(const __m128 a, const __m128 b, const __m128
#endif // __AVX__ || __AVX2__ || __AVX512F__
#endif // defined(__AVX__) || defined(__AVX2__) || defined(__AVX512F__) || defined(__SSSE3__)
-#if __ARM_NEON
+#if defined(__ARM_NEON)
#if !defined(__aarch64__)