Skip to content

Commit

Permalink
Make comm parameters intent in
Browse files Browse the repository at this point in the history
  • Loading branch information
william-dawson committed Nov 15, 2023
1 parent 58be504 commit 2036cc8
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions Source/Fortran/MatrixReduceModule.F90
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ MODULE MatrixReduceModule
SUBROUTINE ReduceAndComposeMatrixSizes_lsr(matrix, comm, gathered_matrix, &
& helper)
!> The matrix to send.
TYPE(Matrix_lsr), INTENT(IN) :: matrix
TYPE(Matrix_lsr), INTENT(IN) :: matrix
!> The communicator to send along.
INTEGER, INTENT(INOUT) :: comm
INTEGER, INTENT(IN) :: comm
!> The matrix we are gathering.
TYPE(Matrix_lsr), INTENT(INOUT) :: gathered_matrix
!> The helper associated with this gather.
Expand All @@ -107,9 +107,9 @@ END SUBROUTINE ReduceAndComposeMatrixSizes_lsr
SUBROUTINE ReduceAndComposeMatrixSizes_lsc(matrix, comm, gathered_matrix, &
& helper)
!! The matrix to send.
TYPE(Matrix_lsc), INTENT(IN) :: matrix
TYPE(Matrix_lsc), INTENT(IN) :: matrix
!! The communicator to send along.
INTEGER, INTENT(INOUT) :: comm
INTEGER, INTENT(IN) :: comm
!> The matrix we are gathering.
TYPE(Matrix_lsc), INTENT(INOUT) :: gathered_matrix
!! The helper associated with this gather.
Expand All @@ -126,11 +126,11 @@ END SUBROUTINE ReduceAndComposeMatrixSizes_lsc
SUBROUTINE ReduceAndComposeMatrixData_lsr(matrix, comm, gathered_matrix, &
& helper)
!> The matrix to send.
TYPE(Matrix_lsr), INTENT(IN) :: matrix
TYPE(Matrix_lsr), INTENT(IN) :: matrix
!> The communicator to send along.
INTEGER, INTENT(INOUT) :: comm
INTEGER, INTENT(IN) :: comm
!> The matrix we are gathering.
TYPE(Matrix_lsr), INTENT(INOUT) :: gathered_matrix
TYPE(Matrix_lsr), INTENT(INOUT) :: gathered_matrix
!> The helper associated with this gather.
TYPE(ReduceHelper_t), INTENT(INOUT) :: helper
#ifdef NOIALLGATHER
Expand All @@ -157,11 +157,11 @@ END SUBROUTINE ReduceAndComposeMatrixData_lsr
SUBROUTINE ReduceAndComposeMatrixData_lsc(matrix, comm, gathered_matrix, &
& helper)
!> The matrix to send.
TYPE(Matrix_lsc), INTENT(IN) :: matrix
TYPE(Matrix_lsc), INTENT(IN) :: matrix
!> The communicator to send along.
INTEGER, INTENT(INOUT) :: comm
INTEGER, INTENT(IN) :: comm
!> The matrix we are gathering.
TYPE(Matrix_lsc), INTENT(INOUT) :: gathered_matrix
TYPE(Matrix_lsc), INTENT(INOUT) :: gathered_matrix
!> The helper associated with this gather.
TYPE(ReduceHelper_t), INTENT(INOUT) :: helper
#ifdef NOIALLGATHER
Expand Down Expand Up @@ -256,9 +256,9 @@ END SUBROUTINE ReduceAndComposeMatrixCleanup_lsc
!> lose the opportunity for overlapping communication.
SUBROUTINE ReduceAndComposeMatrix_lsr(matrix, comm, gathered_matrix)
!> The matrix to send.
TYPE(Matrix_lsr), INTENT(IN) :: matrix
TYPE(Matrix_lsr), INTENT(IN) :: matrix
!> The communicator to send along.
INTEGER, INTENT(INOUT) :: comm
INTEGER, INTENT(IN) :: comm
!> The matrix we are gathering.
TYPE(Matrix_lsr), INTENT(INOUT) :: gathered_matrix
!! Local Variables
Expand All @@ -272,9 +272,9 @@ END SUBROUTINE ReduceAndComposeMatrix_lsr
!> lose the opportunity for overlapping communication.
SUBROUTINE ReduceAndComposeMatrix_lsc(matrix, comm, gathered_matrix)
!> The matrix to send.
TYPE(Matrix_lsc), INTENT(IN) :: matrix
TYPE(Matrix_lsc), INTENT(IN) :: matrix
!> The communicator to send along.
INTEGER, INTENT(INOUT) :: comm
INTEGER, INTENT(IN) :: comm
!> The matrix we are gathering.
TYPE(Matrix_lsc), INTENT(INOUT) :: gathered_matrix
!! Local Variables
Expand All @@ -287,11 +287,11 @@ END SUBROUTINE ReduceAndComposeMatrix_lsc
!> The first routine to call, gathers the sizes of the data to be sent.
SUBROUTINE ReduceAndSumMatrixSizes_lsr(matrix, comm, gathered_matrix, helper)
!> The matrix to send.
TYPE(Matrix_lsr), INTENT(IN) :: matrix
TYPE(Matrix_lsr), INTENT(IN) :: matrix
!> The communicator to send along.
INTEGER, INTENT(INOUT) :: comm
INTEGER, INTENT(IN) :: comm
!> The matrix we are gathering.
TYPE(Matrix_lsr), INTENT(INOUT) :: gathered_matrix
TYPE(Matrix_lsr), INTENT(INOUT) :: gathered_matrix
!> The helper associated with this gather.
TYPE(ReduceHelper_t), INTENT(INOUT) :: helper
#ifdef NOIALLGATHER
Expand All @@ -304,9 +304,9 @@ END SUBROUTINE ReduceAndSumMatrixSizes_lsr
!> The first routine to call, gathers the sizes of the data to be sent.
SUBROUTINE ReduceAndSumMatrixSizes_lsc(matrix, comm, gathered_matrix, helper)
!> The matrix to send.
TYPE(Matrix_lsc), INTENT(IN) :: matrix
TYPE(Matrix_lsc), INTENT(IN) :: matrix
!> The communicator to send along.
INTEGER, INTENT(INOUT) :: comm
INTEGER, INTENT(IN) :: comm
!> The matrix we are gathering.
TYPE(Matrix_lsc), INTENT(INOUT) :: gathered_matrix
!> The helper associated with this gather.
Expand All @@ -321,9 +321,9 @@ END SUBROUTINE ReduceAndSumMatrixSizes_lsc
!> Second routine to call for gathering and summing up the data.
SUBROUTINE ReduceAndSumMatrixData_lsr(matrix, comm, gathered_matrix, helper)
!> The matrix to send.
TYPE(Matrix_lsr), INTENT(IN) :: matrix
TYPE(Matrix_lsr), INTENT(IN) :: matrix
!> The communicator to send along.
INTEGER, INTENT(INOUT) :: comm
INTEGER, INTENT(IN) :: comm
!> The matrix we are gathering.
TYPE(Matrix_lsr), INTENT(INOUT) :: gathered_matrix
!> The helper associated with this gather.
Expand All @@ -350,9 +350,9 @@ END SUBROUTINE ReduceAndSumMatrixData_lsr
!> Second routine to call for gathering and summing up the data.
SUBROUTINE ReduceAndSumMatrixData_lsc(matrix, comm, gathered_matrix, helper)
!> The matrix to send.
TYPE(Matrix_lsc), INTENT(IN) :: matrix
TYPE(Matrix_lsc), INTENT(IN) :: matrix
!> The communicator to send along.
INTEGER, INTENT(INOUT) :: comm
INTEGER, INTENT(INOUT) :: comm
!> The matrix we are gathering.
TYPE(Matrix_lsc), INTENT(INOUT) :: gathered_matrix
!> The helper associated with this gather.
Expand Down Expand Up @@ -455,9 +455,9 @@ END SUBROUTINE ReduceAndSumMatrixCleanup_lsc
!> lose the opportunity for overlapping communication.
SUBROUTINE ReduceAndSumMatrix_lsr(matrix, comm, gathered_matrix, threshold)
!> The matrix to send.
TYPE(Matrix_lsr), INTENT(IN) :: matrix
TYPE(Matrix_lsr), INTENT(IN) :: matrix
!> The communicator to send along.
INTEGER, INTENT(INOUT) :: comm
INTEGER, INTENT(IN) :: comm
!> The gathered_matrix the matrix being gathered.
TYPE(Matrix_lsr), INTENT(INOUT) :: gathered_matrix
!> The threshold the threshold for flushing values.
Expand All @@ -472,9 +472,9 @@ END SUBROUTINE ReduceAndSumMatrix_lsr
!> lose the opportunity for overlapping communication.
SUBROUTINE ReduceAndSumMatrix_lsc(matrix, comm, gathered_matrix, threshold)
!> The matrix to send.
TYPE(Matrix_lsc), INTENT(IN) :: matrix
TYPE(Matrix_lsc), INTENT(IN) :: matrix
!> The communicator to send along.
INTEGER, INTENT(INOUT) :: comm
INTEGER, INTENT(INOUT) :: comm
!> The threshold the threshold for flushing values.
TYPE(Matrix_lsc), INTENT(INOUT) :: gathered_matrix
!> The threshold the threshold for flushing values.
Expand Down

0 comments on commit 2036cc8

Please sign in to comment.