@@ -143,6 +143,16 @@ TEST(detector_cuda, detector_alignment) {
143
143
transform_t {shifted, tf.x (), tf.y (), tf.z ()});
144
144
}
145
145
146
+ std::cout << " Comparing translations STEP1" << std::endl;
147
+ typename decltype (det_host)::transform_container::context_type ctx{};
148
+ for (unsigned int i = 0u ; i < 20 ; i++) {
149
+ auto trstatic = det_host.transform_store ().at (i,ctx).translation ();
150
+ auto traligned = tf_store_aligned_host.at (i,ctx).translation ();
151
+ auto trdiff = traligned - trstatic;
152
+ EXPECT_POINT3_NEAR (trdiff, shift, 1e-6 );
153
+ }
154
+
155
+
146
156
// copy the vector of aligned transforms to the device
147
157
// again, use synchronous copy and fixed size buffers
148
158
auto tf_buff_aligned =
@@ -173,10 +183,11 @@ TEST(detector_cuda, detector_alignment) {
173
183
surfacexf_data_static, surfacexf_data_aligned);
174
184
175
185
// check that the relevant transforms have been properly shifted
176
- for (unsigned int i = 0u ; i < surfacexf_device_static.size (); i++) {
186
+ std::cout << " Comparing translations STEP3" << std::endl;
187
+ for (unsigned int i = 0u ; i < 20 ; i++) {
177
188
auto translation_static = surfacexf_device_static[i].translation ();
178
189
auto translation_aligned = surfacexf_device_aligned[i].translation ();
179
190
auto translation_diff = translation_aligned - translation_static;
180
- EXPECT_POINT3_NEAR (translation_diff, shift, 1e-5 );
191
+ EXPECT_POINT3_NEAR (translation_diff, shift, 1e-6 );
181
192
}
182
193
}
0 commit comments