@@ -28,12 +28,14 @@ BEGIN_C_DECLS
2828 * @ingroup UCP_DEVICE
2929 * @brief Memory descriptor list attributes field mask.
3030 *
31- * The enumeration allows specifying which fields in @ref ucp_mem_list_elem are
32- * present. It is used to enable backward compatibility support.
31+ * The enumeration allows specifying which fields in @ref
32+ * ucp_device_mem_list_elem are present.
33+ *
34+ * It is used to enable backward compatibility support.
3335 */
34- enum ucp_mem_list_elem_field {
35- UCP_MEM_LIST_ELEM_FIELD_MEMH = UCS_BIT (0 ), /**< Source memory handle */
36- UCP_MEM_LIST_ELEM_FIELD_RKEY = UCS_BIT (1 ) /**< Unpacked remote memory key */
36+ enum ucp_device_mem_list_elem_field {
37+ UCP_DEVICE_MEM_LIST_ELEM_FIELD_MEMH = UCS_BIT (0 ), /**< Source memory handle */
38+ UCP_DEVICE_MEM_LIST_ELEM_FIELD_RKEY = UCS_BIT (1 ) /**< Unpacked remote memory key */
3739};
3840
3941
@@ -44,10 +46,10 @@ enum ucp_mem_list_elem_field {
4446 * This describes a pair of local and remote memory for which a memory operation
4547 * can later be performed multiple times, possibly with varying memory offsets.
4648 */
47- typedef struct ucp_mem_list_elem {
49+ typedef struct ucp_device_mem_list_elem {
4850 /**
4951 * Mask of valid fields in this structure, using bits from
50- * @ref ucp_mem_list_elem_field .
52+ * @ref ucp_device_mem_list_elem_field .
5153 * Fields not specified in this mask will be ignored.
5254 * Provides ABI compatibility with respect to adding new fields.
5355 */
@@ -62,17 +64,17 @@ typedef struct ucp_mem_list_elem {
6264 * Unpacked memory key for the remote memory endpoint.
6365 */
6466 ucp_rkey_h rkey ;
65- } ucp_mem_list_elem_t ;
67+ } ucp_device_mem_list_elem_t ;
6668
6769
6870/**
6971 * @ingroup UCP_DEVICE
7072 * @brief Memory descriptor list create parameters field mask.
7173 *
72- * The enumeration allows specifying which fields in @ref ucp_mem_list_params_t
74+ * The enumeration allows specifying which fields in @ref ucp_device_mem_list_params_t
7375 * are presents. It is used to enable backward compatibility support.
7476 */
75- enum ucp_mem_list_params_field {
77+ enum ucp_device_mem_list_params_field {
7678 UCP_MEM_LIST_PARAMS_FIELD_ELEMENTS = UCS_BIT (0 ), /**< Elements array base address */
7779 UCP_MEM_LIST_PARAMS_FIELD_ELEMENT_SIZE = UCS_BIT (1 ), /**< Element size in bytes */
7880 UCP_MEM_LIST_PARAMS_FIELD_NUM_ELEMENTS = UCS_BIT (2 ) /**< Number of elements */
@@ -84,12 +86,12 @@ enum ucp_mem_list_params_field {
8486 * @brief Memory descriptor list create parameters.
8587 *
8688 * The structure defines the parameters that can be used to create a handle
87- * with @ref ucp_mem_list_create .
89+ * with @ref ucp_device_mem_list_create .
8890 */
89- typedef struct ucp_mem_list_params {
91+ typedef struct ucp_device_mem_list_params {
9092 /**
9193 * Mask of valid fields in this structure, using bits from
92- * @ref ucp_mem_list_params_field .
94+ * @ref ucp_device_mem_list_params_field .
9395 * Fields not specified in this mask will be ignored.
9496 * Provides ABI compatibility with respect to adding new fields.
9597 */
@@ -108,8 +110,8 @@ typedef struct ucp_mem_list_params {
108110 /**
109111 * Base address of the array of descriptor elements.
110112 */
111- const ucp_mem_list_elem_t * elements ;
112- } ucp_mem_list_params_t ;
113+ const ucp_device_mem_list_elem_t * elements ;
114+ } ucp_device_mem_list_params_t ;
113115
114116
115117/**
@@ -126,12 +128,12 @@ typedef struct ucp_device_mem_list_handle *ucp_device_mem_list_handle_h;
126128 * @brief Memory descriptor list create function for batched RMA operations.
127129 *
128130 * This function creates and populates a descriptor list handle using parameters
129- * inputs from @ref ucp_mem_list_params_t . This descriptor is created for
131+ * inputs from @ref ucp_device_mem_list_params_t . This descriptor is created for
130132 * the given remote endpoint. It can be used on a GPU using the corresponding
131133 * device functions.
132134 *
133135 * It can be used repeatedly, until finally released by calling @ref
134- * ucp_mem_list_release .
136+ * ucp_device_mem_list_release .
135137 *
136138 * @param [in] ep Remote endpoint handle.
137139 * @param [in] params Parameters used to create the handle.
@@ -140,21 +142,89 @@ typedef struct ucp_device_mem_list_handle *ucp_device_mem_list_handle_h;
140142 * @return Error code as defined by @ref ucs_status_t.
141143 */
142144ucs_status_t
143- ucp_mem_list_create (ucp_ep_h ep ,
144- const ucp_mem_list_params_t * params ,
145- ucp_device_mem_list_handle_h * handle );
145+ ucp_device_mem_list_create (ucp_ep_h ep ,
146+ const ucp_device_mem_list_params_t * params ,
147+ ucp_device_mem_list_handle_h * handle );
146148
147149
148150/**
149151 * @ingroup UCP_DEVICE
150152 * @brief Release function for a descriptor list handle.
151153 *
152154 * This function releases the handle that was created using @ref
153- * ucp_mem_list_create .
155+ * ucp_device_mem_list_create .
154156 *
155157 * @param [in] handle Created handle to release.
156158 */
157- void ucp_mem_list_release (ucp_device_mem_list_handle_h handle );
159+ void ucp_device_mem_list_release (ucp_device_mem_list_handle_h handle );
160+
161+
162+ /**
163+ * @ingroup UCP_DEVICE
164+ * @brief Signal init attributes field mask.
165+ *
166+ * The enumeration allows specifying which fields in @ref
167+ * ucp_device_counter_init_params_t are present. It is used to enable backward
168+ * compatibility support.
169+ */
170+ enum ucp_device_counter_init_params_field {
171+ UCP_DEVICE_COUNTER_INIT_PARAMS_FIELD_MEM_TYPE = UCS_BIT (0 ), /**< Source memory handle */
172+ UCP_DEVICE_COUNTER_INIT_PARAMS_FIELD_MEMH = UCS_BIT (1 ) /**< Unpacked remote memory key */
173+ };
174+
175+
176+ /**
177+ * @ingroup UCP_DEVICE
178+ * @brief Parameters which can be used when calling @ref ucp_device_counter_init.
179+ */
180+ typedef struct ucp_device_counter_init_params {
181+ /**
182+ * Mask of valid fields in this structure, using bits from
183+ * @ref ucp_device_counter_init_params_field.
184+ * Fields not specified in this mask will be ignored.
185+ * Provides ABI compatibility with respect to adding new fields.
186+ */
187+ uint64_t field_mask ;
188+
189+ /**
190+ * Optional memory type for the given @a counter memory area.
191+ */
192+ ucs_memory_type_t mem_type ;
193+
194+ /**
195+ * Optional memory registration handle for the given @a counter memory area.
196+ */
197+ ucp_mem_h memh ;
198+ } ucp_device_counter_init_params_t ;
199+
200+
201+ /**
202+ * @ingroup UCP_DEVICE
203+ * @brief Initialize the contents of a counter memory area.
204+ *
205+ * This host routine is called by the receive side to set up the memory area for
206+ * signaling with a counter. A remote sender can then use the provided rkey to
207+ * notify when the data has been successfully sent.
208+ *
209+ * The receive side can poll for completion on this counter using the device
210+ * function @ref ucp_device_counter_read.
211+ *
212+ * The memory type or memory handle from params, might be used to help setting
213+ * the contents of the counting area.
214+ *
215+ * @param [in] context Context to use when initializing a counter area.
216+ * @param [in] params Parameters used to initialize the counter area.
217+ * @param [in] counter_ptr Address of the counting area.
218+ *
219+ * @return Error code as defined by @ref ucs_status_t.
220+ */
221+ static UCS_F_ALWAYS_INLINE ucs_status_t
222+ ucp_device_counter_init (ucp_context_h context ,
223+ const ucp_device_counter_init_params_t * params ,
224+ void * counter_ptr ) {
225+ /* TODO: actual Implementation will not be in headers */
226+ return UCS_ERR_NOT_IMPLEMENTED ;
227+ }
158228
159229END_C_DECLS
160230
0 commit comments