boostorg / boostorg/multi_array

Performance issue on resize

未關閉
#32 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C++
星號
32
分支
39
PR 合併指標
30 天內沒有已合併 PR

描述

When I use `boost::multi_array` with `boost::fortran_storage_order()`, and I want to `.resize` by only the latest (rightmost) dimension, the current implementation is a nested `N` function call (`std::copy`), one by dimension.
The same functionality can be reached with one `std::copy` on the storage.

This minimal example shows the problem:
https://godbolt.org/z/GWbxcM14h

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

首先找出 boost::multi_array 的 resize 實作以及對 fortran_storage_order() 的處理。使用 https://godbolt.org/z/GWbxcM14h 中的最小範例比較目前的行為和效能;當只調整最右側維度的大小即可在不使用此處所述的巢狀 std::copy 呼叫的情況下維持行為時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
cpp
領域
performance
Issue 類型
重構
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。