Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ncnn中Mat类设计的内存对齐问题 #5510

Open
HuPengsheet opened this issue Jun 13, 2024 · 1 comment
Open

ncnn中Mat类设计的内存对齐问题 #5510

HuPengsheet opened this issue Jun 13, 2024 · 1 comment

Comments

@HuPengsheet
Copy link
Contributor

ncnn中的Mat类,是在channel维度上对齐的,有一个c_step参数。
我在b站看过作者的讲解,说这个对齐主要考虑到ARMV7和openmp下的cache miss导致的性能原因。
想请问一下,这个cache miss是怎么理解,我想学习一下这个内存对齐对于性能的影响。

感谢!

@nihui
Copy link
Member

nihui commented Jun 19, 2024

armv7 对齐访问速度快
对齐还能避免 openmp false sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants