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!