2011-12-10 01:24:07 +04:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
|
|
|
/*
|
2014-01-22 00:53:35 +04:00
|
|
|
* Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights
|
2011-12-10 01:24:07 +04:00
|
|
|
* reserved.
|
|
|
|
* Copyright (c) 2011 UT-Battelle, LLC. All rights reserved.
|
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "btl_ugni.h"
|
|
|
|
#include "btl_ugni_frag.h"
|
|
|
|
|
2012-06-01 00:02:41 +04:00
|
|
|
static inline void mca_btl_ugni_base_frag_constructor (mca_btl_ugni_base_frag_t *frag)
|
2011-12-10 01:24:07 +04:00
|
|
|
{
|
2012-01-17 23:52:26 +04:00
|
|
|
memset ((char *) frag + sizeof (frag->base), 0, sizeof (*frag) - sizeof (frag->base));
|
2012-06-21 21:09:12 +04:00
|
|
|
frag->segments[0].base.seg_addr.pval = frag->base.super.ptr;
|
2011-12-10 01:24:07 +04:00
|
|
|
}
|
|
|
|
|
2012-02-10 04:47:29 +04:00
|
|
|
static inline void mca_btl_ugni_eager_frag_constructor (mca_btl_ugni_base_frag_t *frag)
|
|
|
|
{
|
|
|
|
struct mca_btl_ugni_reg_t *reg =
|
|
|
|
(struct mca_btl_ugni_reg_t *) frag->base.super.registration;
|
|
|
|
|
2014-01-22 00:53:35 +04:00
|
|
|
mca_btl_ugni_base_frag_constructor (frag);
|
|
|
|
|
2012-06-21 21:09:12 +04:00
|
|
|
frag->segments[0].memory_handle = reg->memory_hdl;
|
2012-02-10 04:47:29 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
OBJ_CLASS_INSTANCE(mca_btl_ugni_smsg_frag_t, mca_btl_base_descriptor_t,
|
2012-06-01 00:02:41 +04:00
|
|
|
mca_btl_ugni_base_frag_constructor, NULL);
|
2011-12-10 01:24:07 +04:00
|
|
|
|
|
|
|
OBJ_CLASS_INSTANCE(mca_btl_ugni_rdma_frag_t, mca_btl_base_descriptor_t,
|
2012-06-01 00:02:41 +04:00
|
|
|
mca_btl_ugni_base_frag_constructor, NULL);
|
2012-02-10 04:47:29 +04:00
|
|
|
|
|
|
|
OBJ_CLASS_INSTANCE(mca_btl_ugni_eager_frag_t, mca_btl_base_descriptor_t,
|
2012-06-01 00:02:41 +04:00
|
|
|
mca_btl_ugni_eager_frag_constructor, NULL);
|
2012-03-16 00:13:32 +04:00
|
|
|
|
|
|
|
void mca_btl_ugni_frag_init (mca_btl_ugni_base_frag_t *frag, mca_btl_ugni_module_t *ugni_module)
|
|
|
|
{
|
2012-05-07 21:22:42 +04:00
|
|
|
frag->msg_id = opal_pointer_array_add (&ugni_module->pending_smsg_frags_bb, (void *) frag);
|
2012-03-16 00:13:32 +04:00
|
|
|
}
|