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

未关闭 适合新手
#1,980 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 6 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
74/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
cpp
领域
documentation

调研方向

从 docs/Coding_Knowledge_Base.md 第1097-1100行的 requireArraysInMemory 条目开始,然后将其与 IParallelAlgorithm.cpp 第82-91行以及 IParallelAlgorithm.hpp 第43-44行进行比较,以确认每次调用都保持禁用状态。重写该条目,说明这一原因,并指出在 require 调用之前应先调用 setParallelizationEnabled(true)。当条目与代码及头文件注释一致时即完成。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
C++
星标
18
派生
15
平均合并
4 天 23 小时
30 天内合并 PR
42

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

BlueQuartzSoftware/simplnx 的其他 Issue

查看 BlueQuartzSoftware/simplnx 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。