cheshirekow  v0.1.0
rect_dist.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Josh Bialkowski (jbialk@mit.edu)
3  *
4  * This file is part of mpblocks.
5  *
6  * mpblocks is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * mpblocks is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with mpblocks. If not, see <http://www.gnu.org/licenses/>.
18  */
27 #ifndef MPBLOCKS_CUDA_NN_RECT_DIST_H_
28 #define MPBLOCKS_CUDA_NN_RECT_DIST_H_
29 
30 
32 
33 namespace mpblocks {
34 namespace cudaNN {
35 
36 
37 
38 
39 template< bool Pseudo, typename Scalar, unsigned int NDim >
41 {
42  Scalar* g_out;
43  Scalar h_out[16];
44 
45  so3_distance();
46  ~so3_distance();
47 
49  Scalar* h_out );
50 
51  template< class inserter >
52  void operator()( const RectangleQuery<Scalar,NDim>& query, inserter& insert )
53  {
54  (*this)(query,h_out);
55  std::copy(h_out,h_out+16,insert);
56  }
57 };
58 
59 template< bool Pseudo, typename Scalar, unsigned int NDim >
61 {
62  Scalar* g_out;
63  Scalar h_out[16];
64 
67 
69  Scalar* h_out );
70 
71  template< class inserter >
72  void operator()( const RectangleQuery<Scalar,NDim>& query, inserter& insert )
73  {
74  (*this)(query,h_out);
75  std::copy(h_out,h_out+16,insert);
76  }
77 };
78 
79 
80 
81 } // cudaNN
82 } // mpblocks
83 
84 
85 #endif // RECT_DIST_H_
void operator()(const RectangleQuery< Scalar, NDim > &query, inserter &insert)
Definition: rect_dist.h:52
void operator()(RectangleQuery< Scalar, NDim > query, Scalar *h_out)
void operator()(const RectangleQuery< Scalar, NDim > &query, inserter &insert)
Definition: rect_dist.h:72
Char8_t * copy(const Char8_t *s)
void operator()(RectangleQuery< Scalar, NDim > query, Scalar *h_out)
void insert(NodeRef node, PointRef point, const IsLeafFn &isLeaf, const LeafInsertFn &leafInsert, const IdxFn &idx, const ValueFn &value, const ChildFn &child, const PointGetFn &pointGet)
Definition: insert.h:46