Skip to content

Commit

Permalink
Resolve a minor TODO
Browse files Browse the repository at this point in the history
This is a left-over from pull request #171 and #172 that was only
possible to fully resolve now they are both merged.
  • Loading branch information
bonachea committed Jan 17, 2025
1 parent 5bf8267 commit 075b11b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/caffeine/prif_private_s.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
! Copyright (c), The Regents of the University of California
! Terms of use are as specified in LICENSE.txt

#include "assert_macros.h"

submodule(prif) prif_private_s
use assert_m
implicit none
Expand Down Expand Up @@ -246,11 +249,7 @@ subroutine base_pointer(coarray_handle, image_num, ptr)

integer(c_int) :: num_img

! TODO TEAMS: either move the assertion below into `caf_convert_base_addr()`
! (avoiding the need to call prif_num_images here to fetch initial team size)
! or cache the initial team size in a private module variable so we can just access it (issue #62)
call prif_num_images(num_images=num_img)
call assert(image_num > 0 .and. image_num <= num_img, "base_pointer: image_num not within valid range")
call_assert_describe(image_num > 0 .and. image_num <= initial_team%num_images, "base_pointer: image_num not within valid range")
ptr = caf_convert_base_addr(coarray_handle%info%coarray_data, image_num)
end subroutine

Expand Down

0 comments on commit 075b11b

Please sign in to comment.