19 #ifndef OMPI_MTL_PORTALS_SEND_SHORT_H
20 #define OMPI_MTL_PORTALS_SEND_SHORT_H
22 extern void ompi_mtl_portals_short_setup(
void);
23 extern void ompi_mtl_portals_short_cleanup(
void);
26 ompi_mtl_portals_alloc_short_buf(
void)
30 while ( ompi_mtl_portals.ptl_copy_block_first_free == ompi_mtl_portals.ptl_num_copy_blocks ) {
31 ompi_mtl_portals_progress();
34 buf_num = ompi_mtl_portals.ptl_copy_block_free_list[ompi_mtl_portals.ptl_copy_block_first_free++];
36 assert((buf_num >= 0) && (buf_num < ompi_mtl_portals.ptl_num_copy_blocks));
42 ompi_mtl_portals_free_short_buf(
int offset )
46 buf_num = offset / ompi_mtl_portals.ptl_copy_block_len;
48 assert((buf_num >= 0) && (buf_num < ompi_mtl_portals.ptl_num_copy_blocks));
50 ompi_mtl_portals.ptl_copy_block_first_free--;
52 assert(ompi_mtl_portals.ptl_copy_block_first_free >= 0);
54 ompi_mtl_portals.ptl_copy_block_free_list[ompi_mtl_portals.ptl_copy_block_first_free] = buf_num;