2007-07-09 21:03:13 +00:00
|
|
|
/*
|
2008-12-17 22:14:45 +00:00
|
|
|
* Copyright (c) 2004-2008 The University of Tennessee and The University
|
2007-07-09 21:03:13 +00:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2008-01-18 19:28:50 +00:00
|
|
|
#include "btl_elan.h"
|
2007-07-09 21:03:13 +00:00
|
|
|
|
|
|
|
static void mca_btl_elan_frag_common_constructor(mca_btl_elan_frag_t* frag)
|
|
|
|
{
|
2008-01-18 19:28:50 +00:00
|
|
|
frag->base.des_src = NULL;
|
2007-07-09 21:03:13 +00:00
|
|
|
frag->base.des_src_cnt = 0;
|
2008-01-18 19:28:50 +00:00
|
|
|
frag->base.des_dst = NULL;
|
2007-07-09 21:03:13 +00:00
|
|
|
frag->base.des_dst_cnt = 0;
|
2008-01-18 19:28:50 +00:00
|
|
|
frag->elan_event = NULL;
|
|
|
|
frag->base.des_dst = &(frag->segment);
|
|
|
|
frag->base.des_dst_cnt = 1;
|
2007-07-09 21:03:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void mca_btl_elan_frag_eager_constructor(mca_btl_elan_frag_t* frag)
|
|
|
|
{
|
2008-12-17 22:14:45 +00:00
|
|
|
frag->size = mca_btl_elan_module.super.btl_eager_limit;
|
|
|
|
frag->my_list = &mca_btl_elan_component.elan_frag_eager;
|
2007-07-09 21:03:13 +00:00
|
|
|
mca_btl_elan_frag_common_constructor(frag);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void mca_btl_elan_frag_max_constructor(mca_btl_elan_frag_t* frag)
|
|
|
|
{
|
2008-12-17 22:14:45 +00:00
|
|
|
frag->size = mca_btl_elan_module.super.btl_max_send_size;
|
|
|
|
frag->my_list = &mca_btl_elan_component.elan_frag_max;
|
2007-07-09 21:03:13 +00:00
|
|
|
mca_btl_elan_frag_common_constructor(frag);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void mca_btl_elan_frag_user_constructor(mca_btl_elan_frag_t* frag)
|
|
|
|
{
|
2008-12-17 22:14:45 +00:00
|
|
|
frag->size = 0;
|
|
|
|
frag->my_list = &mca_btl_elan_component.elan_frag_user;
|
2007-07-09 21:03:13 +00:00
|
|
|
mca_btl_elan_frag_common_constructor(frag);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-01-15 05:32:53 +00:00
|
|
|
OBJ_CLASS_INSTANCE( mca_btl_elan_frag_t,
|
|
|
|
mca_btl_base_descriptor_t,
|
|
|
|
NULL,
|
|
|
|
NULL );
|
2007-07-09 21:03:13 +00:00
|
|
|
|
2008-01-15 05:32:53 +00:00
|
|
|
OBJ_CLASS_INSTANCE( mca_btl_elan_frag_eager_t,
|
|
|
|
mca_btl_base_descriptor_t,
|
|
|
|
mca_btl_elan_frag_eager_constructor,
|
|
|
|
NULL );
|
2007-07-09 21:03:13 +00:00
|
|
|
|
2008-01-15 05:32:53 +00:00
|
|
|
OBJ_CLASS_INSTANCE( mca_btl_elan_frag_max_t,
|
|
|
|
mca_btl_base_descriptor_t,
|
|
|
|
mca_btl_elan_frag_max_constructor,
|
|
|
|
NULL );
|
2007-07-09 21:03:13 +00:00
|
|
|
|
2008-01-15 05:32:53 +00:00
|
|
|
OBJ_CLASS_INSTANCE( mca_btl_elan_frag_user_t,
|
|
|
|
mca_btl_base_descriptor_t,
|
|
|
|
mca_btl_elan_frag_user_constructor,
|
|
|
|
NULL );
|