DOC: Knowledge base gives the wrong reason for the requireArraysInMemory call order

Đang mở Phù hợp với người mới
#1,980 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
74/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu tại docs/Coding_Knowledge_Base.md, dòng 1097-1100, mục requireArraysInMemory, sau đó so sánh với IParallelAlgorithm.cpp, dòng 82-91, và IParallelAlgorithm.hpp, dòng 43-44, để xác nhận rằng mỗi lệnh gọi giữ trạng thái bị vô hiệu hóa. Viết lại mục này để nêu lý do đó và cho biết phải gọi setParallelizationEnabled(true) trước các lệnh gọi require. Hoàn thành khi mục này khớp với mã nguồn và chú thích trong header.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

documentation

Summary

The rule for requireArraysInMemory() in the coding knowledge base gives the wrong reason for its call order. The text should describe what the code does.

What the knowledge base says. docs/Coding_Knowledge_Base.md lines 1097-1100: "Each call replaces the previous decision, so call it once with all arrays, and call setParallelizationEnabled(false) after it, not before."

How it works now. IParallelAlgorithm.cpp lines 82-91 combines each call with the current state:

setParallelizationEnabled(getParallelizationEnabled() && CheckArraysInMemory(arrays));

So a call never re-enables parallel work. It only keeps or sets the disabled state. The header says the same thing (IParallelAlgorithm.hpp lines 43-44): "Each call preserves a disabled state. Call setParallelizationEnabled(true) to reset the state in a multicore build."

Why it matters. The advice itself is still safe, but the stated reason is wrong. A developer who believes that a later call replaces an earlier one may split the arrays across several calls and expect only the last to count, or may call setParallelizationEnabled(true) after the require calls and silently turn the out-of-core gate off.

Where it applies. Only the knowledge-base entry. The request is to state the real rule: each call keeps a disabled state, and setParallelizationEnabled(true) resets it, so call it before the require calls, never after.

Found during the review of the #1908 batch 4 changes (FeatureFaceCurvature out-of-core gate). No open issue covered it.

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của BlueQuartzSoftware/simplnx

Tất cả issue của BlueQuartzSoftware/simplnx

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.