在BLAS DGEMM LDA说法目的是什么? [英] Purpose of LDA argument in BLAS dgemm?

查看:603
本文介绍了在BLAS DGEMM LDA说法目的是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Fortran的参考实现文档状态:

The Fortran reference implementation documentation states:

*  LDA    - INTEGER.
*           On entry, LDA specifies the first dimension of A as declared
*           in the calling (sub) program. When  TRANSA = 'N' or 'n' then
*           LDA must be at least  max( 1, m ), otherwise  LDA must be at
*           least  max( 1, k ).
*           Unchanged on exit.

不过,鉴于M和K在没有我能得到LDA?如果是LDA允许更大大于n(或K)?

However, given m and k shouldn't I be able to derive LDA? When is LDA permitted to be bigger than n (or k)?

推荐答案

的区别是阵列A和B的物理尺寸的第一方面的逻辑大小之间。第一个是您正在使用的数组的大小,二是在申报的价值,或者使用的内存物理容量。自的Fortran是一个列主要语言,所有指数的除了最后的声明大小必须以计算一个数组元素的位置是已知的。通知FORTRAN 77样式声明A(LDA,),B(LDB,的),C(LDC,*)。数组的声明大小可以比您正在使用的部分大;当然,它也不能变小。

The distinction is between the logical size of the first dimensions of the arrays A and B and the physical size. The first is the size of the array that you are using, the second is the value in the declaration, or the physical amount of memory used. Since Fortran is a column major language, the declared sizes of all indices except the last must be known in order to calculate the location of an array element. Notice the FORTRAN 77 style declarations of "A(LDA,),B(LDB,),C(LDC,*)". The declared size of the array can be larger than the portion that you are using; of course it can't be smaller.

这篇关于在BLAS DGEMM LDA说法目的是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆