36 | inline Topology::Topology(Taskflow& tf, P&& p, C&& c):
37 | _taskflow(tf),
38 | _pred {std::forward(p)},
39 | _call {std::forward(c)} {
40 | }
41 |
42 | // Procedure: _bind
43 | // Re-builds the source links and the sink number for this topology.
44 | //inline void Topology::_bind(Graph& g) {
45 | //
46 | // _sources.clear();
47 | //
48 | // //PassiveVector condition_nodes;
49 | //
50 | // // scan each node in the graph and build up the links
51 | // for(auto& node : g.nodes()) {
52 | //
53 | // node->_topology = this;
54 | // node->_clear_state();
55 | // node->_set_up_join_counter();
56 | //
57 | // if(node->num_dependents() == 0) {
58 | // _sources.push_back(node.get());
59 | // }
60 | //
61 | // //int join_counter = 0;
62 | // //for(auto p : node->_dependents) {
63 | // // if(p->_work.index() == Node::CONDITION_WORK) {
64 | // // node->_set_state(Node::BRANCH);
65 | // // }
66 | // // else {
67 | // // join_counter++;
68 | // // }
69 | // //}
70 | //
71 | // //node->_join_counter.store(join_counter, std::memory_order_relaxed);
72 | //
73 | // //// TODO: Merge with the loop below?
74 | // //if(node->_work.index() == Node::CONDITION_WORK) {
75 | // // condition_nodes.push_back(node.get());
76 | // //}
77 | //
78 | // //// Reset each node's num_dependents
79 | // //node->_join_counter.store(node->_dependents.size(), std::memory_order_relaxed);
80 | // }
81 | //
82 | // // We need to deduct the condition predecessors in impure case nodes
83 | // //for(auto& n: condition_nodes) {
84 | // // for(auto& s: n->_successors) {
85 | // // s->_join_counter.fetch_sub(1, std::memory_order_relaxed);
86 | // // s->set_branch();
87 | // // }
88 | // //}
89 | //}
90 |
91 |
92 |
93 | } // end of namespace tf. ----------------------------------------------------
94 |
--------------------------------------------------------------------------------
/pandar_pointcloud/src/conversions/laser_ts.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Copyright 2019 The Hesai Technology Authors. All Rights Reserved.
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 |
17 | #ifndef LASER_TS_H_
18 | #define LASER_TS_H_
19 |
20 | #include