Skip to content

Commit ea5b944

Browse files
committed
remove distance example
1 parent 88aaa35 commit ea5b944

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

README.md

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# <div align="left"><img src="https://rapids.ai/assets/images/rapids_logo.png" width="90px"/>&nbsp;RAFT: Reusable Accelerated Functions and Tools for Vector Search and More</div>
1+
# <div align="left"><img src="https://rapids.ai/assets/images/rapids_logo.png" width="90px"/>&nbsp;RAFT: Reusable Accelerated Functions and Tools</div>
22

33
<p align="center">
44
<img src="https://raw.githubusercontent.com/rapidsai/raft/HEAD/img/raft-tech-stack.svg" alt="RAFT tech stack" width="100%">
@@ -96,29 +96,7 @@ auto matrix = raft::make_device_matrix<float>(handle, n_rows, n_cols);
9696
Most of the primitives in RAFT accept a `raft::device_resources` object for the management of resources which are expensive to create, such CUDA streams, stream pools, and handles to other CUDA libraries like `cublas` and `cusolver`.
9797

9898
The example below demonstrates creating a RAFT handle and using it with `device_matrix` and `device_vector` to allocate memory, generating random clusters, and computing
99-
pairwise Euclidean distances:
100-
```c++
101-
#include <raft/core/device_resources.hpp>
102-
#include <raft/core/device_mdarray.hpp>
103-
#include <raft/random/make_blobs.cuh>
104-
#include <raft/distance/distance.cuh>
105-
106-
raft::device_resources handle;
107-
108-
int n_samples = 5000;
109-
int n_features = 50;
110-
111-
auto input = raft::make_device_matrix<float, int>(handle, n_samples, n_features);
112-
auto labels = raft::make_device_vector<int, int>(handle, n_samples);
113-
auto output = raft::make_device_matrix<float, int>(handle, n_samples, n_samples);
114-
115-
raft::random::make_blobs(handle, input.view(), labels.view());
116-
117-
auto metric = raft::distance::DistanceType::L2SqrtExpanded;
118-
raft::distance::pairwise_distance(handle, input.view(), input.view(), output.view(), metric);
119-
```
120-
121-
It's also possible to create `raft::device_mdspan` views to invoke the same API with raw pointers and shape information. Take this example from the [NVIDIA cuVS](https://github.com/rapidsai/cuvs) library:
99+
pairwise Euclidean distances with the [NVIDIA cuVS](https://github.com/rapidsai/cuvs) library:
122100

123101
```c++
124102
#include <raft/core/device_resources.hpp>

0 commit comments

Comments
 (0)