Whether this part owns a one-dimensional unit of work
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(work_partition), | intent(in), | optional | :: | partition |
Work partition, absent selects the complete work |
|
| integer, | intent(in) | :: | idx |
One-based index of the unit of work |
Whether this part owns the unit of work
elemental function owns_index(partition, idx) result(owned) !> Work partition, absent selects the complete work type(work_partition), intent(in), optional :: partition !> One-based index of the unit of work integer, intent(in) :: idx !> Whether this part owns the unit of work logical :: owned owned = .true. if (.not.present(partition)) return owned = partition%nparts == 1 .or. & & modulo(idx - 1, partition%nparts) == partition%part end function owns_index