-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
K-core decomposition API update (#1924)
Partially addresses #1909. - [x] Add a K-core function declaration. Authors: - Seunghwa Kang (https://github.com/seunghwak) Approvers: - Chuck Hastings (https://github.com/ChuckHastings) - Rick Ratzel (https://github.com/rlratzel) URL: #1924
- Loading branch information
Showing
6 changed files
with
218 additions
and
1 deletion.
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,40 @@ | ||
/* | ||
* Copyright (c) 2020-2021, 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> | ||
#include <cugraph/graph_view.hpp> | ||
#include <cugraph/utilities/error.hpp> | ||
|
||
#include <raft/handle.hpp> | ||
|
||
#include <cstddef> | ||
|
||
namespace cugraph { | ||
|
||
template <typename vertex_t, typename edge_t, typename weight_t, bool multi_gpu> | ||
void core_number(raft::handle_t const& handle, | ||
graph_view_t<vertex_t, edge_t, weight_t, false, multi_gpu> const& graph_view, | ||
vertex_t* core_numbers, | ||
k_core_degree_type_t degree_type, | ||
size_t k_first, | ||
size_t k_last, | ||
bool do_expensive_check) | ||
{ | ||
CUGRAPH_FAIL("unimplemented."); | ||
} | ||
|
||
} // 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,71 @@ | ||
/* | ||
* Copyright (c) 2021, 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 <cores/core_number_impl.cuh> | ||
|
||
namespace cugraph { | ||
|
||
// MG instantiation | ||
|
||
template void core_number(raft::handle_t const& handle, | ||
graph_view_t<int32_t, int32_t, float, false, true> const& graph_view, | ||
int32_t* core_numbers, | ||
k_core_degree_type_t degree_type, | ||
size_t k_first, | ||
size_t k_last, | ||
bool do_expensive_check); | ||
|
||
template void core_number(raft::handle_t const& handle, | ||
graph_view_t<int32_t, int32_t, double, false, true> const& graph_view, | ||
int32_t* core_numbers, | ||
k_core_degree_type_t degree_type, | ||
size_t k_first, | ||
size_t k_last, | ||
bool do_expensive_check); | ||
|
||
template void core_number(raft::handle_t const& handle, | ||
graph_view_t<int32_t, int64_t, float, false, true> const& graph_view, | ||
int32_t* core_numbers, | ||
k_core_degree_type_t degree_type, | ||
size_t k_first, | ||
size_t k_last, | ||
bool do_expensive_check); | ||
|
||
template void core_number(raft::handle_t const& handle, | ||
graph_view_t<int32_t, int64_t, double, false, true> const& graph_view, | ||
int32_t* core_numbers, | ||
k_core_degree_type_t degree_type, | ||
size_t k_first, | ||
size_t k_last, | ||
bool do_expensive_check); | ||
|
||
template void core_number(raft::handle_t const& handle, | ||
graph_view_t<int64_t, int64_t, float, false, true> const& graph_view, | ||
int64_t* core_numbers, | ||
k_core_degree_type_t degree_type, | ||
size_t k_first, | ||
size_t k_last, | ||
bool do_expensive_check); | ||
|
||
template void core_number(raft::handle_t const& handle, | ||
graph_view_t<int64_t, int64_t, double, false, true> const& graph_view, | ||
int64_t* core_numbers, | ||
k_core_degree_type_t degree_type, | ||
size_t k_first, | ||
size_t k_last, | ||
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,71 @@ | ||
/* | ||
* Copyright (c) 2021, 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 <cores/core_number_impl.cuh> | ||
|
||
namespace cugraph { | ||
|
||
// MG instantiation | ||
|
||
template void core_number(raft::handle_t const& handle, | ||
graph_view_t<int32_t, int32_t, float, false, false> const& graph_view, | ||
int32_t* core_numbers, | ||
k_core_degree_type_t degree_type, | ||
size_t k_first, | ||
size_t k_last, | ||
bool do_expensive_check); | ||
|
||
template void core_number(raft::handle_t const& handle, | ||
graph_view_t<int32_t, int32_t, double, false, false> const& graph_view, | ||
int32_t* core_numbers, | ||
k_core_degree_type_t degree_type, | ||
size_t k_first, | ||
size_t k_last, | ||
bool do_expensive_check); | ||
|
||
template void core_number(raft::handle_t const& handle, | ||
graph_view_t<int32_t, int64_t, float, false, false> const& graph_view, | ||
int32_t* core_numbers, | ||
k_core_degree_type_t degree_type, | ||
size_t k_first, | ||
size_t k_last, | ||
bool do_expensive_check); | ||
|
||
template void core_number(raft::handle_t const& handle, | ||
graph_view_t<int32_t, int64_t, double, false, false> const& graph_view, | ||
int32_t* core_numbers, | ||
k_core_degree_type_t degree_type, | ||
size_t k_first, | ||
size_t k_last, | ||
bool do_expensive_check); | ||
|
||
template void core_number(raft::handle_t const& handle, | ||
graph_view_t<int64_t, int64_t, float, false, false> const& graph_view, | ||
int64_t* core_numbers, | ||
k_core_degree_type_t degree_type, | ||
size_t k_first, | ||
size_t k_last, | ||
bool do_expensive_check); | ||
|
||
template void core_number(raft::handle_t const& handle, | ||
graph_view_t<int64_t, int64_t, double, false, false> const& graph_view, | ||
int64_t* core_numbers, | ||
k_core_degree_type_t degree_type, | ||
size_t k_first, | ||
size_t k_last, | ||
bool do_expensive_check); | ||
|
||
} // namespace cugraph |
File renamed without changes.