Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PointCloud
Flann
提交
4badf713
F
Flann
项目概览
PointCloud
/
Flann
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Flann
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4badf713
编写于
10月 21, 2011
作者:
M
Marius Muja
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #18 from amuetzel/master
Fix for compiler error on windows
上级
5f361c93
e751b585
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
29 deletion
+29
-29
src/cpp/CMakeLists.txt
src/cpp/CMakeLists.txt
+1
-1
src/cpp/flann/util/cuda/result_set.h
src/cpp/flann/util/cuda/result_set.h
+28
-28
未找到文件。
src/cpp/CMakeLists.txt
浏览文件 @
4badf713
...
...
@@ -30,7 +30,7 @@ endif()
set_property
(
TARGET flann_cpp_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC
)
if
(
BUILD_CUDA_LIB
)
set
(
CUDA_NVCC_FLAGS
"
${
CUDA_NVCC_FLAGS
}
;-arch=sm_13"
)
#
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-arch=sm_13" )
cuda_add_library
(
flann_cuda_s STATIC
${
CU_SOURCES
}
)
set_property
(
TARGET flann_cuda_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC
)
endif
()
...
...
src/cpp/flann/util/cuda/result_set.h
浏览文件 @
4badf713
...
...
@@ -57,14 +57,14 @@ struct SingleResultSet
__device__
SingleResultSet
(
DistanceType
eps
)
:
bestIndex
(
-
1
),
bestDist
(
INFINITY
),
epsError
(
eps
){
}
__
host__
__
device__
__device__
inline
float
worstDist
()
{
return
bestDist
;
}
__
host__
__
device__
__device__
inline
void
insert
(
int
index
,
DistanceType
dist
)
{
...
...
@@ -91,7 +91,7 @@ struct SingleResultSet
}
}
__
host__
__
device__
__device__
inline
void
finish
()
{
...
...
@@ -103,7 +103,7 @@ struct SingleResultSet
template
<
typename
DistanceType
>
struct
GreaterThan
{
__
host__
__
device__
__device__
bool
operator
()(
DistanceType
a
,
DistanceType
b
)
{
return
a
>
b
;
...
...
@@ -135,14 +135,14 @@ struct KnnResultSet
// __host__ __device__
// KnnResultSet(const KnnResultSet& o):foundNeighbors(o.foundNeighbors),largestHeapDist(o.largestHeapDist),k(o.k){ }
__
host__
__
device__
__device__
inline
DistanceType
worstDist
()
{
return
largestHeapDist
;
}
__
host__
__
device__
__device__
inline
void
insert
(
int
index
,
DistanceType
dist
)
{
...
...
@@ -177,7 +177,7 @@ struct KnnResultSet
}
}
__
host__
__
device__
__device__
void
findLargestDistIndex
(
)
{
...
...
@@ -229,17 +229,17 @@ struct CountingRadiusResultSet
DistanceType
radius_sq_
;
int
max_neighbors_
;
__
host__
__
device__
__device__
CountingRadiusResultSet
(
DistanceType
radius
,
int
max_neighbors
)
:
count_
(
0
),
radius_sq_
(
radius
),
max_neighbors_
(
max_neighbors
){
}
__
host__
__
device__
__device__
inline
DistanceType
worstDist
()
{
return
radius_sq_
;
}
__
host__
__
device__
__device__
inline
void
insert
(
int
index
,
float
dist
)
{
...
...
@@ -250,14 +250,14 @@ struct CountingRadiusResultSet
int
*
resultIndex
;
__
host__
__
device__
__device__
inline
void
setResultLocation
(
DistanceType
*
/*dists*/
,
int
*
count
,
int
thread
,
int
stride
)
{
resultIndex
=
count
+
thread
*
stride
;
}
__
host__
__
device__
__device__
inline
void
finish
()
{
...
...
@@ -279,20 +279,20 @@ struct RadiusKnnResultSet
// int count_;
__
host__
__
device__
__device__
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__
// KnnResultSet(const KnnResultSet& o):foundNeighbors(o.foundNeighbors),largestHeapDist(o.largestHeapDist),k(o.k){ }
__
host__
__
device__
__device__
inline
DistanceType
worstDist
()
{
return
largestHeapDist
;
}
__
host__
__
device__
__device__
inline
void
insert
(
int
index
,
DistanceType
dist
)
{
...
...
@@ -328,7 +328,7 @@ struct RadiusKnnResultSet
}
}
__
host__
__
device__
__device__
void
findLargestDistIndex
(
)
{
...
...
@@ -345,7 +345,7 @@ struct RadiusKnnResultSet
DistanceType
*
resultDist
;
int
*
resultIndex
;
__
host__
__
device__
__device__
inline
void
setResultLocation
(
DistanceType
*
dists
,
int
*
index
,
int
thread
,
int
/*stride*/
)
{
...
...
@@ -353,7 +353,7 @@ struct RadiusKnnResultSet
resultIndex
=
index
+
segment_starts_
[
thread
];
}
__
host__
__
device__
__device__
inline
void
finish
()
{
...
...
@@ -381,20 +381,20 @@ struct KnnRadiusResultSet
const
DistanceType
radius_sq
;
__
host__
__
device__
__device__
KnnRadiusResultSet
(
int
knn
,
bool
sortResults
,
DistanceType
eps
,
DistanceType
radius
)
:
foundNeighbors
(
0
),
largestHeapDist
(
radius
),
k
(
knn
),
sorted
(
sortResults
),
epsError
(
eps
),
radius_sq
(
radius
){
}
// __host__ __device__
// KnnResultSet(const KnnResultSet& o):foundNeighbors(o.foundNeighbors),largestHeapDist(o.largestHeapDist),k(o.k){ }
__
host__
__
device__
__device__
inline
DistanceType
worstDist
()
{
return
largestHeapDist
;
}
__
host__
__
device__
__device__
inline
void
insert
(
int
index
,
DistanceType
dist
)
{
...
...
@@ -428,7 +428,7 @@ struct KnnRadiusResultSet
}
}
}
__
host__
__
device__
__device__
void
findLargestDistIndex
(
)
{
...
...
@@ -458,7 +458,7 @@ struct KnnRadiusResultSet
}
}
__
host__
__
device__
__device__
inline
void
finish
()
{
...
...
@@ -484,17 +484,17 @@ struct RadiusResultSet
int
count_
;
bool
sorted_
;
__
host__
__
device__
__device__
RadiusResultSet
(
DistanceType
radius
,
int
*
segment_starts
,
bool
sorted
)
:
radius_sq_
(
radius
),
segment_starts_
(
segment_starts
),
count_
(
0
),
sorted_
(
sorted
){
}
__
host__
__
device__
__device__
inline
DistanceType
worstDist
()
{
return
radius_sq_
;
}
__
host__
__
device__
__device__
inline
void
insert
(
int
index
,
DistanceType
dist
)
{
...
...
@@ -508,7 +508,7 @@ struct RadiusResultSet
int
*
resultIndex
;
DistanceType
*
resultDist
;
__
host__
__
device__
__device__
inline
void
setResultLocation
(
DistanceType
*
dists
,
int
*
index
,
int
thread
,
int
/*stride*/
)
{
...
...
@@ -516,7 +516,7 @@ struct RadiusResultSet
resultDist
=
dists
+
segment_starts_
[
thread
];
}
__
host__
__
device__
__device__
inline
void
finish
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录