Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp/src/distance/detail/pairwise_matrix/dispatch_layout.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2023-2024, NVIDIA CORPORATION.
* SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION.
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
Expand Down Expand Up @@ -46,7 +46,7 @@ int determine_vec_len(pairwise_matrix_params<IdxT, DataT, OutT, FinOpT> params)
{
size_t align_x = alignment_of_2d_array(params.x, params.ldx);
size_t align_y = alignment_of_2d_array(params.y, params.ldy);
size_t byte_alignment = min(align_x, align_y);
size_t byte_alignment = std::min(align_x, align_y);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Silly question: Should we consider converting this to cuda::std::min instead?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I ask because this is function template in a .cuh file.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though its a .cuh file, the function itself is still a purely host function, so that is not necessary.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks for confirming that this template isn't used in __device__ code. 👍


// Since alignment is in bytes, it could be smaller than sizeof(DataT).
// Handle this (unlikely) case here.
Expand Down