From ebfd6c855f60a5412da18dd3943ebad79ae5f079 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Wed, 3 Sep 2025 08:11:05 -0400 Subject: [PATCH 1/5] build(cmake): link to proper OpenSSL libraries --- qudarap/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qudarap/CMakeLists.txt b/qudarap/CMakeLists.txt index 32ffb57b09..e9741872e6 100644 --- a/qudarap/CMakeLists.txt +++ b/qudarap/CMakeLists.txt @@ -143,7 +143,13 @@ if(Custom4_FOUND) target_include_directories( ${name} PUBLIC ${Custom4_INCLUDE_DIR}) endif() -target_link_libraries( ${name} SysRap ssl) +find_package(OpenSSL REQUIRED) + +target_link_libraries( ${name} SysRap + OpenSSL::SSL + OpenSSL::Crypto +) + target_compile_definitions( ${name} PUBLIC OPTICKS_QUDARAP DEBUG_TAG ) From 53db2c1b19eb18eaf3794c551a7ab19083ac8bca Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Wed, 3 Sep 2025 08:15:00 -0400 Subject: [PATCH 2/5] fix(sysrap): avoid conflict with C++20 std::lerp in global space --- sysrap/scuda.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sysrap/scuda.h b/sysrap/scuda.h index 762883e4ec..707ed11862 100644 --- a/sysrap/scuda.h +++ b/sysrap/scuda.h @@ -102,12 +102,19 @@ SUTIL_INLINE SUTIL_HOSTDEVICE unsigned long long min(unsigned long long a, unsig } +// Avoid conflict with C++20 std::lerp (and bringing it into global) + +#if defined(__cpp_lib_interpolate) // && !defined(__CUDA_ARCH__) +using std::lerp; // make std::lerp visible to unqualified calls +#else + /** lerp */ SUTIL_INLINE SUTIL_HOSTDEVICE float lerp(const float a, const float b, const float t) { return a + t*(b-a); } +#endif From 7d9905e63d4b02a8686ba828d33c804d350d3da4 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Wed, 3 Sep 2025 08:16:11 -0400 Subject: [PATCH 3/5] fix(u4): proper initialization of empty vector in c++20 --- u4/U4SolidMaker.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/u4/U4SolidMaker.cc b/u4/U4SolidMaker.cc index c14eec8195..c5881dedf0 100644 --- a/u4/U4SolidMaker.cc +++ b/u4/U4SolidMaker.cc @@ -2138,7 +2138,7 @@ const G4VSolid* U4SolidMaker::BltLocalFastenerAcrylicConstruction(const char* na { [[maybe_unused]] const char* PREFIX = "BltLocalFastenerAcrylicConstruction" ; assert( sstr::StartsWith(name,PREFIX )); - long num_column = sstr::ExtractLong(name, 1) ; + const size_t num_column = static_cast(sstr::ExtractLong(name, 1)); LOG(info) << " name " << ( name ? name : "-" ) @@ -2151,7 +2151,8 @@ const G4VSolid* U4SolidMaker::BltLocalFastenerAcrylicConstruction(const char* na G4Tubs* screw = new G4Tubs("screw",0,13*mm,50.*mm,0.0*deg,360.0*deg); - G4ThreeVector tlate[num_column] = {} ; + std::vector tlate(num_column, G4ThreeVector(0,0,0)); + for(long i=0;i Date: Wed, 3 Sep 2025 10:20:01 -0400 Subject: [PATCH 4/5] Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- sysrap/scuda.h | 2 +- u4/U4SolidMaker.cc | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sysrap/scuda.h b/sysrap/scuda.h index 707ed11862..d547473027 100644 --- a/sysrap/scuda.h +++ b/sysrap/scuda.h @@ -105,7 +105,7 @@ SUTIL_INLINE SUTIL_HOSTDEVICE unsigned long long min(unsigned long long a, unsig // Avoid conflict with C++20 std::lerp (and bringing it into global) #if defined(__cpp_lib_interpolate) // && !defined(__CUDA_ARCH__) -using std::lerp; // make std::lerp visible to unqualified calls +using std::lerp; // make std::lerp visible to unqualified calls #else /** lerp */ diff --git a/u4/U4SolidMaker.cc b/u4/U4SolidMaker.cc index c5881dedf0..ab589a69c5 100644 --- a/u4/U4SolidMaker.cc +++ b/u4/U4SolidMaker.cc @@ -2151,9 +2151,10 @@ const G4VSolid* U4SolidMaker::BltLocalFastenerAcrylicConstruction(const char* na G4Tubs* screw = new G4Tubs("screw",0,13*mm,50.*mm,0.0*deg,360.0*deg); - std::vector tlate(num_column, G4ThreeVector(0,0,0)); + std::vector tlate(num_column, G4ThreeVector(0, 0, 0)); - for(long i=0;i Date: Wed, 3 Sep 2025 10:28:47 -0400 Subject: [PATCH 5/5] whitespace --- sysrap/scuda.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/sysrap/scuda.h b/sysrap/scuda.h index d547473027..d791a6546c 100644 --- a/sysrap/scuda.h +++ b/sysrap/scuda.h @@ -101,7 +101,6 @@ SUTIL_INLINE SUTIL_HOSTDEVICE unsigned long long min(unsigned long long a, unsig return a < b ? a : b; } - // Avoid conflict with C++20 std::lerp (and bringing it into global) #if defined(__cpp_lib_interpolate) // && !defined(__CUDA_ARCH__) @@ -116,8 +115,6 @@ SUTIL_INLINE SUTIL_HOSTDEVICE float lerp(const float a, const float b, const flo #endif - - /** bilerp */ SUTIL_INLINE SUTIL_HOSTDEVICE float bilerp(const float x00, const float x10, const float x01, const float x11, const float u, const float v)