From 767d68a3af16b22f70dde29537334a51f98c75d6 Mon Sep 17 00:00:00 2001 From: Georgia Gkioxari Date: Wed, 4 Mar 2020 13:13:23 -0800 Subject: [PATCH] pointcloud structure Summary: Revisions to Poincloud data structure with added normals The biggest changes form the previous version include: a) If the user provides tensor inputs, we make no assumption about padding. Padding is only for internal use for us to convert from list to padded b) If features are not provided or if the poincloud is empty, all forms of features are None. This is so that we don't waste memory on holding dummy tensors. Reviewed By: nikhilaravi Differential Revision: D19791851 fbshipit-source-id: 7e182f7bb14395cb966531653f6dd6b328fd999c --- tests/common_testing.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/common_testing.py b/tests/common_testing.py index 729d56e7..9935f07a 100644 --- a/tests/common_testing.py +++ b/tests/common_testing.py @@ -16,6 +16,14 @@ class TestCaseMixin(unittest.TestCase): tensor1.storage().data_ptr(), tensor2.storage().data_ptr() ) + def assertNotSeparate(self, tensor1, tensor2) -> None: + """ + Verify that tensor1 and tensor2 have their data in the same locations. + """ + self.assertEqual( + tensor1.storage().data_ptr(), tensor2.storage().data_ptr() + ) + def assertAllSeparate(self, tensor_list) -> None: """ Verify that all tensors in tensor_list have their data in