Skip to content

Commit 7f47871

Browse files
committed
Allow RAFT compilation
1 parent a14b399 commit 7f47871

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cpp/include/raft/sparse/solver/detail/lanczos.cuh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ int computeSmallestEigenvectors(
10511051
size_t n = A.nrows_;
10521052

10531053
// Check that parameters are valid
1054-
RAFT_EXPECTS(nEigVecs > 0 && nEigVecs <= n, "Invalid number of eigenvectors.");
1054+
RAFT_EXPECTS(nEigVecs > 0 && (size_t)nEigVecs <= n, "Invalid number of eigenvectors.");
10551055
RAFT_EXPECTS(restartIter > 0, "Invalid restartIter.");
10561056
RAFT_EXPECTS(tol > 0, "Invalid tolerance.");
10571057
RAFT_EXPECTS(maxIter >= nEigVecs, "Invalid maxIter.");
@@ -1401,7 +1401,7 @@ int computeLargestEigenvectors(
14011401
size_t n = A.nrows_;
14021402

14031403
// Check that parameters are valid
1404-
RAFT_EXPECTS(nEigVecs > 0 && nEigVecs <= n, "Invalid number of eigenvectors.");
1404+
RAFT_EXPECTS(nEigVecs > 0 && (size_t)nEigVecs <= n, "Invalid number of eigenvectors.");
14051405
RAFT_EXPECTS(restartIter > 0, "Invalid restartIter.");
14061406
RAFT_EXPECTS(tol > 0, "Invalid tolerance.");
14071407
RAFT_EXPECTS(maxIter >= nEigVecs, "Invalid maxIter.");

cpp/include/raft/spectral/detail/matrix_wrappers.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ struct laplacian_matrix_t : sparse_matrix_t<index_type, value_type> {
326326
raft_handle, row_offsets, col_indices, values, nrows, nnz),
327327
diagonal_(raft_handle, nrows)
328328
{
329-
vector_t<value_type> ones{raft_handle, nrows};
329+
vector_t<value_type> ones{raft_handle, (size_t)nrows};
330330
ones.fill(1.0);
331331
sparse_matrix_t<index_type, value_type>::mv(1, ones.raw(), 0, diagonal_.raw());
332332
}
@@ -341,7 +341,7 @@ struct laplacian_matrix_t : sparse_matrix_t<index_type, value_type> {
341341
csr_m.nnz_),
342342
diagonal_(raft_handle, csr_m.nrows_)
343343
{
344-
vector_t<value_type> ones{raft_handle, csr_m.nrows_};
344+
vector_t<value_type> ones{raft_handle, (size_t)csr_m.nrows_};
345345
ones.fill(1.0);
346346
sparse_matrix_t<index_type, value_type>::mv(1, ones.raw(), 0, diagonal_.raw());
347347
}

0 commit comments

Comments
 (0)