Skip to content

Commit

Permalink
Update LAPACK TestHelpers for recent changes
Browse files Browse the repository at this point in the history
this.complete() -> init this
needed (?) on some generic formal types

---
Signed-off-by: Michael Ferguson <[email protected]>
  • Loading branch information
mppf committed Sep 13, 2023
1 parent bc7c765 commit bb124f2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/library/packages/LAPACK/TestHelpers.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,20 @@ module TestHelpers {
this.matrix_domain = {1..#rows,1..#columns};
this.epsilon = error;

this.complete();
init this;
this.populateFromArray( input_array, input_row_order );

}

proc init( matrix: borrowed LAPACK_Matrix, type data_type = matrix.data_type ){
proc init( matrix: borrowed LAPACK_Matrix(?), type data_type = matrix.data_type ){
this.data_type = data_type;
this.row_major = matrix.row_major;
this.rows = matrix.rows;
this.columns = matrix.columns;
this.data_domain = matrix.data_domain;
this.matrix_domain = matrix.matrix_domain;

this.complete();
init this;

for idx in data_domain do this.data[idx] = matrix.data[idx];
this.epsilon = matrix.epsilon;
Expand Down Expand Up @@ -190,8 +190,8 @@ module TestHelpers {
}

// Not using type queries to work around issue #13721
operator LAPACK_Matrix.*(A: borrowed LAPACK_Matrix,
B: borrowed LAPACK_Matrix): owned LAPACK_Matrix(A.data_type) {
operator LAPACK_Matrix.*(A: borrowed LAPACK_Matrix(?),
B: borrowed LAPACK_Matrix(?)): owned LAPACK_Matrix(A.data_type) {
if A.data_type != B.data_type then
compilerError("data_type mismatch in *");

Expand All @@ -212,8 +212,8 @@ module TestHelpers {
return retmatrix;
}

operator LAPACK_Matrix.==(A: borrowed LAPACK_Matrix,
B: borrowed LAPACK_Matrix ): bool {
operator LAPACK_Matrix.==(A: borrowed LAPACK_Matrix(?),
B: borrowed LAPACK_Matrix(?) ): bool {
if A.data_type != B.data_type then
compilerError("data_type mismatch in ==");

Expand Down

0 comments on commit bb124f2

Please sign in to comment.