/* CBLAS_INDEX cblas_idamax(const int N, const double *X, const int incX); */ func Idamax(x []float64) Index { c_N := C.int(len(x)) c_X := (*C.double)(unsafe.Pointer(&x[0])) c_incX := C.int(1) return Index(C.cblas_idamax(c_N, c_X, c_incX)) }
// Find the argmax of v func (v vector) argmax() int { return int(C.cblas_idamax(C.int(len(v)), (*C.double)(unsafe.Pointer(&v[0])), 1)) }