builtin/ops/builtin_cb.inl
/*
 * While some buffers are large enough to be registered (as in memory
 * registration) upon first send, others are "buffer-copied" (BCOPY) - unless
 * it is used repeatedly. If an operation is used this many times - its buffers
 * will also be registered, turning it into a zero-copy (ZCOPY) send henceforth.
 */
While some buffers are large enough to be registered (as in memory
registration) upon first send, others are "buffer-copied" (BCOPY) - unless
it is used repeatedly. If an operation is used this many times - its buffers
will also be registered, turning it into a zero-copy (ZCOPY) send henceforth.
While some buffers are large enough to be registered ( as in memory registration ) upon first send others are " buffer - copied " ( BCOPY ) - unless it is used repeatedly . If an operation is used this many times - its buffers will also be registered turning it into a zero - copy ( ZCOPY ) send henceforth .
static ucs_status_t ucg_builtin_op_consider_optimization(ucg_builtin_op_t *op,
                                                         ucg_builtin_config_t *config)
{
    ucg_builtin_op_step_t *step = NULL;
    ucg_step_idx_ext_t  step_idx = 0;
    unsigned  opt_flag = config->bcopy_to_zcopy_opt;
    do {
        step = &op->steps[step_idx++];
        if ((step->flags & UCG_BUILTIN_OP_STEP_FLAG_SEND_AM_BCOPY) &&
            (step->phase->md_attr->cap.max_reg > step->buffer_length) && opt_flag) {
            op->optm_cb = ucg_builtin_optimize_bcopy_to_zcopy;
            op->opt_cnt = config->mem_reg_opt_cnt;
            return UCS_OK;
        }
    } while (!(step->flags & UCG_BUILTIN_OP_STEP_FLAG_LAST_STEP));
    op->optm_cb = ucg_builtin_no_optimization;
    op->opt_cnt = 0;
    return UCS_OK;
}
static ucs_status_t ucg_builtin_op_consider_optimization ( ucg_builtin_op_t * op , ucg_builtin_config_t * config ) { ucg_builtin_op_step_t * step = NULL ; ucg_step_idx_ext_t step_idx = 0 ; unsigned opt_flag = config -> bcopy_to_zcopy_opt ; do { step = & op -> steps [ step_idx ++ ] ; if ( ( step -> flags & UCG_BUILTIN_OP_STEP_FLAG_SEND_AM_BCOPY ) && ( step -> phase -> md_attr -> cap . max_reg > step -> buffer_length ) && opt_flag ) { op -> optm_cb = ucg_builtin_optimize_bcopy_to_zcopy ; op -> opt_cnt = config -> mem_reg_opt_cnt ; return UCS_OK ; } } while ( ! ( step -> flags & UCG_BUILTIN_OP_STEP_FLAG_LAST_STEP ) ) ; op -> optm_cb = ucg_builtin_no_optimization ; op -> opt_cnt = 0 ; return UCS_OK ; }
While some buffers are large enough to be registered (as in memory
 registration) upon first send, others are "buffer-copied" (BCOPY) - unless
 it is used repeatedly.
While some buffers are large enough to be registered ( as in memory registration ) upon first send others are " buffer - copied " ( BCOPY ) - unless it is used repeatedly .
/* Note: This function will be called... after opt_cnt wrap-around */