2015-02-19 23:41:41 +03:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2005-06-15 23:10:26 +04:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2013-07-04 12:34:37 +04:00
|
|
|
* Copyright (c) 2004-2013 The University of Tennessee and The University
|
2005-11-05 22:57:48 +03:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2015-06-24 06:59:57 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2005-06-15 23:10:26 +04:00
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2015-02-19 23:41:41 +03:00
|
|
|
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
|
|
|
* reserved.
|
2005-06-15 23:10:26 +04:00
|
|
|
* $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2005-06-15 23:10:26 +04:00
|
|
|
* Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2005-06-15 23:10:26 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*/
|
2005-06-30 09:50:55 +04:00
|
|
|
#ifndef MCA_BTL_SELF_SEND_FRAG_H
|
|
|
|
#define MCA_BTL_SELF_SEND_FRAG_H
|
2005-06-15 23:10:26 +04:00
|
|
|
|
|
|
|
#include <sys/types.h>
|
2005-06-30 09:50:55 +04:00
|
|
|
#include "btl_self.h"
|
2005-06-15 23:10:26 +04:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* shared memory send fragment derived type.
|
|
|
|
*/
|
2005-06-30 09:50:55 +04:00
|
|
|
struct mca_btl_self_frag_t {
|
|
|
|
mca_btl_base_descriptor_t base;
|
2016-10-27 19:34:54 +03:00
|
|
|
mca_btl_base_segment_t segments[2];
|
2005-06-30 09:50:55 +04:00
|
|
|
struct mca_btl_base_endpoint_t *endpoint;
|
2016-10-27 19:34:54 +03:00
|
|
|
opal_free_list_t *list;
|
2005-06-15 23:10:26 +04:00
|
|
|
size_t size;
|
2016-10-27 19:34:54 +03:00
|
|
|
unsigned char data[];
|
2005-06-15 23:10:26 +04:00
|
|
|
};
|
2005-06-30 09:50:55 +04:00
|
|
|
typedef struct mca_btl_self_frag_t mca_btl_self_frag_t;
|
|
|
|
typedef struct mca_btl_self_frag_t mca_btl_self_frag_eager_t;
|
|
|
|
typedef struct mca_btl_self_frag_t mca_btl_self_frag_send_t;
|
|
|
|
typedef struct mca_btl_self_frag_t mca_btl_self_frag_rdma_t;
|
2005-06-15 23:10:26 +04:00
|
|
|
|
2005-06-30 09:50:55 +04:00
|
|
|
OBJ_CLASS_DECLARATION(mca_btl_self_frag_eager_t);
|
|
|
|
OBJ_CLASS_DECLARATION(mca_btl_self_frag_send_t);
|
|
|
|
OBJ_CLASS_DECLARATION(mca_btl_self_frag_rdma_t);
|
2005-06-15 23:10:26 +04:00
|
|
|
|
2013-07-04 12:34:37 +04:00
|
|
|
#define MCA_BTL_SELF_FRAG_ALLOC_EAGER(frag) \
|
2016-10-27 19:34:54 +03:00
|
|
|
{ \
|
|
|
|
frag = (mca_btl_self_frag_t *) \
|
|
|
|
opal_free_list_get (&mca_btl_self_component.self_frags_eager); \
|
|
|
|
}
|
2005-06-15 23:10:26 +04:00
|
|
|
|
|
|
|
|
2013-07-04 12:34:37 +04:00
|
|
|
#define MCA_BTL_SELF_FRAG_ALLOC_RDMA(frag) \
|
2016-10-27 19:34:54 +03:00
|
|
|
{ \
|
|
|
|
frag = (mca_btl_self_frag_t *) \
|
|
|
|
opal_free_list_get (&mca_btl_self_component.self_frags_rdma); \
|
|
|
|
}
|
2005-06-15 23:10:26 +04:00
|
|
|
|
2016-10-27 19:34:54 +03:00
|
|
|
#define MCA_BTL_SELF_FRAG_ALLOC_SEND(frag) \
|
|
|
|
{ \
|
|
|
|
frag = (mca_btl_self_frag_t *) \
|
|
|
|
opal_free_list_get (&mca_btl_self_component.self_frags_send); \
|
|
|
|
}
|
2005-06-15 23:10:26 +04:00
|
|
|
|
2016-10-27 19:34:54 +03:00
|
|
|
#define MCA_BTL_SELF_FRAG_RETURN(frag) \
|
|
|
|
{ \
|
|
|
|
opal_free_list_return ((frag)->list, (opal_free_list_item_t*)(frag)); \
|
|
|
|
}
|
2005-06-15 23:10:26 +04:00
|
|
|
|
2016-10-27 19:34:54 +03:00
|
|
|
#endif /* MCA_BTL_SELF_SEND_FRAG_H */
|