@@ -62,13 +62,7 @@ names = [
62
62
cpu_bm_pcloud = setup_benchmark_record (names)
63
63
gpu_bm_pcloud = setup_benchmark_record (names)
64
64
65
- names = [
66
- " ScaleTriMesh" ,
67
- " RotateTriMesh" ,
68
- " ReAlignTriMesh" ,
69
- " NormalizeTriMesh" ,
70
- " Chain" ,
71
- ]
65
+ names = [" ScaleTriMesh" , " RotateTriMesh" , " ReAlignTriMesh" , " NormalizeTriMesh" , " Chain" ]
72
66
cpu_bm_trimesh = setup_benchmark_record (names)
73
67
gpu_bm_trimesh = setup_benchmark_record (names)
74
68
@@ -78,25 +72,36 @@ for _npoints in npoint_arr
78
72
pcloud_arr = [
79
73
(ScalePointCloud (0.5 ; inplace = false ), " ScalePointCloud" ),
80
74
(RotatePointCloud (ROT_MATRIX; inplace = false ), " RotatePointCloud" ),
81
- (ReAlignPointCloud (realign_point_cloud (_npoints); inplace = false ),
82
- " ReAlignPointCloud" ),
75
+ (
76
+ ReAlignPointCloud (realign_point_cloud (_npoints); inplace = false ),
77
+ " ReAlignPointCloud" ,
78
+ ),
83
79
(NormalizePointCloud (inplace = false ), " NormalizePointCloud" ),
84
- (Chain (ScalePointCloud (0.5 ; inplace = false ),
85
- RotatePointCloud (ROT_MATRIX; inplace = false ),
86
- ReAlignPointCloud (realign_point_cloud (_npoints);inplace = false ,),
87
- NormalizePointCloud ())," Chain" ,)
80
+ (
81
+ Chain (
82
+ ScalePointCloud (0.5 ; inplace = false ),
83
+ RotatePointCloud (ROT_MATRIX; inplace = false ),
84
+ ReAlignPointCloud (realign_point_cloud (_npoints); inplace = false ),
85
+ NormalizePointCloud (),
86
+ ),
87
+ " Chain" ,
88
+ ),
88
89
]
89
90
90
91
trimesh_arr = [
91
92
(ScaleTriMesh (0.5 ; inplace = true ), " ScaleTriMesh" ),
92
93
(RotateTriMesh (ROT_MATRIX; inplace = true ), " RotateTriMesh" ),
93
- (ReAlignTriMesh (realign_trimesh (_npoints); inplace = true ),
94
- " ReAlignTriMesh" ),
94
+ (ReAlignTriMesh (realign_trimesh (_npoints); inplace = true ), " ReAlignTriMesh" ),
95
95
(NormalizeTriMesh (inplace = true ), " NormalizeTriMesh" ),
96
- (Chain (ScaleTriMesh (0.5 ; inplace = true ),
97
- RotateTriMesh (ROT_MATRIX; inplace = true ),
98
- ReAlignTriMesh (realign_trimesh (_npoints); inplace = true ),
99
- NormalizeTriMesh (inplace = true ))," Chain" ),
96
+ (
97
+ Chain (
98
+ ScaleTriMesh (0.5 ; inplace = true ),
99
+ RotateTriMesh (ROT_MATRIX; inplace = true ),
100
+ ReAlignTriMesh (realign_trimesh (_npoints); inplace = true ),
101
+ NormalizeTriMesh (inplace = true ),
102
+ ),
103
+ " Chain" ,
104
+ ),
100
105
]
101
106
println (" Running benchmarks for npoints = $_npoints " )
102
107
run_benchmarks! (
@@ -126,25 +131,36 @@ if has_cuda()
126
131
pcloud_arr = [
127
132
(ScalePointCloud (0.5 ; inplace = false ), " ScalePointCloud" ),
128
133
(RotatePointCloud (ROT_MATRIX; inplace = false ), " RotatePointCloud" ),
129
- (ReAlignPointCloud (realign_point_cloud (_npoints); inplace = false ),
130
- " ReAlignPointCloud" ),
134
+ (
135
+ ReAlignPointCloud (realign_point_cloud (_npoints); inplace = false ),
136
+ " ReAlignPointCloud" ,
137
+ ),
131
138
(NormalizePointCloud (inplace = false ), " NormalizePointCloud" ),
132
- (Chain (ScalePointCloud (0.5 ; inplace = false ),
133
- RotatePointCloud (ROT_MATRIX; inplace = false ),
134
- ReAlignPointCloud (realign_point_cloud (_npoints);inplace = false ,),
135
- NormalizePointCloud ())," Chain" ,)
139
+ (
140
+ Chain (
141
+ ScalePointCloud (0.5 ; inplace = false ),
142
+ RotatePointCloud (ROT_MATRIX; inplace = false ),
143
+ ReAlignPointCloud (realign_point_cloud (_npoints); inplace = false ),
144
+ NormalizePointCloud (),
145
+ ),
146
+ " Chain" ,
147
+ ),
136
148
]
137
149
138
150
trimesh_arr = [
139
151
(ScaleTriMesh (0.5 ; inplace = true ), " ScaleTriMesh" ),
140
152
(RotateTriMesh (ROT_MATRIX; inplace = true ), " RotateTriMesh" ),
141
- (ReAlignTriMesh (realign_trimesh (_npoints); inplace = true ),
142
- " ReAlignTriMesh" ),
153
+ (ReAlignTriMesh (realign_trimesh (_npoints); inplace = true ), " ReAlignTriMesh" ),
143
154
(NormalizeTriMesh (inplace = true ), " NormalizeTriMesh" ),
144
- (Chain (ScaleTriMesh (0.5 ; inplace = true ),
145
- RotateTriMesh (ROT_MATRIX; inplace = true ),
146
- ReAlignTriMesh (realign_trimesh (_npoints); inplace = true ),
147
- NormalizeTriMesh (inplace = true ))," Chain" ),
155
+ (
156
+ Chain (
157
+ ScaleTriMesh (0.5 ; inplace = true ),
158
+ RotateTriMesh (ROT_MATRIX; inplace = true ),
159
+ ReAlignTriMesh (realign_trimesh (_npoints); inplace = true ),
160
+ NormalizeTriMesh (inplace = true ),
161
+ ),
162
+ " Chain" ,
163
+ ),
148
164
]
149
165
println (" Running benchmarks for npoints = $_npoints " )
150
166
run_benchmarks! (
@@ -153,15 +169,15 @@ if has_cuda()
153
169
_npoints,
154
170
generate_point_cloud,
155
171
(op, pc) -> (CUDA. @sync op (pc)),
156
- gpu
172
+ gpu,
157
173
)
158
174
run_benchmarks! (
159
175
gpu_bm_trimesh,
160
176
trimesh_arr,
161
177
_npoints,
162
178
generate_trimesh,
163
179
(op, pc) -> (CUDA. @sync op (pc)),
164
- gpu
180
+ gpu,
165
181
)
166
182
println ()
167
183
end
@@ -172,16 +188,14 @@ function save_bm(fname, rep, cpu_benchmarks, gpu_benchmarks)
172
188
device = " cpu"
173
189
for (key, values) in cpu_benchmarks
174
190
for (p, v) in zip (npoint_arr, values)
175
- Printf. @printf (io, " %s %s %s %d %f ms\n " ,
176
- rep, device, key, p, v)
191
+ Printf. @printf (io, " %s %s %s %d %f ms\n " , rep, device, key, p, v)
177
192
end
178
193
end
179
194
180
195
device = " gpu"
181
196
for (key, values) in gpu_benchmarks
182
197
for (p, v) in zip (npoint_arr, values)
183
- Printf. @printf (io, " %s %s %s %d %f ms\n " ,
184
- rep, device, key, p, v)
198
+ Printf. @printf (io, " %s %s %s %d %f ms\n " , rep, device, key, p, v)
185
199
end
186
200
end
187
201
end
0 commit comments