问题描述
相关问题Fortran: Which method is faster to change the rank of arrays? (Reshape vs. Pointer)
如果我有张量收缩
A[a,b] * B[b,c,d] = C[a,d]
如果我使用BLAS,我想我需要DGEMM(假设真实值),那么我可以
- 首先将张量
B[b,d]
重塑为D[b,e]
wheree = c*d
, - DGEMM,
A[a,b] * D[b,e] = E[a,e]
- 将
E[a,e]
改造成C[a,d]
问题是,reshape 没有那么快 :( 我在 Fortran: Which method is faster to change the rank of arrays? (Reshape vs. Pointer) 中看到了讨论 ,在上面的链接中,作者遇到了一些错误信息,除了reshape本身。
因此,我在问是否有一个方便的解决方案。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)