Files
FESADev/phases/cpp-object-oriented-modular-refactoring/step10.md
T

67 lines
2.9 KiB
Markdown

# Step 10: Dense BLAS Adapter
> 과거 개발 계획이다. 아래 작업·상태·예시는 현재 실행 지시가 아니다.
> 현재 구현과 검증 한계는 [기능 요약](../../docs/cpp-object-oriented-modular-refactoring/README.md)을 따른다.
## 읽어야 할 파일
- `/AGENTS.md`
- `../../docs/solver-core/README.md`
- `../../docs/solver-core/README.md`
- `../../docs/cpp-object-oriented-modular-refactoring/README.md`
- `/include/fesa/math/vector.h`, `/src/fesa/math/vector.cpp`
- `/include/fesa/math/matrix.h`, `/src/fesa/math/matrix.cpp`
- `/tests/unit/math/vector_test.cpp`, `/tests/unit/math/matrix_test.cpp`
- `/src/fesa/CMakeLists.txt`, `/tests/CMakeLists.txt`
- `/phases/cpp-object-oriented-modular-refactoring/index.json`
- `/phases/cpp-object-oriented-modular-refactoring/step10.md`
## 작업
Requirement `R-DUP-002`의 dense-BLAS duplication만 제거한다.
1. `/tests/unit/math/dense_blas_internal_test.cpp`를 먼저 추가하고 `C-DUP-003`을 작성한다.
Test는 zero/normal/overflow length conversion과 zero/nonzero contiguous copy behavior를
검증한다.
2. Missing internal adapter include/symbol로 RED compile failure를 기록한다.
3. Private candidate module은 `/src/fesa/math/dense_blas_internal.h`와
`/src/fesa/math/dense_blas_internal.cpp`다.
Tests에 private include directory가 필요하면 `fesa_unit_tests`에만
`${PROJECT_SOURCE_DIR}/src/fesa`를 PRIVATE로 추가한다.
4. Candidate functions:
```cpp
namespace fesa::dense_blas_internal {
Result<MKL_INT> ToMklSize(std::size_t size);
void CopyValues(const double* source, std::size_t size, double* destination);
} // namespace fesa::dense_blas_internal
```
5. `MKL_INT` and MKL includes are permitted only in this private implementation boundary and
existing backend `.cpp`; no file under `/include/fesa/` may expose them.
6. Matrix/Vector의 duplicated conversion/copy helpers를 adapter call로 교체한다. Exception,
Status/failure meaning, row-major layout and BLAS call order stay unchanged.
## Acceptance Criteria
과거 도구 실행·출력 지시는 정리했으며, 현재 검증 방법은 기능 요약을 따른다.
The public-header vendor scan must return no matches. The private helper scan must show one
definition family and the two intended consumers only.
## 검증 및 상태 갱신
- RED missing seam, focused conversion/copy behavior, scans and full CTest를 summary에 기록한다.
- Public vendor type leak or behavior regression이면 `error`로 기록한다.
- 성공 시 현재 Step만 `completed`로 갱신한다.
- timestamp, retry, commit, advancement는 Executor 소유다.
## 금지사항
- Public math API에 MKL type을 추가하지 마라.
- Matrix layout 또는 BLAS operation order를 바꾸지 마라.
- SIMD, allocation or runtime performance optimization을 하지 마라.
- 직접 commit하거나 hook script를 수동 실행하지 마라.