Unverified Commit 53714ca8 authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files

[graphbolt] Add const for const reference. (#5744)


Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-28-63.ap-northeast-1.compute.internal>
parent 00972dee
...@@ -46,7 +46,7 @@ class CSCSamplingGraph : public torch::CustomClassHolder { ...@@ -46,7 +46,7 @@ class CSCSamplingGraph : public torch::CustomClassHolder {
* present. * present.
*/ */
CSCSamplingGraph( CSCSamplingGraph(
torch::Tensor& indptr, torch::Tensor& indices, const torch::Tensor& indptr, const torch::Tensor& indices,
const torch::optional<torch::Tensor>& node_type_offset, const torch::optional<torch::Tensor>& node_type_offset,
const torch::optional<torch::Tensor>& type_per_edge); const torch::optional<torch::Tensor>& type_per_edge);
...@@ -62,7 +62,7 @@ class CSCSamplingGraph : public torch::CustomClassHolder { ...@@ -62,7 +62,7 @@ class CSCSamplingGraph : public torch::CustomClassHolder {
* @return CSCSamplingGraph * @return CSCSamplingGraph
*/ */
static c10::intrusive_ptr<CSCSamplingGraph> FromCSC( static c10::intrusive_ptr<CSCSamplingGraph> FromCSC(
torch::Tensor indptr, torch::Tensor indices, const torch::Tensor indptr, const torch::Tensor indices,
const torch::optional<torch::Tensor>& node_type_offset, const torch::optional<torch::Tensor>& node_type_offset,
const torch::optional<torch::Tensor>& type_per_edge); const torch::optional<torch::Tensor>& type_per_edge);
......
...@@ -11,7 +11,7 @@ namespace graphbolt { ...@@ -11,7 +11,7 @@ namespace graphbolt {
namespace sampling { namespace sampling {
CSCSamplingGraph::CSCSamplingGraph( CSCSamplingGraph::CSCSamplingGraph(
torch::Tensor& indptr, torch::Tensor& indices, const torch::Tensor& indptr, const torch::Tensor& indices,
const torch::optional<torch::Tensor>& node_type_offset, const torch::optional<torch::Tensor>& node_type_offset,
const torch::optional<torch::Tensor>& type_per_edge) const torch::optional<torch::Tensor>& type_per_edge)
: indptr_(indptr), : indptr_(indptr),
...@@ -24,7 +24,7 @@ CSCSamplingGraph::CSCSamplingGraph( ...@@ -24,7 +24,7 @@ CSCSamplingGraph::CSCSamplingGraph(
} }
c10::intrusive_ptr<CSCSamplingGraph> CSCSamplingGraph::FromCSC( c10::intrusive_ptr<CSCSamplingGraph> CSCSamplingGraph::FromCSC(
torch::Tensor indptr, torch::Tensor indices, const torch::Tensor indptr, const torch::Tensor indices,
const torch::optional<torch::Tensor>& node_type_offset, const torch::optional<torch::Tensor>& node_type_offset,
const torch::optional<torch::Tensor>& type_per_edge) { const torch::optional<torch::Tensor>& type_per_edge) {
if (node_type_offset.has_value()) { if (node_type_offset.has_value()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment