11#define RABIT_EXTERN_C extern "C"
18#if defined(_MSC_VER) || defined(_WIN32)
19#define RABIT_DLL RABIT_EXTERN_C __declspec(dllexport)
21#define RABIT_DLL RABIT_EXTERN_C __attribute__ ((visibility ("default")))
37RABIT_DLL
bool RabitInit(
int argc,
char *argv[]);
113 size_t beginIndex,
size_t size_node_slice,
114 size_t size_prev_slice,
int enum_dtype);
134RABIT_DLL
int RabitAllreduce(
void *sendrecvbuf,
size_t count,
int enum_dtype,
135 int enum_op,
void (*prepare_fun)(
void *arg),
RABIT_DLL int RabitGetRank(void)
get rank of current process
Definition rabit_c_api.cc:278
RABIT_DLL int RabitBroadcast(void *sendrecv_data, rbt_ulong size, int root)
broadcast an memory region to all others from root
Definition rabit_c_api.cc:308
RABIT_DLL int RabitLinkTag(void)
a Dummy function, used to cause force link of C API into the DLL.
Definition rabit_c_api.cc:340
RABIT_DLL int RabitAllreduce(void *sendrecvbuf, size_t count, int enum_dtype, int enum_op, void(*prepare_fun)(void *arg), void *prepare_arg)
perform in-place allreduce, on sendrecvbuf this function is NOT thread-safe
Definition rabit_c_api.cc:325
RABIT_DLL int RabitAllgather(void *sendrecvbuf, size_t total_size, size_t beginIndex, size_t size_node_slice, size_t size_prev_slice, int enum_dtype)
Allgather function, each node have a segment of data in the ring of sendrecvbuf, the data provided by...
Definition rabit_c_api.cc:315
RABIT_DLL int RabitGetWorldSize(void)
get total number of process
Definition rabit_c_api.cc:282
unsigned long rbt_ulong
rabit unsigned long type
Definition c_api.h:25
RABIT_DLL bool RabitInit(int argc, char *argv[])
initialize the rabit module, call this once before using anything The additional arguments is not nec...
Definition rabit_c_api.cc:258
RABIT_DLL void RabitGetProcessorName(char *out_name, rbt_ulong *out_len, rbt_ulong max_len)
get name of processor
Definition rabit_c_api.cc:297
RABIT_DLL int RabitGetRingPrevRank(void)
get rank of previous process in ring topology
Definition rabit_c_api.cc:274
RABIT_DLL int RabitIsDistributed(void)
get rank of current process
Definition rabit_c_api.cc:286
RABIT_DLL int RabitFinalize(void)
finalize the rabit engine, call this function after you finished all jobs.
Definition rabit_c_api.cc:266
RABIT_DLL int RabitTrackerPrint(const char *msg)
print the msg to the tracker, this function can be used to communicate the information of the progres...
Definition rabit_c_api.cc:290
RABIT_DLL int RabitVersionNumber(void)
Definition rabit_c_api.cc:336