@@ -564,18 +564,16 @@ class MatrixTests : public TestBase
564
564
* Precondition: W is square
565
565
*/
566
566
int matrixTransAddToSymDenseMatrixUpperTriangle (
567
- hiop::hiopMatrixDense& _W ,
567
+ hiop::hiopMatrixDense& W ,
568
568
hiop::hiopMatrixDense& A,
569
569
const int rank=0 )
570
570
{
571
- // This method only takes hiopMatrixDense
572
- auto W = dynamic_cast <hiop::hiopMatrixDense*>(&_W);
573
- const local_ordinal_type N_loc = getNumLocCols (W);
571
+ const local_ordinal_type N_loc = getNumLocCols (&W);
574
572
const local_ordinal_type A_M = getNumLocRows (&A);
575
573
const local_ordinal_type A_N_loc = getNumLocCols (&A);
576
- assert (W-> m () == W-> n ());
577
- assert (getNumLocRows (W) >= getNumLocRows (&A));
578
- assert (W-> n () >= A.n ());
574
+ assert (W. m () == W. n ());
575
+ assert (getNumLocRows (& W) >= getNumLocRows (&A));
576
+ assert (W. n () >= A.n ());
579
577
580
578
const local_ordinal_type start_idx_row = 0 ;
581
579
const local_ordinal_type start_idx_col = N_loc - A_M;
@@ -584,9 +582,9 @@ class MatrixTests : public TestBase
584
582
W_val = one;
585
583
586
584
A.setToConstant (A_val);
587
- W-> setToConstant (W_val);
588
- A.transAddToSymDenseMatrixUpperTriangle (start_idx_row, start_idx_col, alpha, * W);
589
- const int fail = verifyAnswer (W,
585
+ W. setToConstant (W_val);
586
+ A.transAddToSymDenseMatrixUpperTriangle (start_idx_row, start_idx_col, alpha, W);
587
+ const int fail = verifyAnswer (& W,
590
588
[=] (local_ordinal_type i, local_ordinal_type j) -> real_type
591
589
{
592
590
const bool isTransUpperTriangle = (
0 commit comments