pub unsafe extern "C" fn RabitAllreduce(
    sendrecvbuf: *mut c_void,
    count: usize,
    enum_dtype: c_int,
    enum_op: c_int,
    prepare_fun: Option<unsafe extern "C" fn(arg: *mut c_void)>,
    prepare_arg: *mut c_void
)
Expand description

\brief perform in-place allreduce, on sendrecvbuf this function is NOT thread-safe

Example Usage: the following code gives sum of the result vector data(10); … Allreduceop::Sum(&data[0], data.size()); … \param sendrecvbuf buffer for both sending and recving data \param count number of elements to be reduced \param enum_dtype the enumeration of data type, see rabit::engine::mpi::DataType in engine.h of rabit include \param enum_op the enumeration of operation type, see rabit::engine::mpi::OpType in engine.h of rabit \param prepare_fun Lazy preprocessing function, if it is not NULL, prepare_fun(prepare_arg) will be called by the function before performing Allreduce, to intialize the data in sendrecvbuf_. If the result of Allreduce can be recovered directly, then prepare_func will NOT be called \param prepare_arg argument used to passed into the lazy preprocessing function