#[repr(C)]pub struct ucp_worker_params {
pub field_mask: u64,
pub thread_mode: ucs_thread_mode_t,
pub cpu_mask: ucs_cpu_set_t,
pub events: c_uint,
pub user_data: *mut c_void,
pub event_fd: c_int,
pub flags: u64,
pub name: *const c_char,
pub am_alignment: size_t,
pub client_id: u64,
}Expand description
@ingroup UCP_WORKER @brief Tuning parameters for the UCP worker.
The structure defines the parameters that are used for the UCP worker tuning during the UCP worker @ref ucp_worker_create “creation”.
Fields§
§field_mask: u64Mask of valid fields in this structure, using bits from @ref ucp_worker_params_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.
thread_mode: ucs_thread_mode_tThe parameter thread_mode suggests the thread safety mode which worker and the associated resources should be created with. This is an optional parameter. The default value is UCS_THREAD_MODE_SINGLE and it is used when the value of the parameter is not set. When this parameter along with its corresponding bit in the field_mask - UCP_WORKER_PARAM_FIELD_THREAD_MODE is set, the @ref ucp_worker_create attempts to create worker with this thread mode. The thread mode with which worker is created can differ from the suggested mode. The actual thread mode of the worker should be obtained using the query interface @ref ucp_worker_query.
cpu_mask: ucs_cpu_set_tMask of which CPUs worker resources should preferably be allocated on. This value is optional. If it’s not set (along with its corresponding bit in the field_mask - UCP_WORKER_PARAM_FIELD_CPU_MASK), resources are allocated according to system’s default policy.
events: c_uintMask of events (@ref ucp_wakeup_event_t) which are expected on wakeup. This value is optional. If it’s not set (along with its corresponding bit in the field_mask - UCP_WORKER_PARAM_FIELD_EVENTS), all types of events will trigger on wakeup.
user_data: *mut c_voidUser data associated with the current worker. This value is optional. If it’s not set (along with its corresponding bit in the field_mask - UCP_WORKER_PARAM_FIELD_USER_DATA), it will default to NULL.
event_fd: c_intExternal event file descriptor. This value is optional. If @ref UCP_WORKER_PARAM_FIELD_EVENT_FD is set in the field_mask, events on the worker will be reported on the provided event file descriptor. In this case, calling @ref ucp_worker_get_efd will result in an error. The provided file descriptor must be capable of aggregating notifications for arbitrary events, for example @c epoll(7) on Linux systems. @ref user_data will be used as the event user-data on systems which support it. For example, on Linux, it will be placed in @c epoll_data_t::ptr, when returned from @c epoll_wait(2).
Otherwise, events will be reported to the event file descriptor returned from @ref ucp_worker_get_efd().
flags: u64Worker flags. This value is optional. If @ref UCP_WORKER_PARAM_FIELD_FLAGS is not set in the field_mask, the value of this field will default to 0.
name: *const c_charTracing and analysis tools can identify the worker using this name. To retrieve the worker’s name, use @ref ucp_worker_query, as the name you supply may be changed by UCX under some circumstances, e.g. a name conflict. This field is only assigned if you set @ref UCP_WORKER_PARAM_FIELD_NAME in the field mask. If not, then a default unique name will be created for you.
am_alignment: size_tMinimal address alignment of the active message data pointer as passed in argument @a data to the active message handler, defined as @a ucp_am_recv_callback_t.
client_id: u64Client id that is sent as part of the connection request payload when connecting to a remote socket address. On the remote side, this value can be obtained from @ref ucp_conn_request_h using @ref ucp_conn_request_query.
Trait Implementations§
Source§impl Clone for ucp_worker_params
impl Clone for ucp_worker_params
Source§fn clone(&self) -> ucp_worker_params
fn clone(&self) -> ucp_worker_params
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more