|
30 | 30 |
|
31 | 31 | #if defined(__s390x__) && defined(__VEC__) |
32 | 32 | #include <vecintrin.h> |
33 | | - |
34 | | -#define vec_neg(a) (-(a)) // Vector Negate |
35 | | -#define vec_add(a, b) ((a) + (b)) // Vector Add |
36 | | -#define vec_sub(a, b) ((a) - (b)) // Vector Subtract |
37 | | -#define vec_mul(a, b) ((a) * (b)) // Vector Multiply |
38 | | -#define vec_div(a, b) ((a) / (b)) // Vector Divide |
39 | | -#define vec_sl(a, b) ((a) << (b)) // Vector Shift Left |
40 | | -#define vec_sra(a, b) ((a) >> (b)) // Vector Shift Right |
41 | | -#define vec_sr(a, b) ((a) >> (b)) // Vector Shift Right Algebraic |
42 | | -#define vec_slo(a, b) vec_slb(a, (b) << 64) // Vector Shift Left by Octet |
43 | | -#define vec_sro(a, b) vec_srb(a, (b) << 64) // Vector Shift Right by Octet |
44 | | - |
45 | | -#ifndef vec_and |
46 | | -#define vec_and(a, b) ((a) & (b)) // Vector AND |
47 | | -#endif |
48 | | - |
49 | | -#ifndef vec_or |
50 | | -#define vec_or(a, b) ((a) | (b)) // Vector OR |
51 | | -#endif |
52 | | - |
53 | | -#ifndef vec_xor |
54 | | -#define vec_xor(a, b) ((a) ^ (b)) // Vector XOR |
55 | | -#endif |
56 | | - |
57 | | -typedef signed char char8x16_t __attribute__((vector_size(16))); |
58 | | -typedef unsigned char uchar8x16_t __attribute__((vector_size(16))); |
59 | | - |
60 | | -typedef int8_t int8x16_t __attribute__((vector_size(16))); |
61 | | -typedef int16_t int16x8_t __attribute__((vector_size(16))); |
62 | | -typedef int32_t int32x4_t __attribute__((vector_size(16))); |
63 | | - |
64 | | -typedef uint8_t uint8x16_t __attribute__((vector_size(16))); |
65 | | -typedef uint16_t uint16x8_t __attribute__((vector_size(16))); |
66 | | -typedef uint32_t uint32x4_t __attribute__((vector_size(16))); |
67 | | - |
68 | | -typedef float float32x4_t __attribute__((vector_size(16))); |
69 | | -typedef double double64x2_t __attribute__((vector_size(16))); |
70 | | - |
71 | | -typedef signed long long long64x2_t __attribute__((vector_size(16))); |
72 | | -typedef unsigned long long ulong64x2_t __attribute__((vector_size(16))); |
| 33 | +#include <ggml-cpu/ggml-cpu-impl.h> |
73 | 34 |
|
74 | 35 | #if defined(GGML_NNPA) |
75 | 36 | #ifndef __NNPA__ |
|
0 commit comments