blob: 9d27b3007f3468da4274545017fd9059092726e7 [file] [log] [blame]
// WITH_STDLIB
fun vectorReductionMax(vA: DoubleArray): Double {
val n = vA.size
var x = Double.NEGATIVE_INFINITY
for (i in 0 until n) {
x = kotlin.math.max(x, vA[i])
}
return x
}
// JVM_IR_TEMPLATES
// Make sure there's no intermediate variable created for 'vA[i]' argument of kotlin.math.max.
// 2 DLOAD
// 2 DSTORE