1. 18 Jan, 2023 1 commit
  2. 17 Jan, 2023 3 commits
  3. 01 Dec, 2022 1 commit
  4. 30 Nov, 2022 1 commit
  5. 25 Nov, 2022 2 commits
    • Andrei Gheata's avatar
      Make BVHSafetyEstimator and BVHNavigator usable on device. · 748e5e09
      Andrei Gheata authored
      Function annotation as host device as needed. Implement the Instance method for the GPU case.
      748e5e09
    • Andrei Gheata's avatar
      Simplification of daughter crossing check. · 97d92e6c
      Andrei Gheata authored
      Simplify the current logic which uses the mother volume convexity to prioritize daughter checks. This approach is not always justified because it may increase the search range for daughter candidates. The current approach is conservative and uses the distance to mother first to limit the search distance for daughters, only if there are daughters. The check for daughters at this point spares extra checks in the derived navigators, which in the case of BVH was even generating a crash.
      97d92e6c
  6. 22 Nov, 2022 8 commits
    • Guilherme Amadio's avatar
    • Guilherme Amadio's avatar
      Remove workaround for old GCC versions in robin_hood.h · ce5b0fbd
      Guilherme Amadio authored
      This leads to warnings with Clang:
      
      VecGeom/VecGeom/base/robin_hood.h:1224:40:
        warning: builtin __has_trivial_copy is deprecated;
        use __is_trivially_copyable instead [-Wdeprecated-builtins]
          Cloner<unordered_map, IsFlatMap && ROBIN_HOOD_IS_TRIVIALLY_COPYABLE(Node)>()(o, *this);
                                             ^
      VecGeom/VecGeom/base/robin_hood.h:158:47:
        note: expanded from macro 'ROBIN_HOOD_IS_TRIVIALLY_COPYABLE'
        #define ROBIN_HOOD_IS_TRIVIALLY_COPYABLE(...) __has_trivial_copy(__VA_ARGS__)
      ce5b0fbd
    • Guilherme Amadio's avatar
      Fix mismatched new[] vs delete for things using VariableSizeObj · 5797fe7a
      Guilherme Amadio authored
      VariableSizeObj returns a pointer allocated with new char[n], so it
      needs to be deleted in the same way:
      
      VecGeom/test/core/BitSetTest.cpp: In function ‘void BitSetTest()’:
      VecGeom/test/core/BitSetTest.cpp:90:10: warning: ‘void operator delete(void*, std::size_t)’
      called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
         90 |   delete s;
            |          ^
      In file included from VecGeom/VecGeom/base/BitSet.h:11,
                       from VecGeom/test/core/BitSetTest.cpp:1:
      In static member function
      ‘static Cont* vecgeom::VariableSizeObjectInterface<Cont, V>::MakeInstance(size_t, const T& ...)
        [with T = {long unsigned int}; Cont = vecgeom::BitSet; V = unsigned char]’,
        inlined from ‘static vecgeom::BitSet* vecgeom::BitSet::MakeInstance(size_t)’
          at VecGeom/VecGeom/base/BitSet.h:255:32,
        inlined from ‘void BitSetTest()’
          at VecGeom/test/core/BitSetTest.cpp:58:35:
          VecGeom/VecGeom/base/VariableSizeObj.h:95:21:
          note: returned from ‘void* operator new [](std::size_t)’
        95 |     char *ptr     = new char[needed];
           |                     ^~~~~~~~~~~~~~~~
      
      from VecGeom/test/core/testVectorSafety.cpp:13:
      In static member function
      ‘static Cont* vecgeom::VariableSizeObjectInterface<Cont, V>::MakeInstance(size_t, const T& ...)
      [with T = {}; Cont = vecgeom::cxx::NavStatePath; V = long unsigned int]’, inlined from
      ‘static vecgeom::cxx::NavStatePath* vecgeom::cxx::NavStatePath::MakeInstance(int)’
        at VecGeom/VecGeom/navigation/NavStatePath.h:218:32, inlined from
        ‘void testVectorNavigator(const vecgeom::cxx::VPlacedVolume*)’
          at VecGeom/test/core/testVectorSafety.cpp:121:57:
            VecGeom/VecGeom/base/VariableSizeObj.h:95:21:
            note: returned from ‘void* operator new [](std::size_t)’
         95 |     char *ptr     = new char[needed];
            |                     ^~~~~~~~~~~~~~~~
      5797fe7a
    • Guilherme Amadio's avatar
    • Guilherme Amadio's avatar
      Avoid calling copy() for AOS3D/SOA3D of size zero · 1467654c
      Guilherme Amadio authored
      Calling copy() with an SOA3D of size zero leads to calling memmove
      with a null pointer when it expects non-null arguments:
      
      ... inlined from ‘vecgeom::cxx::AOS3D<T>::AOS3D(size_t) [with T = double]’
        at VecGeom/VecGeom/base/AOS3D.h:148:10,
          inlined from ‘void SizeTest() [with T = double; ContainerType = vecgeom::cxx::AOS3D]’
            at VecGeom/test/core/ContainerTest.cpp:9:20:
            /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_algobase.h:431:30:
            warning: argument 1 null where non-null expected [-Wnonnull]
        431 |             __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
            |             ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_algobase.h:431:30:
        note: in a call to built-in function
          ‘void* __builtin_memmove(void*, const void*, long unsigned int)’
      
      This may also happen when AOS3D::reserve(0) is called, or when creating
      a zero-sized container by calling the constructor with a size of 0.
      1467654c
    • Guilherme Amadio's avatar
      a498d68b
    • Guilherme Amadio's avatar
      b1c42c49
    • Guilherme Amadio's avatar
      5422622c
  7. 21 Nov, 2022 1 commit
  8. 17 Nov, 2022 1 commit
  9. 14 Nov, 2022 1 commit
  10. 08 Nov, 2022 1 commit
  11. 20 Sep, 2022 1 commit
    • Jonas Hahnfeld's avatar
      [cuda] Expose function to change heap limit · f9ecc97b
      Jonas Hahnfeld authored
      As of now, all "dynamically sized" shapes such as polyhedra, polycones,
      and extruded solids allocate memory in kernels. This is problematic as
      CUDA only has a very limited amount of scratch space for malloc / new.
      Until the "transfer code" for these types of shapes is fixed, add the
      function CudaDeviceSetHeapLimit similar to CudaDeviceSetStackLimit to
      let VecGeom clients work around this problem.
      f9ecc97b
  12. 16 Sep, 2022 1 commit
  13. 06 Sep, 2022 1 commit
    • Bernhard Manfred Gruber's avatar
      Fix size calculation of navigation index table · 4e083cd7
      Bernhard Manfred Gruber authored
      The previous commit 5c505fb4 "Ensure that transformation data in nav table is stored aligned" did not update the navigation index table size correctly. This lead to out of bounds access, because the allocated buffer for the table was not large enough. Commit b99894e0 fixed an assertion triggerd by this bug, but did not fix the issue for all code paths.
      4e083cd7
  14. 05 Sep, 2022 5 commits
  15. 30 Aug, 2022 2 commits
  16. 29 Aug, 2022 2 commits
  17. 25 Aug, 2022 1 commit
  18. 19 Aug, 2022 1 commit
    • Benjamin Morgan's avatar
      VECGEOM-601: Add regression test Polycone/Cone tolerance issue · d8e3adc4
      Benjamin Morgan authored and Andrei Gheata's avatar Andrei Gheata committed
      ATLAS reported an issue with stuck tracks in their simulation, with
      Geant4 Cons,Polycons replaced by VecGeom versions. VecGeom versions
      up to 1.1.20 were checked. Triaged to VecGeom's Polycone/Cone
      DistanceToOut and Inside functions using kHalfConeTolerance and
      kConeTolerance respectively. Can results in points close to surface
      being marked as "on surface" by Inside, but "outside" by DistanceToOut.
      The overall effect of this is that DistanceToOut always returns an
      infinite distance for such points.
      
      VecGeom MR !874 (after 1.1.20) updated the Polycone/Cone implementation to only
      use kConeTolerance, and this resolves the problem.
      
      Add ATLAS test case that exposed the problem as a new unit test to
      identify any regressions future changes in Polycone/Cone might introduce.
      d8e3adc4
  19. 16 Aug, 2022 2 commits
  20. 14 Jul, 2022 1 commit
    • Benjamin Morgan's avatar
      Make utilities/ code a test-only library · 2cbbbd6c
      Benjamin Morgan authored
      The Visualizer and ShapeDebugger code are only used in tests, but get
      compiled into the vecgeom library with the headers not installed.
      
      Move their headers/implementations to a subdirectory of test/. Build
      them into a dedicated library, linking this to tests when it is present.
      2cbbbd6c
  21. 13 Jul, 2022 1 commit
  22. 12 Jul, 2022 2 commits