1//
2//  MNNMinFloat.S
3//  MNN
4//
5//  Created by MNN on 2018/09/18.
6//  Copyright © 2018, Alibaba Group Holding Limited
7//
8
9#ifdef __aarch64__
10
11#include "MNNAsmGlobal.h"
12
13.text
14.align 5
15asm_function MNNMinFloat
16//void MNNMinFloat(float* input, float * minBuffer, int32_t inputCountUnit);
17
18//Auto: X0: input, X1:minBuffer, X2:inputCountUnit
19
20cmp x2, #0
21beq End
22
23
24# minBuffer : v31
25ld1 {v31.4s}, [x1]
26
27Loop:
28    ld1 {v0.4s, v1.4s}, [x0], #32
29    fmin v31.4s, v0.4s, v31.4s
30    fmin v31.4s, v1.4s, v31.4s
31    subs x2, x2, #1
32    bne Loop
33
34st1 {v31.4s}, [x1]
35
36End:
37ret
38
39#endif
40