Skip to content

Commit cd2a135

Browse files
committed
Boosted euclidean distance with @inline
1 parent b2bb09e commit cd2a135

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/kmeans.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Allocationless calculation of distance between vectors X1[:, i1] and X2[:, i2] d
112112
113113
Allocationless calculation of square eucledean distance between vectors X1[:, i1] and X2[:, i2]
114114
"""
115-
function distance(metric::Euclidean, X1, X2, i1, i2)
115+
@inline function distance(metric::Euclidean, X1, X2, i1, i2)
116116
# here goes my definition
117117
d = zero(eltype(X1))
118118
# TODO: break of the loop if d is larger than threshold (known minimum disatnce)

0 commit comments

Comments
 (0)