ENH: Add a bulk mask read to MaskCompare and use it for every mask read
Maintainer thường phản hồi trong vòng 6 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start with src/simplnx/Utilities/MaskCompareUtilities.hpp and .cpp to understand the existing mask interfaces, then inspect the listed OrientationAnalysis and SimplnxCore algorithms that bulk-read typed mask stores. Add a bulk read that reports transfer failures, route those algorithms through MaskCompare, and add the rule to docs/Code_Style_Guide.md. Done means in-core Release performance and out-of-core [ooc] tests meet the stated requirements.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Request: give MaskCompare a bulk read of a range of mask values that works for bool and uint8 masks, on in-memory and out-of-core stores, without making in-core algorithms slower. Then change every algorithm that reads a mask to read it through MaskCompare, instead of reading the typed mask stores itself.
Why: today a mask can be read in two different ways, and both are copied around the code base.
MaskCompare(MaskCompareUtilities.hpp) handlesboolanduint8masks behind one interface, but it reads one element at a time through the virtualisTrue(index),bothTrue()andbothFalse(). On an out-of-core store, each element read can load a whole chunk, so algorithms that are optimized for out-of-core data do not use it for their main loops.- Those algorithms read the mask in bulk instead. Each one checks whether the mask is a
UInt8Arrayor aBoolArray, callscopyIntoBuffer()on the matching store, and copies aboolmask through a contiguousboolscratch buffer, becausestd::vector<bool>is not contiguous. Each algorithm writes this branch itself. - A new algorithm then has to choose between a convenient helper that is slow out-of-core and a hand-written copy of the bulk pattern. Code that reads a mask only with
getDataAs<BoolArray>()getsnullptrfor auint8mask and silently ignores it.
Where it applies:
MaskCompare,BoolMaskCompare,UInt8MaskCompareandInstantiateMaskCompare()insrc/simplnx/Utilities/MaskCompareUtilities.hppand.cpp.- 27 files call
InstantiateMaskCompare()(at6dd86c67d). - These algorithms bulk-read the typed mask stores themselves. Several of them also use
MaskComparefor element access, and some handle only one of the two mask types. Each one needs to be checked:- OrientationAnalysis:
AlignSectionsMisorientation,AlignSectionsMutualInformation,BadDataNeighborOrientationCheckScanline,CAxisSegmentFeatures,ComputeFZQuaternions,EBSDSegmentFeatures,WriteStatsGenOdfAngleFile - SimplnxCore:
AlignSectionsFeatureCentroid,ComputeArrayHistogram,ComputeArrayHistogramByFeature,ComputeArrayStatistics,ComputeFeaturePhasesBinary,CreateColorMapScanline,DBSCANScanline,ErodeDilateMask,ExtractVertexGeometry
- OrientationAnalysis:
- Out-of-tree plugins, such as SimplnxReview, may contain the same pattern.
Requirements:
- The bulk read returns a
Resultfor a failed transfer. - In-core performance must not regress: compare the changed algorithms before and after in an in-core Release build.
- Out-of-core behavior must not regress: run the
[ooc]tests in the out-of-core build. - When
MaskComparehas the bulk read, add a rule todocs/Code_Style_Guide.mdthat algorithms read masks throughMaskCompare, in the same change.
The exact API (the signature of the bulk read, and whether it fills a uint8 or a bool buffer) is still open.
- Ngôn ngữ chính
- C++
- Star
- 18
- Fork
- 15
- Merge trung bình
- 4 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 42
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của BlueQuartzSoftware/simplnx
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
BlueQuartzSoftware/simplnx#1987 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
BlueQuartzSoftware/simplnx#1980 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
Testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
BlueQuartzSoftware/simplnx#1979 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
BlueQuartzSoftware/simplnx#1978 ·
Maintainer thường phản hồi trong vòng 6 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
BlueQuartzSoftware/simplnx#1945 ·
Maintainer thường phản hồi trong vòng 6 ngày
Tất cả issue của BlueQuartzSoftware/simplnx
Issue tương tự
-
bug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
26.04 bug dark-mode Easy Hack impress symptom: visual
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CollaboraOnline/online#16421 · 1 bình luận ·
-
area/cs bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ydb-platform/ydb#59881 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation enhancement lua server
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100