-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define C++ API for triangle counting. Authors: - Seunghwa Kang (https://github.com/seunghwak) Approvers: - Chuck Hastings (https://github.com/ChuckHastings) - Joseph Nke (https://github.com/jnke2016) URL: #2233
- Loading branch information
Showing
5 changed files
with
177 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright (c) 2022, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
#pragma once | ||
|
||
#include <cugraph/algorithms.hpp> | ||
|
||
namespace cugraph { | ||
|
||
template <typename vertex_t, typename edge_t, typename weight_t, bool multi_gpu> | ||
void triangle_counts(raft::handle_t const& handle, | ||
graph_view_t<vertex_t, edge_t, weight_t, false, multi_gpu> const& graph_view, | ||
std::optional<raft::device_span<vertex_t>> vertices, | ||
raft::device_span<edge_t> counts, | ||
bool do_expensive_check) | ||
{ | ||
CUGRAPH_FAIL("unimplemented."); | ||
return; | ||
} | ||
|
||
} // namespace cugraph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* Copyright (c) 2022, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include <community/triangle_counts_impl.cuh> | ||
|
||
namespace cugraph { | ||
|
||
void triangle_counts(raft::handle_t const& handle, | ||
graph_view_t<int32_t, int32_t, float, false, true> const& graph_view, | ||
std::optional<raft::device_span<int32_t>> vertices, | ||
raft::device_span<int32_t> counts, | ||
bool do_expensive_check); | ||
|
||
void triangle_counts(raft::handle_t const& handle, | ||
graph_view_t<int32_t, int32_t, double, false, true> const& graph_view, | ||
std::optional<raft::device_span<int32_t>> vertices, | ||
raft::device_span<int32_t> counts, | ||
bool do_expensive_check); | ||
|
||
void triangle_counts(raft::handle_t const& handle, | ||
graph_view_t<int32_t, int64_t, float, false, true> const& graph_view, | ||
std::optional<raft::device_span<int32_t>> vertices, | ||
raft::device_span<int64_t> counts, | ||
bool do_expensive_check); | ||
|
||
void triangle_counts(raft::handle_t const& handle, | ||
graph_view_t<int32_t, int64_t, double, false, true> const& graph_view, | ||
std::optional<raft::device_span<int32_t>> vertices, | ||
raft::device_span<int64_t> counts, | ||
bool do_expensive_check); | ||
|
||
void triangle_counts(raft::handle_t const& handle, | ||
graph_view_t<int64_t, int64_t, float, false, true> const& graph_view, | ||
std::optional<raft::device_span<int64_t>> vertices, | ||
raft::device_span<int64_t> counts, | ||
bool do_expensive_check); | ||
|
||
void triangle_counts(raft::handle_t const& handle, | ||
graph_view_t<int64_t, int64_t, double, false, true> const& graph_view, | ||
std::optional<raft::device_span<int64_t>> vertices, | ||
raft::device_span<int64_t> counts, | ||
bool do_expensive_check); | ||
|
||
} // namespace cugraph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* Copyright (c) 2022, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include <community/triangle_counts_impl.cuh> | ||
|
||
namespace cugraph { | ||
|
||
void triangle_counts(raft::handle_t const& handle, | ||
graph_view_t<int32_t, int32_t, float, false, false> const& graph_view, | ||
std::optional<raft::device_span<int32_t>> vertices, | ||
raft::device_span<int32_t> counts, | ||
bool do_expensive_check); | ||
|
||
void triangle_counts(raft::handle_t const& handle, | ||
graph_view_t<int32_t, int32_t, double, false, false> const& graph_view, | ||
std::optional<raft::device_span<int32_t>> vertices, | ||
raft::device_span<int32_t> counts, | ||
bool do_expensive_check); | ||
|
||
void triangle_counts(raft::handle_t const& handle, | ||
graph_view_t<int32_t, int64_t, float, false, false> const& graph_view, | ||
std::optional<raft::device_span<int32_t>> vertices, | ||
raft::device_span<int64_t> counts, | ||
bool do_expensive_check); | ||
|
||
void triangle_counts(raft::handle_t const& handle, | ||
graph_view_t<int32_t, int64_t, double, false, false> const& graph_view, | ||
std::optional<raft::device_span<int32_t>> vertices, | ||
raft::device_span<int64_t> counts, | ||
bool do_expensive_check); | ||
|
||
void triangle_counts(raft::handle_t const& handle, | ||
graph_view_t<int64_t, int64_t, float, false, false> const& graph_view, | ||
std::optional<raft::device_span<int64_t>> vertices, | ||
raft::device_span<int64_t> counts, | ||
bool do_expensive_check); | ||
|
||
void triangle_counts(raft::handle_t const& handle, | ||
graph_view_t<int64_t, int64_t, double, false, false> const& graph_view, | ||
std::optional<raft::device_span<int64_t>> vertices, | ||
raft::device_span<int64_t> counts, | ||
bool do_expensive_check); | ||
|
||
} // namespace cugraph |