57 #ifndef _H_MCBSP_AFFINITY
58 #define _H_MCBSP_AFFINITY
enum mcbsp_thread_numbering MCBSP_DEFAULT_THREAD_NUMBERING
Default thread numbering (CONSECUTIVE).
void mcbsp_set_reserved_cores(const size_t *const reserved, const size_t length)
Supplies a list of core IDs that are NOT to be used by MulticoreBSP SPMD runs.
size_t * mcbsp_get_reserved_cores(void)
void mcbsp_set_thread_numbering(const enum mcbsp_thread_numbering numbering)
Changes the thread numbering strategy this machines adheres to.
void mcbsp_set_pinning(const size_t *const pinning, const size_t length)
Supplies a manually defined pinning strategy for MulticoreBSP to use.
void mcbsp_set_maximum_threads(const size_t max)
Changes the maxmimum amount of threads MulticoreBSP can allocate.
size_t mcbsp_get_unused_threads_per_core(void)
A manual affinity performs pinning as per user- supplied definitions.
Definition: mcbsp-affinity.h:226
mcbsp_affinity_mode
Pre-defined strategies for pinning threads.
Definition: mcbsp-affinity.h:204
void mcbsp_set_affinity_mode(const enum mcbsp_affinity_mode mode)
Changes the currently active affinity strategy.
enum mcbsp_thread_numbering mcbsp_get_thread_numbering(void)
If each core supports s threads, and t cores are available (for a total of p=s*t hardware threads)...
Definition: mcbsp-affinity.h:250
size_t mcbsp_get_available_cores(void)
mcbsp_thread_numbering
Enumerates ways of hardware thread numbering.
Definition: mcbsp-affinity.h:234
enum mcbsp_affinity_mode MCBSP_DEFAULT_AFFINITY
Default affinity strategy (SCATTER).
If each core supports s threads, and t cores are available (for a total of p=s*t hardware threads)...
Definition: mcbsp-affinity.h:242
void mcbsp_set_unused_threads_per_core(const size_t unused_threads_per_core)
Prevents the use of a given number of threads at the same core.
enum mcbsp_affinity_mode mcbsp_get_affinity_mode(void)
size_t mcbsp_get_maximum_threads(void)
A compact affinity will pin P consecutive threads to the first P available cores. ...
Definition: mcbsp-affinity.h:219
size_t MCBSP_DEFAULT_THREADS_PER_CORE
Default number of threads per core (1).
A scattered affinity will pin P consecutive threads so that the full range of cores is utilised...
Definition: mcbsp-affinity.h:213
void mcbsp_set_available_cores(const size_t num_cores)
Changes the number of available cores.
size_t * mcbsp_get_pinning(void)
void mcbsp_set_threads_per_core(const size_t threads_per_core)
Changes the number of threads per core.
size_t mcbsp_get_reserved_cores_number(void)
size_t mcbsp_get_threads_per_core(void)