1
/* begin_generated_IBM_copyright_prolog */
3
/* ---------------------------------------------------------------- */
4
/* (C)Copyright IBM Corp. 2007, 2008 */
6
/* ---------------------------------------------------------------- */
8
/* end_generated_IBM_copyright_prolog */
10
* \file armci/src/x/dcmf/armcix_impl.h
11
* \brief DCMF ARMCI Extension implementation interface.
13
#ifndef __armci_src_x_armcix_impl_h
14
#define __armci_src_x_armcix_impl_h
29
#define BLOCKING_OPERATIONS_REQUIRE_FENCE
30
#warning remove the previous #define if blocking put/acc operations do not require a fence
32
typedef struct ARMCIX_DCMF_Connection_t
34
DCMF_Request_t request; /**< \todo lazy allocate the request object? */
35
unsigned active; /**< Number of active messages to this peer */
36
unsigned peer; /**< Maximum system size = 2^32 */
51
DCMF_Memregion_t local_mem_region;
52
DCMF_Memregion_t remote_mem_region;
54
ARMCIX_DCMF_Connection_t __attribute__ ((__aligned__ (16)));
56
typedef struct ARMCIX_DCMF_Request_t
58
DCMF_Request_t request;
60
} ARMCIX_DCMF_Request_t __attribute__ ((__aligned__ (16)));
63
typedef struct armcix_dcmf_opaque_t
65
ARMCIX_DCMF_Connection_t * connection;
71
static inline void armcix_dcmf_compile_time_assert ()
73
COMPILE_TIME_ASSERT(sizeof(armcix_dcmf_opaque_t)<=sizeof(armcix_opaque_t));
76
extern ARMCIX_DCMF_Connection_t __global_connection;
77
extern ARMCIX_DCMF_Connection_t * __connection;
79
static inline size_t armcix_dcmf_va_to_offset (DCMF_Memregion_t * mr, void * va)
83
DCMF_Memregion_query (mr, &bytes, &base);
84
return ((size_t)va) - ((size_t)base);
90
* \brief Generic decrement callback
92
* \param[in] clientdata The variable to decrement
94
void ARMCIX_DCMF_cb_decrement (void * clientdata);
97
* \brief Callback function for non-blocking operations
99
* \param[in] clientdata The non-blocking handle to complete
101
void ARMCIX_DCMF_NbOp_cb_done (void * clientdata);
104
* \brief Allocate a request from the free request pool
106
* Attempt to increase the size of the request pool if a free request is not
107
* available. Otherwise, if the maximum request pool size has been reached,
108
* block until a request completes and becomes available.
110
* \param[in] cb_free Callback to invoke with the request is free'd
112
* \return A free request
114
* \see ARMCIX_DCMF_request_free
116
ARMCIX_DCMF_Request_t * ARMCIX_DCMF_request_allocate (DCMF_Callback_t cb_free);
119
* \brief Release a request into the free request pool
121
* The callback associated with the request is invoked before the
122
* request is released.
124
* \see ARMCIX_DCMF_request_allocate
126
void ARMCIX_DCMF_request_free (ARMCIX_DCMF_Request_t * request);
130
* \brief Register the DCMF ARMCI Extention get operation.
132
* \see DCMF_Get_register
134
void ARMCIX_DCMF_Get_register ();
137
* \brief Register the DCMF ARMCI Extention put operation.
139
* \param[in] connection_array Connection array
141
* \see DCMF_Send_register
143
void ARMCIX_DCMF_Put_register (ARMCIX_DCMF_Connection_t * connection_array);
146
* \brief Register the DCMF ARMCI Extention accumulate operation.
148
* \param[in] connection_array Connection array
150
* \see DCMF_Send_register
152
void ARMCIX_DCMF_Acc_register (ARMCIX_DCMF_Connection_t * connection_array);
155
* \brief Register the DCMF ARMCI Extention fence operation.
157
* \param[in] connection_array Connection array
159
* \see DCMF_Control_register
161
void ARMCIX_DCMF_Fence_register (ARMCIX_DCMF_Connection_t * connection_array);
165
* \brief Register the DCMF ARMCI Extention rmw operation.
167
* \see DCMF_Control_register
168
* \see DCMF_Send_register
170
void ARMCIX_DCMF_Rmw_register ();