logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

hwlocality_glibc_sched - Interoperability with glibc sched affinity

Author

       Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code.

Hardware Locality (hwloc)                        Version 2.12.0                        hwlocality_glibc_sched(3)

Detailed Description

       This interface offers ways to convert between hwloc cpusets and glibc cpusets such as those manipulated
       by sched_getaffinity() or pthread_attr_setaffinity_np().

       Note
           Topology topology must match the current machine.

Function Documentation

inthwloc_cpuset_from_glibc_sched_affinity(hwloc_topology_ttopology,hwloc_cpuset_thwlocset,constcpu_set_t*schedset,size_tschedsetsize)[inline]
       Convert glibc sched affinity CPU set schedset into hwloc CPU set. This function may be used before
       calling sched_setaffinity or any other function that takes a cpu_set_t as input parameter.

       schedsetsize should be sizeof(cpu_set_t) unless schedset was dynamically allocated with CPU_ALLOC

       Returns
           0 on success.

           -1 with errno set to ENOMEM if some internal reallocation failed.

   inthwloc_cpuset_to_glibc_sched_affinity(hwloc_topology_ttopology,hwloc_const_cpuset_thwlocset,cpu_set_t*schedset,size_tschedsetsize)[inline]
       Convert hwloc CPU set toposet into glibc sched affinity CPU set schedset. This function may be used
       before calling sched_setaffinity or any other function that takes a cpu_set_t as input parameter.

       schedsetsize should be sizeof(cpu_set_t) unless schedset was dynamically allocated with CPU_ALLOC

       Returns
           0.

Name

       hwlocality_glibc_sched - Interoperability with glibc sched affinity

Synopsis

Functions
       int hwloc_cpuset_to_glibc_sched_affinity (hwloc_topology_t topology, hwloc_const_cpuset_t hwlocset,
           cpu_set_t *schedset, size_t schedsetsize)
       int hwloc_cpuset_from_glibc_sched_affinity (hwloc_topology_t topology, hwloc_cpuset_t hwlocset, const
           cpu_set_t *schedset, size_t schedsetsize)

See Also