문제

This link is the manual of MKL,

http://software.intel.com/sites/products/documentation/hpc/mkl/mklman/index.htm,

and This link is the example of cblas_dgemm,

http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?cmd=getdoc&coll=0650&db=man&fname=3%20INTRO_CBLAS

In the manual, Under RowMajor, NoTransA and NoTransB he says lda is the rows(A),ldb is the rows(B), ldc is the rows(C), But, In the example,

    float a[10][20], b[20][30], c[10][30];
    cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 10, 30,
             20, 1.0f, a, 20, b, 30, 0.0f, c, 30);

the lda and ldb and ldc is the cols(a) , cols(b) , cols(c)

What's wrong?

도움이 되었습니까?

해결책

The example your showed is correct. For row-major matrix without padding byte, leading dimension is equal to the number of columns.

I can't find lda is the rows(A) in MKL doc, could you provide a traceable link instead?

PS: You may want to change to the latest version of MKL docs.

http://software.intel.com/en-us/articles/intel-math-kernel-library-documentation

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top