10000 GEMMTermComputer.{_compute_distances_on_chunks→_compute_dist_middle_t… · scikit-learn/scikit-learn@93c7306 · GitHub
[go: up one dir, main page]

Skip to content

Commit 93c7306

Browse files
authored
GEMMTermComputer.{_compute_distances_on_chunks→_compute_dist_middle_terms} (#24626)
1 parent bffe012 commit 93c7306

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

sklearn/metrics/_pairwise_distances_reduction/_argkmin.pyx.tp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ cdef class EuclideanArgKmin{{name_suffix}}(ArgKmin{{name_suffix}}):
482482
DTYPE_t squared_dist_i_j
483483
ITYPE_t n_X = X_end - X_start
484484
ITYPE_t n_Y = Y_end - Y_start
485-
DTYPE_t * dist_middle_terms = self.gemm_term_computer._compute_distances_on_chunks(
485+
DTYPE_t * dist_middle_terms = self.gemm_term_computer._compute_dist_middle_terms(
486486
X_start, X_end, Y_start, Y_end, thread_num
487487
)
488488
DTYPE_t * heaps_r_distances = self.heaps_r_distances_chunks[thread_num]

sklearn/metrics/_pairwise_distances_reduction/_gemm_term_computer.pxd.tp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ cdef class GEMMTermComputer{{name_suffix}}:
7676
ITYPE_t thread_num
7777
) nogil
7878

79-
cdef DTYPE_t * _compute_distances_on_chunks(
79+
cdef DTYPE_t * _compute_dist_middle_terms(
8080
self,
8181
ITYPE_t X_start,
8282
ITYPE_t X_end,

sklearn/metrics/_pairwise_distances_reduction/_gemm_term_computer.pyx.tp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ from ...utils._cython_blas cimport (
3232
{{for name_suffix, upcast_to_float64, INPUT_DTYPE_t, INPUT_DTYPE in implementation_specific_values}}
3333

3434
cdef class GEMMTermComputer{{name_suffix}}:
35-
"""Component for `FastEuclidean*` variant wrapping the logic for the call to GEMM.
35+
"""Component for `EuclideanDistance` specialisation wrapping the logic for the call to GEMM.
3636

37-
`FastEuclidean*` classes internally compute the squared Euclidean distances between
38-
chunks of vectors X_c and Y_c using the following decomposition:
37+
`EuclideanDistance` subclasses internally compute the squared Euclidean distances
38+
between chunks of vectors X_c and Y_c using the following decomposition:
3939

4040

4141
||X_c_i - Y_c_j||² = ||X_c_i||² - 2 X_c_i.Y_c_j^T + ||Y_c_j||²
@@ -167,7 +167,7 @@ cdef class GEMMTermComputer{{name_suffix}}:
167167
return
168168
{{endif}}
169169

170-
cdef DTYPE_t * _compute_distances_on_chunks(
170+
cdef DTYPE_t * _compute_dist_middle_terms(
171171
self,
172172
ITYPE_t X_start,
173173
ITYPE_t X_end,

sklearn/metrics/_pairwise_distances_reduction/_radius_neighborhood.pyx.tp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ cdef class EuclideanRadiusNeighbors{{name_suffix}}(RadiusNeighbors{{name_suffix}
491491
DTYPE_t squared_dist_i_j
492492
ITYPE_t n_X = X_end - X_start
493493
ITYPE_t n_Y = Y_end - Y_start
494-
DTYPE_t *dist_middle_terms = self.gemm_term_computer._compute_distances_on_chunks(
494+
DTYPE_t *dist_middle_terms = self.gemm_term_computer._compute_dist_middle_terms(
495495
X_start, X_end, Y_start, Y_end, thread_num
496496
)
497497

0 commit comments

Comments
 (0)
0