Java package: com.nvidia.cuvs
This represents a wrapper for a dataset to be used for index construction. The purpose is to allow a caller to place the vectors into native memory directly, instead of requiring the caller to load all the vectors into the heap (e.g. with a float[][]).
Creates a dataset from an on-heap array of vectors. This method will allocate an additional MemorySegment to hold the graph data.
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:46
Creates a dataset from an on-heap array of vectors. This method will allocate an additional MemorySegment to hold the graph data.
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:56
Creates a dataset from an on-heap array of vectors. This method will allocate an additional MemorySegment to hold the graph data.
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:66
Adds a single vector to the matrix.
Parameters
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:80
Adds a single vector to the matrix.
Parameters
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:87
Adds a single vector to the matrix.
Parameters
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:94
Returns a builder to create a new instance of a host-memory matrix
Parameters
Returns
a builder for creating a CuVSHostMatrix
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:107
Returns a builder to create a new instance of a host-memory matrix
Parameters
Returns
a builder for creating a CuVSDeviceMatrix
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:121
Returns a builder to create a new instance of a dataset
Parameters
Returns
a builder for creating a CuVSDeviceMatrix
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:136
Returns a builder to create a new instance of a dataset
Parameters
Returns
a builder for creating a CuVSDeviceMatrix
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:152
Gets the size of the dataset
Returns
Size of the dataset
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:168
Gets the number of columns in the Dataset (e.g. the dimensions of the vectors in this dataset, or the graph degree for the graph represented as a list of neighbours
Returns
Dimensions of the vectors in the dataset
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:176
Gets the element type
Returns
a DataType describing the matrix element type
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:183
Get a view (0-copy) of the row data, as a list of integers (32 bit)
Parameters
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:190
Copies the content of this dataset to an on-heap Java matrix (array of arrays).
Parameters
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:198
Copies the content of this dataset to an on-heap Java matrix (array of arrays).
Parameters
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:206
Copies the content of this dataset to an on-heap Java matrix (array of arrays).
Parameters
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:214
Fills the provided, pre-allocated host matrix with data from this matrix. The content of the provided host matrix will be overwritten; the 2 matrices must have the same element type and dimension.
Parameters
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:223
Returns a host matrix; if the matrix is already a host matrix, a “weak” reference to the same host memory
is returned. If the matrix is a device matrix, a newly allocated matrix will be populated with data from
the device matrix.
The returned host matrix will need to be managed by the caller, which will be
responsible to call CuVSMatrix#close() to free its resources when done.
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:232
Fills the provided, pre-allocated device matrix with data from this matrix. The content of the provided device matrix will be overwritten; the 2 matrices must have the same element type and dimension.
Parameters
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:241
Returns a device matrix; if this matrix is already a device matrix, a “weak” reference to the same host memory
is returned. If the matrix is a host matrix, a newly allocated matrix will be populated with data from
the host matrix.
The returned device matrix will need to be managed by the caller, which will be
responsible to call CuVSMatrix#close() to free its resources when done.
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:250
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSMatrix.java:17