ShmemReference Derived Type

type, public, extends(AbstractDataReference) :: ShmemReference


Inherits

type~~shmemreference~~InheritsGraph type~shmemreference ShmemReference type~abstractdatareference AbstractDataReference type~shmemreference->type~abstractdatareference c_ptr c_ptr type~abstractdatareference->c_ptr base_address

Inherited by

type~~shmemreference~~InheritedByGraph type~shmemreference ShmemReference type~pair~8 pair type~pair~8->type~shmemreference value type~tvector~8 tVector type~tvector~8->type~pair~8 elements type~set2~9 set2 type~set2~9->type~tvector~8 items type~integershmemreferencemap IntegerShmemReferenceMap type~integershmemreferencemap->type~set2~9 tree type~s_iterator~9 s_iterator type~s_iterator~9->type~set2~9 reference

Components

Type Visibility Attributes Name Initial
integer(kind=INT64), public :: msize_word
integer, public :: InNode_Comm
integer, public, allocatable :: shape(:)
integer, public :: type_kind
integer, public :: win
logical, public :: shmem_allocated = .false.
type(c_ptr), public :: base_address = C_NULL_PTR

Constructor

public interface ShmemReference

  • private function new_ShmemReference(type_kind, msize_word, InNode_Comm, rc) result(reference)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: type_kind
    integer(kind=INT64), intent(in) :: msize_word
    integer, intent(in) :: InNode_Comm
    integer, intent(out), optional :: rc

    Return Value type(ShmemReference)


Type-Bound Procedures

procedure, public :: allocate

  • private subroutine allocate(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ShmemReference), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: convert_addr

  • private function convert_addr(this) result(long)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractDataReference), intent(in), target :: this

    Return Value integer(kind=INT64)

procedure, public :: copy_data_to

  • private subroutine copy_data_to(this, to, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractDataReference), intent(in) :: this
    class(AbstractDataReference), intent(inout) :: to
    integer, intent(out), optional :: rc

procedure, public :: deallocate

  • private subroutine deallocate(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ShmemReference), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: deserialize

  • private subroutine deserialize(this, buffer, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ShmemReference), intent(inout) :: this
    integer, intent(in) :: buffer(:)
    integer, intent(out), optional :: rc

procedure, public :: deserialize_base

  • private subroutine deserialize_base(this, buffer, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractDataReference), intent(inout) :: this
    integer, intent(in) :: buffer(:)
    integer, intent(out), optional :: rc

procedure, public :: equal

procedure, public :: fence

  • private subroutine fence(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ShmemReference), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: fetch_data

  • private subroutine fetch_data(this, offset_address, global_shape, offset_start, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractDataReference), intent(in), target :: this
    type(c_ptr), intent(in) :: offset_address
    integer, intent(in) :: global_shape(:)
    integer, intent(in), optional :: offset_start(:)
    integer, intent(out), optional :: rc

procedure, public :: get_length

  • private function get_length(this) result(length)

    Arguments

    Type IntentOptional Attributes Name
    class(ShmemReference), intent(in) :: this

    Return Value integer

procedure, public :: get_length_base

  • private function get_length_base(this) result(length)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractDataReference), intent(in) :: this

    Return Value integer

generic, public :: operator(==) => equal

procedure, public :: serialize

  • private subroutine serialize(this, buffer, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(ShmemReference), intent(in) :: this
    integer, allocatable :: buffer(:)
    integer, intent(out), optional :: rc

procedure, public :: serialize_base

  • private subroutine serialize_base(this, buffer, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractDataReference), intent(in) :: this
    integer, allocatable :: buffer(:)
    integer, intent(out), optional :: rc

Source Code

   type,extends(AbstractDataReference) :: ShmemReference
      integer :: win         ! used for shared memory
      integer :: InNode_Comm !
      integer(kind=INT64) :: msize_word
      logical :: shmem_allocated = .false.
   contains
      procedure :: get_length
      procedure :: serialize
      procedure :: deserialize
      procedure :: allocate
      procedure :: deallocate
      procedure :: fence
   end type ShmemReference