From 96e64e24b8ec37bfaf7e5f82dc73829b4c4eb6ec Mon Sep 17 00:00:00 2001 From: Latent Prion Date: Wed, 12 Nov 2025 12:49:54 -0400 Subject: [PATCH] OClCollMeshEngn: collBuff only needs MAP_WRITE; silence dbg prints When mapping in the collationBuff we only need to supply CL_MAP_WRITE and not CL_MAP_WRITE_INVALIDATE_REGION since we don't care to preserve the contents of the collation buff as input to the collation kernel. --- stimBuffApis/livoxGen1/collateDgrams.cl | 3 ++- stimBuffApis/livoxGen1/openClCollatingAndMeshingEngine.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/stimBuffApis/livoxGen1/collateDgrams.cl b/stimBuffApis/livoxGen1/collateDgrams.cl index 60e0d32..de56fac 100644 --- a/stimBuffApis/livoxGen1/collateDgrams.cl +++ b/stimBuffApis/livoxGen1/collateDgrams.cl @@ -1,5 +1,5 @@ // Debug macro: define DEBUG_COLLATE_DGRAMS to enable printf statements -#define DEBUG_COLLATE_DGRAMS +// #define DEBUG_COLLATE_DGRAMS #ifdef DEBUG_COLLATE_DGRAMS #define DBG_PRINTF(...) printf(__VA_ARGS__) #else @@ -49,6 +49,7 @@ __kernel void collate( // Each PointXYZI is 4 floats (x, y, z, intensity) #define FLOATS_PER_POINT 4 uint collationBaseOffset = slotIndex * nPointsPerSlot * FLOATS_PER_POINT; + DBG_PRINTF("Running kernel: about to process points in slot.\n"); // Process based on data type using nested ifs (outer) with loops (inner) if (dataType == 0) diff --git a/stimBuffApis/livoxGen1/openClCollatingAndMeshingEngine.cpp b/stimBuffApis/livoxGen1/openClCollatingAndMeshingEngine.cpp index a9c3eb5..1e23a5a 100644 --- a/stimBuffApis/livoxGen1/openClCollatingAndMeshingEngine.cpp +++ b/stimBuffApis/livoxGen1/openClCollatingAndMeshingEngine.cpp @@ -342,7 +342,7 @@ bool OpenClCollatingAndMeshingEngine::startCollateKernel( mapAssemblyBuffer(CL_MAP_WRITE_INVALIDATE_REGION); unmapAssemblyBuffer(); - mapCollationBuffer(CL_MAP_WRITE_INVALIDATE_REGION); + mapCollationBuffer(CL_MAP_WRITE); unmapCollationBuffer(); // Validate buffers callable