root/opal/mca/btl/portals4/btl_portals4_frag.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. mca_btl_portals4_frag_common_send_constructor
  2. mca_btl_portals4_frag_eager_constructor
  3. mca_btl_portals4_frag_eager_destructor
  4. mca_btl_portals4_frag_max_constructor
  5. mca_btl_portals4_frag_user_constructor

   1 /*
   2  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
   3  *                         University Research and Technology
   4  *                         Corporation.  All rights reserved.
   5  * Copyright (c) 2004-2005 The University of Tennessee and The University
   6  *                         of Tennessee Research Foundation.  All rights
   7  *                         reserved.
   8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
   9  *                         University of Stuttgart.  All rights reserved.
  10  * Copyright (c) 2004-2005 The Regents of the University of California.
  11  *                         All rights reserved.
  12  * Copyright (c) 2008      UT-Battelle, LLC. All rights reserved.
  13  * Copyright (c) 2014      Bull SAS.  All rights reserved.
  14  * $COPYRIGHT$
  15  *
  16  * Additional copyrights may follow
  17  *
  18  * $HEADER$
  19  */
  20 
  21 #include "opal_config.h"
  22 
  23 #include "btl_portals4.h"
  24 #include "btl_portals4_frag.h"
  25 
  26 static void
  27 mca_btl_portals4_frag_common_send_constructor(mca_btl_portals4_frag_t* frag)
  28 {
  29     frag->base.des_flags = 0;
  30     frag->base.des_segments = &frag->segments[0].base;
  31     frag->base.des_segment_count = 2;
  32 
  33     frag->segments[0].base.seg_addr.pval = frag + 1;
  34     frag->segments[0].base.seg_len = frag->size;
  35     frag->segments[0].key = 0;
  36 
  37     frag->me_h = PTL_INVALID_HANDLE;
  38 }
  39 
  40 static void
  41 mca_btl_portals4_frag_eager_constructor(mca_btl_portals4_frag_t* frag)
  42 {
  43     frag->size = mca_btl_portals4_module.super.btl_eager_limit;
  44     mca_btl_portals4_frag_common_send_constructor(frag);
  45     frag->type = BTL_PORTALS4_FRAG_TYPE_EAGER;
  46 }
  47 
  48 static void
  49 mca_btl_portals4_frag_eager_destructor(mca_btl_portals4_frag_t* frag)
  50 {
  51     if (PTL_INVALID_HANDLE != frag->me_h) {
  52         PtlMEUnlink(frag->me_h);
  53         frag->me_h = PTL_INVALID_HANDLE;
  54     }
  55 }
  56 
  57 static void
  58 mca_btl_portals4_frag_max_constructor(mca_btl_portals4_frag_t* frag)
  59 {
  60     frag->size = mca_btl_portals4_module.super.btl_max_send_size;
  61     mca_btl_portals4_frag_common_send_constructor(frag);
  62     frag->type = BTL_PORTALS4_FRAG_TYPE_MAX;
  63 }
  64 
  65 static void
  66 mca_btl_portals4_frag_user_constructor(mca_btl_portals4_frag_t* frag)
  67 {
  68     frag->base.des_flags = 0;
  69     frag->size = 0;
  70     frag->type = BTL_PORTALS4_FRAG_TYPE_USER;
  71 }
  72 
  73 OBJ_CLASS_INSTANCE(
  74     mca_btl_portals4_frag_t,
  75     mca_btl_base_descriptor_t,
  76     NULL,
  77     NULL);
  78 
  79 OBJ_CLASS_INSTANCE(
  80     mca_btl_portals4_frag_eager_t,
  81     mca_btl_base_descriptor_t,
  82     mca_btl_portals4_frag_eager_constructor,
  83     mca_btl_portals4_frag_eager_destructor);
  84 
  85 OBJ_CLASS_INSTANCE(
  86     mca_btl_portals4_frag_max_t,
  87     mca_btl_base_descriptor_t,
  88     mca_btl_portals4_frag_max_constructor,
  89     NULL);
  90 
  91 OBJ_CLASS_INSTANCE(
  92     mca_btl_portals4_frag_user_t,
  93     mca_btl_base_descriptor_t,
  94     mca_btl_portals4_frag_user_constructor,
  95     NULL);

/* [<][>][^][v][top][bottom][index][help] */