- Code: Select all
TRANS (input) CHARACTER*1
Specifies the form of the system of equations:
= 'N': A * X = B (No transpose)
= 'T': A'* X = B (Transpose)
= 'C': A'* X = B (Conjugate transpose = Transpose)
The implication of this is that the Transpose and Conjugate transpose cases are the same, and this is what is implemented in the code. Unfortunately this is not the case, as is indicated by the following from the NAG description at
http://www.nag.co.uk/numeric/Fl/manual2 ... f07asf.pdf
- Code: Select all
TRANS – CHARACTER*1 Input
On entry: indicates the form of the equations as follows:
if TRANS == ’N’, AX = B is solved for X;
if TRANS == ’T’, ATX = B is solved for X;
if TRANS == ’C’, AHX = B is solved for X.
Constraint: TRANS == ’N’; ’T’ or ’C’.
I have tested this on MAGMA zgetrs_gpu.cpp from RC4 and it is indeed incorrect.
The T and C cases are very similar and the solution is that, once the N cases has been identified, to modify the code to pass the character from the call directly to the calls to ztrsm.
- Code: Select all
cublasZtrsm(MagmaLeft, MagmaUpper, trans, MagmaNonUnit, n, nrhs, c_one, dA, ldda, dB, lddb );
cublasZtrsm(MagmaLeft, MagmaLower, trans, MagmaUnit, n, nrhs, c_one, dA, ldda, dB, lddb );
I have tested this using an extension of testing_zgetrf_gpu_f.f and testing a small case which I have also solved using LAPACK.
Copies of the codes available on request.
Best wishes
John