We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
These should basically just be a thin wrapper around integer atomics, ie:
type, public :: prif_event_type private integer(PRIF_ATOMIC_INT_KIND) :: value = 0 end type ! Everything below is UNTESTED PSEUDOCODE module procedure prif_event_post(image_num, coarray_handle, offset, stat, errmsg, errmsg_alloc) call prif_sync_memory(stat, errmsg, errmsg_alloc) if (present(stat) && stat) return call prif_atomic_add(image_num, coarray_handle, offset, 1, stat) if (present(stat) && stat) ... ! set errmsg(_alloc) if present end procedure module procedure prif_event_post_indirect(image_num, event_var_ptr, stat, errmsg, errmsg_alloc) ! same as above, but using prif_atomic_add_indirect end procedure module procedure prif_event_query(event_var_ptr, count, stat) integer(PRIF_ATOMIC_INT_KIND) :: temp call prif_atomic_ref_int_indirect(this_image_world, event_var_ptr, temp, stat) if (!(present(stat) && stat)) count = temp end procedure module procedure prif_event_wait(event_var_ptr, until_count, stat, errmsg, errmsg_alloc) integer(PRIF_ATOMIC_INT_KIND) :: until_int if (present(until_count)) until_int = max(until_count,1) else until_int = 1 do integer(PRIF_ATOMIC_INT_KIND) :: temp call prif_atomic_ref_int_indirect(this_image_world, event_var_ptr, temp, stat) if (present(stat) && stat) { ! set errmsg(_alloc) if present return } if (temp >= until_int) exit end do call prif_atomic_add_indirect(this_image_world, event_var_ptr, -until_int, stat) if (present(stat) && stat) { ! set errmsg(_alloc) if present return } call prif_sync_memory(stat, errmsg, errmsg_alloc) end procedure
Where the atomic operations are themselves just thin wrappers around GASNet-EX atomics.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
These should basically just be a thin wrapper around integer atomics, ie:
Where the atomic operations are themselves just thin wrappers around GASNet-EX atomics.
The text was updated successfully, but these errors were encountered: