Skip to content

Commit fa8cca8

Browse files
authored
Merge pull request #57 from Arkoniak/add_simd
Experimenting with simd for faster calculations.
2 parents 29dc794 + b011076 commit fa8cca8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/kmeans.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Allocationless calculation of square eucledean distance between vectors X1[:, i1
9494
function distance(X1, X2, i1, i2)
9595
d = 0.0
9696
# TODO: break of the loop if d is larger than threshold (known minimum disatnce)
97-
@inbounds for i in axes(X1, 1)
97+
@inbounds @simd for i in axes(X1, 1)
9898
d += (X1[i, i1] - X2[i, i2])^2
9999
end
100100

0 commit comments

Comments
 (0)