| 1570 | } |
| 1571 | |
| 1572 | inline static void ggml_vec_argmax_f32(const int n, int * s, const float * x) { |
| 1573 | float max = -INFINITY; |
| 1574 | int idx = 0; |
| 1575 | for (int i = 0; i < n; ++i) { |
| 1576 | max = MAX(max, x[i]); |
| 1577 | if (max == x[i]) { idx = i; } |
| 1578 | } |
| 1579 | *s = idx; |
| 1580 | } |
| 1581 | |
| 1582 | // |
| 1583 | // data types |
no outgoing calls
no test coverage detected