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

Aperta Adatta ai principianti
#1,980 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 6 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
74/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
documentation

Direzione di ricerca

Inizia da docs/Coding_Knowledge_Base.md, righe 1097-1100, la voce requireArraysInMemory, poi confrontala con IParallelAlgorithm.cpp, righe 82-91, e con IParallelAlgorithm.hpp, righe 43-44, per confermare che ogni chiamata mantiene uno stato disabilitato. Riscrivi la voce in modo che fornisca questo motivo e indichi di chiamare setParallelizationEnabled(true) prima delle chiamate require. È completata quando la voce corrisponde al codice e al commento dell'header.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C++
Stelle
18
Fork
15
Merge medio
4g 23h
PR unite (30g)
42

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di BlueQuartzSoftware/simplnx

Tutte le issue di BlueQuartzSoftware/simplnx

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.