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
  • raft::make_device_vector
  • raft::make_host_matrix
  • raft::make_host_vector
API ReferenceCpp API DocumentationCommon Types

Owning Array Factories

||View as Markdown|
Previous

Owning Dense Arrays

Next

Layouts and Extents

raft::make_device_matrix

Source header: raft/core/device_mdarray.hpp

Allocates an owning device matrix.

1template <typename ElementType, typename IndexType, typename LayoutPolicy>
2auto make_device_matrix(raft::resources const& res, IndexType rows, IndexType cols);

Parameters

NameTypeDescription
resraft::resources const&Resources object used for allocation.
rowsIndexTypeNumber of rows.
colsIndexTypeNumber of columns.

Returns

raft::device_matrix<ElementType, IndexType, LayoutPolicy>

raft::make_device_vector

Source header: raft/core/device_mdarray.hpp

Allocates an owning device vector.

1template <typename ElementType, typename IndexType, typename LayoutPolicy>
2auto make_device_vector(raft::resources const& res, IndexType size);

Parameters

NameTypeDescription
resraft::resources const&Resources object used for allocation.
sizeIndexTypeNumber of elements.

Returns

raft::device_vector<ElementType, IndexType, LayoutPolicy>

raft::make_host_matrix

Source header: raft/core/host_mdarray.hpp

Allocates an owning host matrix.

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

Parameters

NameTypeDescription
rowsIndexTypeNumber of rows.
colsIndexTypeNumber of columns.

Returns

raft::host_matrix<ElementType, IndexType, LayoutPolicy>

raft::make_host_vector

Source header: raft/core/host_mdarray.hpp

Allocates an owning host vector.

1template <typename ElementType, typename IndexType, typename LayoutPolicy>
2auto make_host_vector(IndexType size);

Parameters

NameTypeDescription
sizeIndexTypeNumber of elements.

Returns

raft::host_vector<ElementType, IndexType, LayoutPolicy>