"src/vscode:/vscode.git/clone" did not exist on "3e3d46924b4fd1fa36ccbc5605ed619cdcc00dbf"
matrix_ops_impl.h 663 Bytes
Newer Older
1
2
3
4
5
6
7
8
/**
 *  Copyright (c) 2023 by Contributors
 * @file matrix_ops_impl.h
 * @brief DGL C++ sparse matrix operator implementations.
 */
#ifndef DGL_SPARSE_MATRIX_OPS_IMPL_H_
#define DGL_SPARSE_MATRIX_OPS_IMPL_H_

xiangyuzhi's avatar
xiangyuzhi committed
9
10
11
12
#include <sparse/sparse_format.h>

#include <tuple>

13
namespace dgl {
xiangyuzhi's avatar
xiangyuzhi committed
14
15
16
17
18
19
20
21
22
23
24
namespace sparse {

template <c10::DeviceType XPU, typename IdType>
std::tuple<c10::intrusive_ptr<SparseMatrix>, torch::Tensor> CompactImpl(
    const c10::intrusive_ptr<SparseMatrix>& mat, int64_t dim,
    torch::Tensor leading_indices) {
  // Place holder only.
  return {mat, leading_indices};
}

}  // namespace sparse
25
26
27
}  // namespace dgl

#endif  // DGL_SPARSE_MATRIX_OPS_IMPL_H_