gitee.com/quant1x/num@v0.3.2/internal/functions/max_amd64.go (about)

     1  package functions
     2  
     3  func ArgMax_AVX2_F64(x []float64) int {
     4  	maxValue := Max_AVX2_F64(x)
     5  	idx := Find_AVX2_F64(x, maxValue)
     6  	if idx == len(x) {
     7  		return -1
     8  	}
     9  	return idx
    10  }
    11  
    12  func ArgMax_AVX2_F32(x []float32) int {
    13  	maxValue := Max_AVX2_F32(x)
    14  	idx := Find_AVX2_F32(x, maxValue)
    15  	if idx == len(x) {
    16  		return -1
    17  	}
    18  	return idx
    19  }