In function VerifyMatrixIdentity, we need to access i,j value of m1. Through the below virtual call m1(i,j) we get access to the array fElement. Is there a direct way to get access to the array without making these virtual calls.
GetMatrixArray() can be used to access the array but it is still pure virtual in TMatrixDBase.
It can be used to compare TMatrixD, TMatrixDSym and TMatrixDSparse
matrixes . Since they have different storage properties, we have
to access the matrix elements through m(i,j) or m[i][j] .
You seem to want to able to have access to the bare pointers
for speed ?? In that case, you will have to define your own
routine like for instance :
Sure you could do that . However, the interpretation of the returned
data pointer is completely different for a TMatrixDSparse and
TMatrixD,TMatrixDSym . In the future, we could introduce a
difference between TMatrixD and TMatrixDSym .
Compilation goes through fine, but get run time error in test, "StressLinear"
In functions mstress_matrix_io() and void astress_decomp_io(Int_t msize).
Donot know why we have this error in this function.
You created now a routine that is in the base class and will
not work for a Sparse matrix ??
You changed a whole bunch of files and got an error .
Do you now expect that others make the same changes and
reproduce it ??
If you would have followed my suggestion of Replacing the
VerifyMatrixIdentity with the ones that have the required signature,
the changes would have been minimal .
Could you at least make clear why your changes are necessary ?
What I am looking at is the general improvement in performance of the benchmarks. We noticed that VerifyMatrixIdentity is one of the function hot spots in stressLinear benchmark.
On analysis, we see the code generated for TMath::Abs(m1(i,j)-m2(i,j)); is not efficient.
To check if we see better code generation and in turn better performance, I am trying to write code to directly access fElements. As you have mentioned earlier, the interpretation of the returned data pointer is different for TMatrixD, TMatrixDSym and so on. Due to this my source code changes would not work.
I was looking at changes within a function rather than have new functions defined.