@@ -111,19 +111,6 @@ struct opal_accelerator_stream_t {
111111};
112112typedef struct opal_accelerator_stream_t opal_accelerator_stream_t ;
113113
114- #define MAX_IPC_HANDLE_SIZE 64
115- struct opal_accelerator_ipc_handle_t {
116- size_t size ;
117- uint8_t handle [MAX_IPC_HANDLE_SIZE ];
118- };
119- typedef struct opal_accelerator_ipc_handle_t opal_accelerator_ipc_handle_t ;
120-
121- struct opal_accelerator_ipc_event_handle_t {
122- size_t size ;
123- uint8_t handle [MAX_IPC_HANDLE_SIZE ];
124- };
125- typedef struct opal_accelerator_ipc_event_handle_t opal_accelerator_ipc_event_handle_t ;
126-
127114struct opal_accelerator_pci_attr_t {
128115 uint16_t domain_id ;
129116 uint8_t bus_id ;
@@ -163,9 +150,7 @@ typedef int (*opal_accelerator_base_module_check_addr_fn_t)(
163150
164151/**
165152 * Creates a stream for asynchonous operations. This function will allocate
166- * memory for the object.
167- * To release the memory and associated resources,
168- * call opal_accelerator_base_module_create_stream_fn_t
153+ * memory for the object. To release the memory, call OBJ_RELEASE(*stream);
169154 *
170155 * @param[IN] dev_id Associated device for the stream or
171156 * MCA_ACCELERATOR_NO_DEVICE_ID
@@ -176,45 +161,11 @@ typedef int (*opal_accelerator_base_module_check_addr_fn_t)(
176161typedef int (* opal_accelerator_base_module_create_stream_fn_t )(
177162 int dev_id , opal_accelerator_stream_t * * stream );
178163
179- /**
180- * Destroys a stream and release the object memory.
181- * This function should return immediately, but resources associated with
182- * the stream may be released later.
183- *
184- * @param[IN] stream Stream to destroy
185- *
186- * @return OPAL_SUCCESS or error status on failure
187- */
188- typedef int (* opal_accelerator_base_module_destroy_stream_fn_t )(
189- opal_accelerator_stream_t * stream );
190-
191- /**
192- * Wait until a stream's operations are complete
193- *
194- * @param[IN] stream Stream to wait for
195- *
196- * @return OPAL_SUCCESS or error status on failure
197- */
198- typedef int (* opal_accelerator_base_module_synchronize_stream_fn_t )(
199- opal_accelerator_stream_t * stream );
200-
201- /**
202- * Make a stream wait on an event
203- *
204- * @param[IN] stream Stream to wait
205- * @param[IN] event Event to wait on
206- *
207- * @return OPAL_SUCCESS or error status on failure
208- */
209- typedef int (* opal_accelerator_base_module_stream_wait_event_fn_t )(
210- opal_accelerator_stream_t * stream , opal_accelerator_event_t * event );
211-
212164/**
213165 * Creates an event. An event is a synchronization marker that can be
214166 * appended to a stream to monitor device progress or synchronize the
215167 * corresponding stream. This function will allocate memory for the object.
216- * To release the object memory and associated resources
217- * call opal_accelerator_base_module_destroy_event_fn_t
168+ * To release the memory, call OBJ_RELEASE(*event);
218169 *
219170 * @param[IN] dev_id Associated device for the event or
220171 * MCA_ACCELERATOR_NO_DEVICE_ID
@@ -225,18 +176,6 @@ typedef int (*opal_accelerator_base_module_stream_wait_event_fn_t)(
225176typedef int (* opal_accelerator_base_module_create_event_fn_t )(
226177 int dev_id , opal_accelerator_event_t * * event );
227178
228- /**
229- * Destroys an event and release the object memory.
230- * This function should return immediately, but the event may complete
231- * and associated resources are released later.
232- *
233- * @param[IN] event Event to destroy
234- *
235- * @return OPAL_SUCCESS or error status on failure.
236- */
237- typedef int (* opal_accelerator_base_module_destroy_event_fn_t )(
238- opal_accelerator_event_t * event );
239-
240179/**
241180 * Records an event on a stream. An event recorded on the stream is
242181 * a synchronization marker that can be used to monitor the device's
@@ -379,87 +318,6 @@ typedef int (*opal_accelerator_base_module_mem_release_fn_t)(
379318typedef int (* opal_accelerator_base_module_get_address_range_fn_t )(
380319 int dev_id , const void * ptr , void * * base , size_t * size );
381320
382- /*********************************************************/
383- /**** Inter Process Communication (IPC) Functions ****/
384- /*********************************************************/
385-
386- /**
387- * Queries whether the device supports IPC or not.
388- *
389- * If true, the functions:
390- *
391- * opal_accelerator_base_module_get_ipc_handle_fn_t()
392- * opal_accelerator_base_module_open_ipc_handle_fn_t()
393- * opal_accelerator_base_module_close_ipc_handle_fn_t()
394- *
395- * must be implemented.
396- *
397- * @return true IPC supported
398- * @return false IPC not supported
399- */
400- typedef bool (* opal_accelerator_base_module_is_ipc_enabled_fn_t )(void );
401-
402- /**
403- * Gets an IPC memory handle for an existing device memory allocation.
404- *
405- * @param[IN] dev_id Associated device for the IPC memory handle or
406- * MCA_ACCELERATOR_NO_DEVICE_ID
407- * @param[IN] dev_ptr Device memory address
408- * @param[OUT] handle Pointer to IPC handle object
409- *
410- * @return OPAL_SUCCESS or error status on failure
411- *
412- */
413- typedef int (* opal_accelerator_base_module_get_ipc_handle_fn_t )(
414- int dev_id , void * dev_ptr , opal_accelerator_ipc_handle_t * handle );
415-
416- /**
417- * Opens an IPC memory handle from another process and returns
418- * a device pointer usable in the local process.
419- *
420- * @param[IN] dev_id Associated device for the IPC memory handle or
421- * MCA_ACCELERATOR_NO_DEVICE_ID
422- * @param[IN] handle IPC handle object from another process
423- * @param[OUT] dev_ptr Returned device pointer
424- *
425- * @return OPAL_SUCCESS or error status on failure
426- */
427- typedef int (* opal_accelerator_base_module_open_ipc_handle_fn_t )(
428- int dev_id , opal_accelerator_ipc_handle_t * handle , void * * dev_ptr );
429-
430- /**
431- * Gets an IPC event handle for an event created by opal_accelerator_base_module_create_event_fn_t.
432- *
433- * @param[IN] event Event created previously
434- * @param[OUT] handle Pointer to IPC event handle object
435- *
436- * @return OPAL_SUCCESS or error status on failure
437- */
438- typedef int (* opal_accelerator_base_module_get_ipc_event_handle_fn_t )(
439- opal_accelerator_event_t * event , opal_accelerator_ipc_event_handle_t * handle );
440-
441- /**
442- * Opens an IPC event handle from another process opened by
443- * opal_accelerator_base_module_get_ipc_event_handle_fn_t.
444- *
445- * @param[IN] handle IPC event handle from another process
446- * @param[OUT] event Pointer to store the opened event
447- *
448- * @return OPAL_SUCCESS or error status on failure
449- */
450- typedef int (* opal_accelerator_base_module_open_ipc_event_handle_fn_t )(
451- opal_accelerator_ipc_event_handle_t * handle , opal_accelerator_event_t * event );
452-
453- /**
454- * Closes IPC memory mapped with opal_accelerator_base_module_open_ipc_handle_fn_t().
455- *
456- * @param[IN] dev_id Associated device for the IPC memory handle or
457- * MCA_ACCELERATOR_NO_DEVICE_ID
458- * @param[IN] dev_ptr IPC device pointer returned from
459- * opal_accelerator_base_module_open_ipc_handle_fn_t()
460- */
461- typedef int (* opal_accelerator_base_module_close_ipc_handle_fn_t )(int dev_id , void * dev_ptr );
462-
463321/**
464322 * Page-locks the memory range specified by ptr and size
465323 *
@@ -544,11 +402,7 @@ typedef struct {
544402 opal_accelerator_base_module_check_addr_fn_t check_addr ;
545403
546404 opal_accelerator_base_module_create_stream_fn_t create_stream ;
547- opal_accelerator_base_module_destroy_stream_fn_t destroy_stream ;
548- opal_accelerator_base_module_synchronize_stream_fn_t synchronize_stream ;
549- opal_accelerator_base_module_stream_wait_event_fn_t stream_wait_event ;
550405 opal_accelerator_base_module_create_event_fn_t create_event ;
551- opal_accelerator_base_module_destroy_event_fn_t destroy_event ;
552406 opal_accelerator_base_module_record_event_fn_t record_event ;
553407 opal_accelerator_base_module_query_event_fn_t query_event ;
554408
@@ -560,13 +414,6 @@ typedef struct {
560414 opal_accelerator_base_module_mem_release_fn_t mem_release ;
561415 opal_accelerator_base_module_get_address_range_fn_t get_address_range ;
562416
563- opal_accelerator_base_module_is_ipc_enabled_fn_t is_ipc_enabled ;
564- opal_accelerator_base_module_get_ipc_handle_fn_t get_ipc_handle ;
565- opal_accelerator_base_module_open_ipc_handle_fn_t open_ipc_handle ;
566- opal_accelerator_base_module_close_ipc_handle_fn_t close_ipc_handle ;
567- opal_accelerator_base_module_get_ipc_event_handle_fn_t get_ipc_event_handle ;
568- opal_accelerator_base_module_open_ipc_event_handle_fn_t open_ipc_event_handle ;
569-
570417 opal_accelerator_base_module_host_register_fn_t host_register ;
571418 opal_accelerator_base_module_host_unregister_fn_t host_unregister ;
572419
0 commit comments