Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PointCloud
Flann
提交
ea94533d
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,体验更适合开发者的 AI 搜索 >>
提交
ea94533d
编写于
12月 22, 2011
作者:
A
Andreas Muetzel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed flann cuda test (was not adapted to flann::matrix and flann:searchparams changes)
上级
0550a128
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
20 addition
and
20 deletion
+20
-20
test/flann_cuda_test.cu
test/flann_cuda_test.cu
+20
-20
未找到文件。
test/flann_cuda_test.cu
浏览文件 @
ea94533d
...
...
@@ -123,11 +123,11 @@ protected:
void
TearDown
()
{
delete
[]
data
.
data
;
delete
[]
query
.
data
;
delete
[]
match
.
data
;
delete
[]
dists
.
data
;
delete
[]
indices
.
data
;
delete
[]
data
.
ptr
()
;
delete
[]
query
.
ptr
()
;
delete
[]
match
.
ptr
()
;
delete
[]
dists
.
ptr
()
;
delete
[]
indices
.
ptr
()
;
}
};
...
...
@@ -225,12 +225,12 @@ protected:
void
TearDown
()
{
delete
[]
data
.
data
;
delete
[]
query
.
data
;
delete
[]
dists
.
data
;
delete
[]
gt_dists
.
data
;
delete
[]
indices
.
data
;
delete
[]
gt_indices
.
data
;
delete
[]
data
.
ptr
()
;
delete
[]
query
.
ptr
()
;
delete
[]
dists
.
ptr
()
;
delete
[]
gt_dists
.
ptr
()
;
delete
[]
indices
.
ptr
()
;
delete
[]
gt_indices
.
ptr
()
;
}
};
...
...
@@ -310,22 +310,22 @@ TEST_F(Flann_3D_Random_Cloud, Test4NNGpuBuffers)
indices
.
cols
=
4
;
dists
.
cols
=
4
;
flann
::
SearchParams
sp
;
sp
[
"matrices_in_gpu_ram"
]
=
true
;
sp
.
matrices_in_gpu_ram
=
true
;
index
.
knnSearch
(
query_device_matrix
,
indices_device_matrix
,
dists_device_matrix
,
4
,
sp
);
printf
(
"done (%g seconds)
\n
"
,
stop_timer
());
flann
::
Matrix
<
int
>
indices_host
(
new
int
[
query
.
rows
*
4
],
query
.
rows
,
4
);
flann
::
Matrix
<
float
>
dists_host
(
new
float
[
query
.
rows
*
4
],
query
.
rows
,
4
);
thrust
::
copy
(
dists_device
.
begin
(),
dists_device
.
end
(),
dists_host
.
data
);
thrust
::
copy
(
indices_device
.
begin
(),
indices_device
.
end
(),
indices_host
.
data
);
thrust
::
copy
(
dists_device
.
begin
(),
dists_device
.
end
(),
dists_host
.
ptr
()
);
thrust
::
copy
(
indices_device
.
begin
(),
indices_device
.
end
(),
indices_host
.
ptr
()
);
// float precision = compute_precision(gt_indices,indices);
float
precision
=
computePrecisionDiscrete
(
gt_dists
,
dists_host
,
1e-08
);
EXPECT_GE
(
precision
,
0.99
);
printf
(
"Precision: %g
\n
"
,
precision
);
delete
[]
indices_host
.
data
;
delete
[]
dists_host
.
data
;
delete
[]
indices_host
.
ptr
()
;
delete
[]
dists_host
.
ptr
()
;
}
TEST_F
(
Flann_3D_Random_Cloud
,
TestRadiusSearchVector
)
...
...
@@ -400,7 +400,7 @@ TEST_F(Flann_3D_Random_Cloud, TestRadiusSearchMatrix)
flann
::
Matrix
<
int
>
counts
(
new
int
[
query
.
rows
],
query
.
rows
,
1
);
flann
::
Matrix
<
float
>
dummy
(
0
,
0
,
0
);
flann
::
SearchParams
counting_params
;
counting_params
[
"max_neighbors"
]
=
0
;
counting_params
.
max_neighbors
=
0
;
start_timer
(
"counting neighbors..."
);
index
.
radiusSearch
(
query
,
counts
,
dists
,
r
*
r
,
counting_params
);
printf
(
"done (%g seconds)"
,
stop_timer
());
...
...
@@ -440,9 +440,9 @@ TEST_F(Flann_3D_Random_Cloud, TestRadiusSearchMatrix)
}
}
printf
(
"done (%g seconds)
\n
"
,
stop_timer
());
delete
[]
counts
.
data
;
delete
[]
indices
.
data
;
delete
[]
dists
.
data
;
delete
[]
counts
.
ptr
()
;
delete
[]
indices
.
ptr
()
;
delete
[]
dists
.
ptr
()
;
}
TEST_F
(
Flann_3D
,
TestRadiusSearch
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录