For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
GitHubCUDA-X
    • Home
    • Installation
  • Getting Started
    • Introduction
    • Integrations
    • Use-cases
  • User Guide
    • API Guide
    • Benchmarking Guide
    • Compatibility
    • Integration Patterns
    • Advanced Topics
    • References
  • Developer Guide
    • Coding Guidelines
    • ABI Stability
    • Link-time Optimization
    • Contributing
  • API Reference
    • C API Documentation
    • Cpp API Documentation
      • Cluster Agglomerative
      • Cluster Kmeans
      • Cluster Spectral
      • Common Types
        • Execution Resources
        • Dense Array Views
        • Dense View Factories
        • Owning Dense Arrays
        • Owning Array Factories
        • Layouts and Extents
        • Sparse Array Types
        • Copy, Serialization, and Utility APIs
        • Errors and Logging
      • Distance Distance
      • Distance Grammian
      • Neighbors All Neighbors
      • Neighbors Ball Cover
      • Neighbors Brute Force
      • Neighbors Cagra
      • Neighbors Common
      • Neighbors Dynamic Batching
      • Neighbors Epsilon Neighborhood
      • Neighbors HNSW
      • Neighbors Composite Index
      • Neighbors IVF Flat
      • Neighbors IVF PQ
      • Neighbors NN Descent
      • Neighbors Refine
      • Neighbors Scann
      • Neighbors Tiered Index
      • Neighbors Vamana
      • Preprocessing Quantize Binary
      • Preprocessing PCA
      • Preprocessing Quantize PQ
      • Preprocessing Quantize Scalar
      • Preprocessing Spectral Embedding
      • Selection Select K
      • Stats Silhouette Score
      • Stats Trustworthiness Score
      • Util Cutlass Utils
      • Util File Io
    • Python API Documentation
    • Java API Documentation
    • Rust API Documentation
    • Go API Documentation
NVIDIANVIDIA
Developer-friendly docs for your API
Privacy Policy | Manage My Privacy | Do Not Sell or Share My Data | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact

Copyright © 2026, NVIDIA Corporation.

LogoLogocuVS
GitHubCUDA-X
On this page
  • raft::make_device_matrix_view
  • raft::make_device_vector_view
  • raft::make_host_matrix_view
  • raft::make_host_vector_view
  • raft::make_const_mdspan
API ReferenceCpp API DocumentationCommon Types

Dense View Factories

||View as Markdown|
Previous

Dense Array Views

Next

Owning Dense Arrays

raft::make_device_matrix_view

Source header: raft/core/device_mdspan.hpp

Constructs a device matrix view from a pointer and shape.

1template <typename ElementType, typename IndexType, typename LayoutPolicy>
2auto make_device_matrix_view(ElementType* ptr, IndexType rows, IndexType cols);

Parameters

NameTypeDescription
ptrElementType*Pointer to device-accessible matrix storage.
rowsIndexTypeNumber of rows.
colsIndexTypeNumber of columns.

Returns

raft::device_matrix_view<ElementType, IndexType, LayoutPolicy>

raft::make_device_vector_view

Source header: raft/core/device_mdspan.hpp

Constructs a device vector view from a pointer and size.

1template <typename ElementType, typename IndexType, typename LayoutPolicy>
2auto make_device_vector_view(ElementType* ptr, IndexType size);

Parameters

NameTypeDescription
ptrElementType*Pointer to device-accessible vector storage.
sizeIndexTypeNumber of elements.

Returns

raft::device_vector_view<ElementType, IndexType, LayoutPolicy>

raft::make_host_matrix_view

Source header: raft/core/host_mdspan.hpp

Constructs a host matrix view from a pointer and shape.

1template <typename ElementType, typename IndexType, typename LayoutPolicy>
2auto make_host_matrix_view(ElementType* ptr, IndexType rows, IndexType cols);

Parameters

NameTypeDescription
ptrElementType*Pointer to host matrix storage.
rowsIndexTypeNumber of rows.
colsIndexTypeNumber of columns.

Returns

raft::host_matrix_view<ElementType, IndexType, LayoutPolicy>

raft::make_host_vector_view

Source header: raft/core/host_mdspan.hpp

Constructs a host vector view from a pointer and size.

1template <typename ElementType, typename IndexType, typename LayoutPolicy>
2auto make_host_vector_view(ElementType* ptr, IndexType size);

Parameters

NameTypeDescription
ptrElementType*Pointer to host vector storage.
sizeIndexTypeNumber of elements.

Returns

raft::host_vector_view<ElementType, IndexType, LayoutPolicy>

raft::make_const_mdspan

Source header: raft/core/mdspan.hpp

Converts a mutable mdspan-like view into a const view.

1template <typename View>
2auto make_const_mdspan(View view);

Parameters

NameTypeDescription
viewViewView to convert to a const view.

Returns

View with const element type