cpu.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023-2024, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
21 
22 #include <type_traits>
23 
24 namespace ML {
25 namespace experimental {
26 namespace fil {
27 namespace detail {
28 namespace device_initialization {
29 
30 /* Specialization for any initialization required for CPUs
31  *
32  * This specialization will also be used for non-GPU-enabled builds
33  * (as a GPU no-op).
34  */
35 template <typename forest_t, raft_proto::device_type D>
36 std::enable_if_t<std::disjunction_v<std::bool_constant<!raft_proto::GPU_ENABLED>,
37  std::bool_constant<D == raft_proto::device_type::cpu>>,
38  void>
40 {
41 }
42 
43 } // namespace device_initialization
44 } // namespace detail
45 } // namespace fil
46 } // namespace experimental
47 } // namespace ML
std::enable_if_t< std::disjunction_v< std::bool_constant<!raft_proto::GPU_ENABLED >, std::bool_constant< D==raft_proto::device_type::cpu > >, void > initialize_device(raft_proto::device_id< D > device)
Definition: cpu.hpp:39
Definition: dbscan.hpp:30
Definition: base.hpp:22