API Reference Manual
1.46.0
|
Global initialization parameters. More...
#include <init.h>
Data Fields | |
int | num_worker |
Maximum number of worker threads the user will run concurrently. More... | |
int | num_control |
Maximum number of control threads the user will run concurrently. More... | |
const odp_cpumask_t * | worker_cpus |
Pointer to bit mask mapping CPUs available to this ODP instance for running worker threads. More... | |
const odp_cpumask_t * | control_cpus |
Pointer to bit mask mapping CPUs available to this ODP instance for running control threads. More... | |
odp_log_func_t | log_fn |
Replacement for the default log fn. | |
odp_abort_func_t | abort_fn |
Replacement for the default abort fn. | |
odp_feature_t | not_used |
Unused features. More... | |
odp_mem_model_t | mem_model |
Application memory model. More... | |
struct { | |
uint64_t max_memory | |
Maximum memory usage in bytes. More... | |
} | shm |
Shared memory parameters. | |
Global initialization parameters.
These parameters may be used at global initialization time to configure and optimize ODP implementation to match the intended usage. Application specifies maximum resource usage. Implementation may round up resource reservations as needed. Initialization function returns a failure if resource requirements are too high. Init parameters may be used also to override logging and abort functions.
Use odp_init_param_init() to initialize the parameters into their default values. Unused parameters are left to default values.
Definition at line 161 of file api/spec/init.h.
int odp_init_t::num_worker |
Maximum number of worker threads the user will run concurrently.
Valid range is from 0 to platform specific maximum. Set both num_worker and num_control to zero for default number of threads.
Definition at line 165 of file api/spec/init.h.
int odp_init_t::num_control |
Maximum number of control threads the user will run concurrently.
Valid range is from 0 to platform specific maximum. Set both num_worker and num_control to zero for default number of threads.
Definition at line 170 of file api/spec/init.h.
const odp_cpumask_t* odp_init_t::worker_cpus |
Pointer to bit mask mapping CPUs available to this ODP instance for running worker threads.
Initialize to a NULL pointer to use default CPU mapping. When the mask is defined, odp_cpumask_default_worker() uses it instead of returning a default mask. Applications code should not access this cpumask directly. Valid range of CPUs and optimal CPU selection are platform specific, but generally it is recommended that: worker CPUs are dedicated to run only ODP worker threads (one thread per CPU) worker and control masks do not overlap different ODP instances do not specify overlapping worker masks
Definition at line 186 of file api/spec/init.h.
const odp_cpumask_t* odp_init_t::control_cpus |
Pointer to bit mask mapping CPUs available to this ODP instance for running control threads.
Initialize to a NULL pointer to use default CPU mapping. When the mask is defined, odp_cpumask_default_control() uses it instead of returning a default mask. Applications code should not access this cpumask directly. Valid range of CPUs and optimal CPU selection are platform specific, but generally it is recommended that worker and control masks do not overlap.
Definition at line 198 of file api/spec/init.h.
odp_feature_t odp_init_t::not_used |
Unused features.
These are hints to the ODP implementation that the application will not use any APIs associated with these features. Implementations may use this information to provide optimized behavior. Results are undefined if applications assert that a feature will not be used and it is used anyway.
Definition at line 212 of file api/spec/init.h.
odp_mem_model_t odp_init_t::mem_model |
Application memory model.
The main application thread has to call odp_init_global() and odp_init_local() before creating threads that share ODP data. The default value is ODP_MEM_MODEL_THREAD.
Definition at line 218 of file api/spec/init.h.
uint64_t odp_init_t::max_memory |
Maximum memory usage in bytes.
This is the maximum amount of shared memory that application will reserve concurrently. Use 0 when not set. Default value is 0.
Definition at line 226 of file api/spec/init.h.