summaryrefslogtreecommitdiff
blob: 046b3252c36fa92403e16425895936c1670f7a7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
 src/cpp/flann/util/cuda/result_set.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/cpp/flann/util/cuda/result_set.h b/src/cpp/flann/util/cuda/result_set.h
index 9ac8111..324ca1e 100644
--- a/src/cpp/flann/util/cuda/result_set.h
+++ b/src/cpp/flann/util/cuda/result_set.h
@@ -54,7 +54,7 @@ struct SingleResultSet
     DistanceType bestDist;
     const DistanceType epsError;
 
-    __device__
+    __device__ __host__
     SingleResultSet( DistanceType eps ) : bestIndex(-1),bestDist(INFINITY), epsError(eps){ }
 
     __device__
@@ -129,7 +129,7 @@ struct KnnResultSet
     const DistanceType epsError;
 
 
-    __device__
+    __device__ __host__
     KnnResultSet(int knn, bool sortResults, DistanceType eps) : foundNeighbors(0),largestHeapDist(INFINITY),k(knn), sorted(sortResults), epsError(eps){ }
 
     //          __host__ __device__
@@ -229,7 +229,7 @@ struct CountingRadiusResultSet
     DistanceType radius_sq_;
     int max_neighbors_;
 
-    __device__
+    __device__ __host__
     CountingRadiusResultSet(DistanceType radius, int max_neighbors) : count_(0),radius_sq_(radius), max_neighbors_(max_neighbors){ }
 
     __device__
@@ -279,7 +279,7 @@ struct RadiusKnnResultSet
     //          int count_;
 
 
-    __device__
+    __device__ __host__
     RadiusKnnResultSet(DistanceType radius, int knn, int* segment_starts, bool sortResults) : foundNeighbors(0),largestHeapDist(radius),k(knn), sorted(sortResults), radius_sq_(radius),segment_starts_(segment_starts) { }
 
     //          __host__ __device__
@@ -381,7 +381,7 @@ struct KnnRadiusResultSet
     const DistanceType radius_sq;
 
 
-    __device__
+    __device__ __host__
     KnnRadiusResultSet(int knn, bool sortResults, DistanceType eps, DistanceType radius) : foundNeighbors(0),largestHeapDist(radius),k(knn), sorted(sortResults), epsError(eps),radius_sq(radius){ }
 
     //          __host__ __device__
@@ -484,7 +484,7 @@ struct RadiusResultSet
     int count_;
     bool sorted_;
 
-    __device__
+    __device__ __host__
     RadiusResultSet(DistanceType radius, int* segment_starts, bool sorted) : radius_sq_(radius), segment_starts_(segment_starts), count_(0), sorted_(sorted){ }
 
     __device__