Skip to content

Commit

Permalink
Rename local_buffer and local_buffer_stride args to
Browse files Browse the repository at this point in the history
`current_image_buffer` and `current_image_buffer_stride` to
reflect PRIF v0.3
  • Loading branch information
ktras committed May 22, 2024
1 parent 694a0ca commit 6771ca5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions src/caffeine/coarray_access_s.f90
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- caf_as_int(coarray_handle%info%coarray_data))
call prif_put_raw( &
image_num = image, &
local_buffer = c_loc(value), &
current_image_buffer = c_loc(value), &
remote_ptr = remote_ptr, &
size = size(value) * coarray_handle%info%element_length)
end procedure
Expand All @@ -28,7 +28,7 @@
call caf_put( &
image = image_num, &
dest = remote_ptr, &
src = local_buffer, &
src = current_image_buffer, &
size = size)
end procedure

Expand All @@ -48,15 +48,15 @@
- caf_as_int(coarray_handle%info%coarray_data))
call prif_get_raw( &
image_num = image, &
local_buffer = c_loc(value), &
current_image_buffer = c_loc(value), &
remote_ptr = remote_ptr, &
size = size(value) * coarray_handle%info%element_length)
end procedure

module procedure prif_get_raw
call caf_get( &
image = image_num, &
dest = local_buffer, &
dest = current_image_buffer, &
src = remote_ptr, &
size = size)
end procedure
Expand Down
22 changes: 11 additions & 11 deletions src/prif.f90
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ module subroutine prif_put( &
character(len=:), intent(inout), allocatable, optional :: errmsg_alloc
end subroutine

module subroutine prif_put_raw(image_num, local_buffer, remote_ptr, notify_ptr, size, stat, errmsg, errmsg_alloc)
module subroutine prif_put_raw(image_num, current_image_buffer, remote_ptr, notify_ptr, size, stat, errmsg, errmsg_alloc)
implicit none
integer(c_int), intent(in) :: image_num
type(c_ptr), intent(in) :: local_buffer
type(c_ptr), intent(in) :: current_image_buffer
integer(c_intptr_t), intent(in) :: remote_ptr
integer(c_intptr_t), optional, intent(in) :: notify_ptr
integer(c_size_t), intent(in) :: size
Expand All @@ -192,16 +192,16 @@ module subroutine prif_put_raw(image_num, local_buffer, remote_ptr, notify_ptr,
end subroutine

module subroutine prif_put_raw_strided( &
image_num, local_buffer, remote_ptr, element_size, extent, remote_ptr_stride, &
local_buffer_stride, notify_ptr, stat, errmsg, errmsg_alloc)
image_num, current_image_buffer, remote_ptr, element_size, extent, remote_ptr_stride, &
current_image_buffer_stride, notify_ptr, stat, errmsg, errmsg_alloc)
implicit none
integer(c_int), intent(in) :: image_num
type(c_ptr), intent(in) :: local_buffer
type(c_ptr), intent(in) :: current_image_buffer
integer(c_intptr_t), intent(in) :: remote_ptr
integer(c_size_t), intent(in) :: element_size
integer(c_size_t), intent(in) :: extent(:)
integer(c_ptrdiff_t), intent(in) :: remote_ptr_stride(:)
integer(c_ptrdiff_t), intent(in) :: local_buffer_stride(:)
integer(c_ptrdiff_t), intent(in) :: current_image_buffer_stride(:)
integer(c_intptr_t), optional, intent(in) :: notify_ptr
integer(c_int), intent(out), optional :: stat
character(len=*), intent(inout), optional :: errmsg
Expand All @@ -222,10 +222,10 @@ module subroutine prif_get( &
character(len=:), intent(inout), allocatable, optional :: errmsg_alloc
end subroutine

module subroutine prif_get_raw(image_num, local_buffer, remote_ptr, size, stat, errmsg, errmsg_alloc)
module subroutine prif_get_raw(image_num, current_image_buffer, remote_ptr, size, stat, errmsg, errmsg_alloc)
implicit none
integer(c_int), intent(in) :: image_num
type(c_ptr), intent(in) :: local_buffer
type(c_ptr), intent(in) :: current_image_buffer
integer(c_intptr_t), intent(in) :: remote_ptr
integer(c_size_t), intent(in) :: size
integer(c_int), intent(out), optional :: stat
Expand All @@ -234,16 +234,16 @@ module subroutine prif_get_raw(image_num, local_buffer, remote_ptr, size, stat,
end subroutine

module subroutine prif_get_raw_strided( &
image_num, local_buffer, remote_ptr, element_size, extent, remote_ptr_stride, local_buffer_stride, &
image_num, current_image_buffer, remote_ptr, element_size, extent, remote_ptr_stride, current_image_buffer_stride, &
stat, errmsg, errmsg_alloc)
implicit none
integer(c_int), intent(in) :: image_num
type(c_ptr), intent(in) :: local_buffer
type(c_ptr), intent(in) :: current_image_buffer
integer(c_intptr_t), intent(in) :: remote_ptr
integer(c_size_t), intent(in) :: element_size
integer(c_size_t), intent(in) :: extent(:)
integer(c_ptrdiff_t), intent(in) :: remote_ptr_stride(:)
integer(c_ptrdiff_t), intent(in) :: local_buffer_stride(:)
integer(c_ptrdiff_t), intent(in) :: current_image_buffer_stride(:)
integer(c_int), intent(out), optional :: stat
character(len=*), intent(inout), optional :: errmsg
character(len=:), intent(inout), allocatable, optional :: errmsg_alloc
Expand Down
4 changes: 2 additions & 2 deletions test/caf_rma_test.f90
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function check_put_raw() result(result_)
call prif_base_pointer(coarray_handle, neighbor, base_addr)
call prif_put_raw( &
image_num = neighbor, &
local_buffer = c_loc(me), &
current_image_buffer = c_loc(me), &
remote_ptr = base_addr, &
size = int(storage_size(me)/8, c_size_t))
call prif_sync_all
Expand Down Expand Up @@ -186,7 +186,7 @@ function check_get_raw() result(result_)

call prif_get_raw( &
image_num = neighbor, &
local_buffer = c_loc(retrieved), &
current_image_buffer = c_loc(retrieved), &
remote_ptr = base_addr, &
size = int(storage_size(retrieved)/8, c_size_t))

Expand Down

0 comments on commit 6771ca5

Please sign in to comment.