Matrix Operations#
Transpose#
#include <raft/linalg/transpose.cuh>
namespace raft::linalg
-
template<typename T, typename IndexType, typename LayoutPolicy>
std::enable_if_t<raft::is_floating_point_v<T>, void> transpose( - raft::resources const &handle,
- raft::device_matrix_view<const T, IndexType, LayoutPolicy> in,
- raft::device_matrix_view<T, IndexType, LayoutPolicy> out
Transpose a matrix. The output has same layout policy as the input.
- Template Parameters:
T – Data type of input matrix element. The supported data types are half, float, and double.
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.
- Parameters:
handle – [in] raft handle for managing expensive cuda resources.
in – [in] Input matrix.
out – [out] Output matrix, storage is pre-allocated by caller.
-
template<typename T, typename IndexType, typename LayoutPolicy>
std::enable_if_t<raft::is_floating_point_v<T>, void> transpose( - raft::resources const &handle,
- raft::device_matrix_view<T, IndexType, LayoutPolicy> in,
- raft::device_matrix_view<T, IndexType, LayoutPolicy> out
Mutable-input overload retained for backward compatibility.
Prefer the const-input overload, using raft::make_const_mdspan(in) when needed. See that overload for parameter documentation.