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

Abierto Apto para principiantes
#1,980 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 6 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
74/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
cpp

Línea de trabajo

Empieza en docs/Coding_Knowledge_Base.md, líneas 1097-1100, la entrada requireArraysInMemory, y luego compárala con IParallelAlgorithm.cpp, líneas 82-91, y con IParallelAlgorithm.hpp, líneas 43-44, para confirmar que cada llamada mantiene un estado deshabilitado. Reescribe la entrada para que indique esa razón y diga que hay que llamar a setParallelizationEnabled(true) antes de las llamadas a require. Estará terminada cuando la entrada coincida con el código y con el comentario del encabezado.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C++
Estrellas
18
Forks
15
Merge medio
4 d 23 h
PR fusionados (30 d)
42

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de BlueQuartzSoftware/simplnx

Todos los issues de BlueQuartzSoftware/simplnx

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.