Skip to content

Commit

Permalink
fix: Update name of type handle_data to prif_coarray_descriptor
Browse files Browse the repository at this point in the history
Update type name to match PRIF v0.5.
  • Loading branch information
ktras committed Dec 17, 2024
1 parent 7c52020 commit 5299990
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/caffeine/allocation_s.f90
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
integer :: me
type(c_ptr) :: whole_block
integer(c_ptrdiff_t) :: block_offset
integer(c_size_t) :: handle_size, total_size
type(handle_data) :: unused
type(handle_data), pointer :: unused2(:)
integer(c_size_t) :: descriptor_size, total_size
type(prif_coarray_descriptor) :: unused
type(prif_coarray_descriptor), pointer :: unused2(:)

me = caf_this_image(current_team%info%gex_team)
if (caf_have_child_teams()) then
Expand All @@ -32,8 +32,8 @@
end if
end if
if (me == 1) then
handle_size = c_sizeof(unused)
total_size = handle_size + size_in_bytes
descriptor_size = c_sizeof(unused)
total_size = descriptor_size + size_in_bytes
whole_block = caf_allocate(current_team%info%heap_mspace, total_size)
block_offset = as_int(whole_block) - current_team%info%heap_start
else
Expand Down Expand Up @@ -149,7 +149,7 @@ subroutine add_to_team_list(coarray_handle)
subroutine remove_from_team_list(coarray_handle)
type(prif_coarray_handle), intent(in) :: coarray_handle

type(handle_data), pointer :: tmp_data
type(prif_coarray_descriptor), pointer :: tmp_data

if (&
.not.c_associated(coarray_handle%info%previous_handle) &
Expand Down
2 changes: 1 addition & 1 deletion src/caffeine/teams_s.f90
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
module procedure prif_end_team
type(prif_coarray_handle), allocatable :: teams_coarrays(:)
integer :: num_coarrays_in_team, i
type(handle_data), pointer :: tmp_data
type(prif_coarray_descriptor), pointer :: tmp_data

! deallocate the teams coarrays
! Currently we work to batch together all the deallocations into a single call
Expand Down
6 changes: 3 additions & 3 deletions src/prif.F90
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ module prif

type, public :: prif_coarray_handle
private
type(handle_data), pointer :: info
type(prif_coarray_descriptor), pointer :: info
end type

type, public :: prif_team_type
Expand Down Expand Up @@ -1019,7 +1019,7 @@ module subroutine prif_atomic_ref_logical_indirect(image_num, atom_remote_ptr, v

! Type definitions only relevant to Caffeine internals

type, private, bind(C) :: handle_data
type, private, bind(C) :: prif_coarray_descriptor
private
type(c_ptr) :: coarray_data
integer(c_int) :: corank
Expand All @@ -1035,7 +1035,7 @@ module subroutine prif_atomic_ref_logical_indirect(image_num, atom_remote_ptr, v
integer(c_intptr_t) :: heap_start
integer(c_size_t) :: heap_size
type(team_data), pointer :: parent_team => null()
type(handle_data), pointer :: coarrays => null()
type(prif_coarray_descriptor), pointer :: coarrays => null()
type(child_team_info), pointer :: child_heap_info => null()
end type

Expand Down

0 comments on commit 5299990

Please sign in to comment.