We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 29dc794 + b011076 commit fa8cca8Copy full SHA for fa8cca8
1 file changed
src/kmeans.jl
@@ -94,7 +94,7 @@ Allocationless calculation of square eucledean distance between vectors X1[:, i1
94
function distance(X1, X2, i1, i2)
95
d = 0.0
96
# TODO: break of the loop if d is larger than threshold (known minimum disatnce)
97
- @inbounds for i in axes(X1, 1)
+ @inbounds @simd for i in axes(X1, 1)
98
d += (X1[i, i1] - X2[i, i2])^2
99
end
100
0 commit comments