Attention
The vector search and clustering algorithms in RAFT are being migrated to a new library dedicated to vector search called cuVS. We will continue to support the vector search algorithms in RAFT during this move, but will no longer update them after the RAPIDS 24.06 (June) release. We plan to complete the migration by RAPIDS 24.10 (October) release and they will be removed from RAFT altogether in the 24.12 (December) release.
Matrix Operations#
Transpose#
#include <raft/linalg/transpose.cuh>
namespace raft::linalg
-
template<typename T, typename IndexType, typename LayoutPolicy, typename AccessorPolicy>
std::enable_if_t<std::is_floating_point_v<T>, void> transpose(raft::resources const &handle, raft::mdspan<T, raft::matrix_extent<IndexType>, LayoutPolicy, AccessorPolicy> in, raft::mdspan<T, raft::matrix_extent<IndexType>, LayoutPolicy, AccessorPolicy> out)# Transpose a matrix. The output has same layout policy as the input.
- Template Parameters:
T – Data type of input matrix element.
IndexType – Index type of matrix extent.
LayoutPolicy – Layout type of the input matrix. When layout is strided, it can be a submatrix of a larger matrix. Arbitrary stride is not supported.
AccessorPolicy – Accessor for the input and output, must be valid accessor on device.
- Parameters:
handle – [in] raft handle for managing expensive cuda resources.
in – [in] Input matrix.
out – [out] Output matrix, storage is pre-allocated by caller.