| 1516 | #endif |
| 1517 | |
| 1518 | inline static void ggml_vec_sum_f32(const int n, float * s, const float * x) { |
| 1519 | #ifndef GGML_USE_ACCELERATE |
| 1520 | ggml_float sum = 0.0; |
| 1521 | for (int i = 0; i < n; ++i) { |
| 1522 | sum += (ggml_float)x[i]; |
| 1523 | } |
| 1524 | *s = sum; |
| 1525 | #else |
| 1526 | vDSP_sve(x, 1, s, n); |
| 1527 | #endif |
| 1528 | } |
| 1529 | |
| 1530 | inline static void ggml_vec_sum_f32_ggf(const int n, ggml_float * s, const float * x) { |
| 1531 | ggml_float sum = 0.0; |
no outgoing calls
no test coverage detected