C libraries-LAPACK MEPL EIGEN
이전 댓글 표시
I am finding it difficult to learn about C libraries-LAPACK MEPL EIGEN. Please help me find good references.
댓글 수: 11
Walter Roberson
2017년 12월 25일
편집: Walter Roberson
2017년 12월 26일
MEPL -- do you mean Mentor Embedded Performance Library ?
Could you be more specific about what you want to know? The entire source code for LAPACK is available
ANAGHA GOURI
2017년 12월 26일
Walter Roberson
2017년 12월 26일
MEPL appears to be proprietary. I had not heard of it.
https://www.mentor.com/embedded-software/hpc-libraries
It would help if you asked more specific questions instead of just saying that you are not familiar with the libraries.
ANAGHA GOURI
2017년 12월 29일
ANAGHA GOURI
2018년 1월 15일
편집: ANAGHA GOURI
2018년 1월 15일
Jan
2018년 1월 15일
A normalization sounds more like you need the elementwise division:
b ./ max(b)
Note that the matrix division is performed by a LAPACK routine internally already. So I do not see a need to call it explicitly.
Walter Roberson
2018년 1월 15일
" Problems that LAPACK can Solve
LAPACK can solve systems of linear equations, linear least squares problems, eigenvalue problems and singular value problems. LAPACK can also handle many associated computations such as matrix factorizations or estimating condition numbers. "
Those are not the types of problems you are attempting to solve.
Walter Roberson
2018년 1월 15일
"Is there a LAPACK or CBLAS function that can be used to normalise an m by n matrix ? A=abs(B/max(B)); %B is m by n matrix"
Not directly. You can calculate 1/max(B) and you can build a vector of zeros the same size as the number of elements in B, and then you can call daxpy with 1/max(B) as the "alpha" parameter, B(:) as the x parameter, and the vector of zeros as the "y" parameter; dapxy would calculate alpha*x+y which would then be (1/max(B)) * B(:) + 0; you would reshape the result back to size(B). It is far from clear that this would be any more efficient than calculating 1/max(B) and doing all of the multiplications yourself.
You are using PowerPC, which does not have any SIMD (Single Instruction Multiple Data) vector instructions for double precision other than type conversion to single, or swapping words. See http://moss.csc.ncsu.edu/~mueller/cluster/ps3/SDK3.0/docs/arch/vector_simd_pem_v_2.07c_26Oct2006_cell.pdf. So basically you cannot do better than an unrolled loop written in C using the obvious operations. You probably do not need to worry about cache-line problems as long as you proceed through sequential memory addresses.
"Also, Is there a LAPACK or CBLAS function that can be used to find log10 of an m by n matrix ? A = 10*log10(B);"
No. They do not do log.
Walter Roberson
2018년 1월 15일
"Since max(b) is a row vector containing the maximum value of each column, can't b/max(b(:)) be calculated using functions like dgesv()"
Are you normalizing each column independently ?
But in any case, No, there are no LAPACK or BLAS calls for scalar multiplication or division on a per-column basis.
ANAGHA GOURI
2018년 1월 16일
Walter Roberson
2018년 1월 16일
I did not notice at the time of the original post that you were not asking for the maximum over the entire matrix. I later updated with "there are no LAPACK or BLAS calls for scalar multiplication or division on a per-column basis."
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Linear Algebra에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!