Skip to content

Commit

Permalink
fix: Replace all remaining c_intmax_t references to c_int64_t
Browse files Browse the repository at this point in the history
Also replace `intmax_t` to `int64_t` in the C code
  • Loading branch information
ktras committed Dec 17, 2024
1 parent 5bbe1df commit f8e6dd4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/caffeine/caffeine.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ size_t caf_elem_len(CFI_cdesc_t* a_desc)
return a_desc->elem_len;
}

void caf_form_team(gex_TM_t current_team, gex_TM_t* new_team, intmax_t team_number, int new_index)
void caf_form_team(gex_TM_t current_team, gex_TM_t* new_team, int64_t team_number, int new_index)
{
gex_TM_Split(new_team, current_team, team_number, new_index, NULL, 0, GEX_FLAG_TM_NO_SCRATCH);
}
Expand Down
6 changes: 3 additions & 3 deletions src/caffeine/prif_private_s.f90
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ pure function caf_elem_len(a) result(a_elem_len) bind(C)
end function

subroutine caf_form_team(current_team, new_team, team_number, new_index) bind(C)
!! void caf_form_team(gex_TM_t* current_team, gex_TM_t* new_team, intmax_t team_number, int new_index);
import c_ptr, c_int, c_intmax_t
!! void caf_form_team(gex_TM_t* current_team, gex_TM_t* new_team, int64_t team_number, int new_index);
import c_ptr, c_int, c_int64_t
type(c_ptr), intent(in), value :: current_team
type(c_ptr), intent(out) :: new_team
integer(c_intmax_t), intent(in), value :: team_number
integer(c_int64_t), intent(in), value :: team_number
integer(c_int), intent(in), value :: new_index
end subroutine

Expand Down
10 changes: 5 additions & 5 deletions src/prif.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

module prif

use iso_c_binding, only: c_int, c_bool, c_intptr_t, c_intmax_t, c_ptr, c_funptr, c_size_t, c_ptrdiff_t, c_null_ptr, c_int64_t
use iso_c_binding, only: c_int, c_bool, c_intptr_t, c_ptr, c_funptr, c_size_t, c_ptrdiff_t, c_null_ptr, c_int64_t

implicit none

Expand Down Expand Up @@ -761,7 +761,7 @@ module subroutine prif_event_post_indirect(image_num, event_var_ptr, stat, errms
module subroutine prif_event_wait(event_var_ptr, until_count, stat, errmsg, errmsg_alloc)
implicit none
type(c_ptr), intent(in) :: event_var_ptr
integer(c_intmax_t), intent(in), optional :: until_count
integer(c_int64_t), intent(in), optional :: until_count
integer(c_int), intent(out), optional :: stat
character(len=*), intent(inout), optional :: errmsg
character(len=:), intent(inout), allocatable, optional :: errmsg_alloc
Expand All @@ -770,14 +770,14 @@ module subroutine prif_event_wait(event_var_ptr, until_count, stat, errmsg, errm
module subroutine prif_event_query(event_var_ptr, count, stat)
implicit none
type(c_ptr), intent(in) :: event_var_ptr
integer(c_intmax_t), intent(out) :: count
integer(c_int64_t), intent(out) :: count
integer(c_int), intent(out), optional :: stat
end subroutine

module subroutine prif_notify_wait(notify_var_ptr, until_count, stat, errmsg, errmsg_alloc)
implicit none
type(c_ptr), intent(in) :: notify_var_ptr
integer(c_intmax_t), intent(in), optional :: until_count
integer(c_int64_t), intent(in), optional :: until_count
integer(c_int), intent(out), optional :: stat
character(len=*), intent(inout), optional :: errmsg
character(len=:), intent(inout), allocatable, optional :: errmsg_alloc
Expand Down Expand Up @@ -1048,7 +1048,7 @@ module subroutine prif_atomic_ref_logical_indirect(image_num, atom_remote_ptr, v
integer(c_size_t) :: coarray_size
type(c_funptr) :: final_func
type(c_ptr) :: previous_handle = c_null_ptr, next_handle = c_null_ptr
integer(c_intmax_t) :: lcobounds(15), ucobounds(15)
integer(c_int64_t) :: lcobounds(15), ucobounds(15)
end type

type, private :: team_data
Expand Down

0 comments on commit f8e6dd4

Please sign in to comment.