The highest tagged major version is
v2 .
Discover Packages
github.com/emer/vision
nproc
package
Version:
v1.1.19
Opens a new window with list of versions in this module.
Published: Dec 13, 2023
License: BSD-3-Clause
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package nproc provides number of processors using slurm env var
SLURM_CPUS_PER_TASK or runtime.NumCPU().
TODO: move this to dmem package once that is started.
func ThreadNs(ncpu, njobs int ) (nthrs, nper, rmdr int )
ThreadNs computes number of threads and number of jobs per thread,
based on number of cpu's and total number of jobs.
rmdr is remainder of jobs not evenly divisible by ncpu
Source Files
¶
Click to show internal directories.
Click to hide internal directories.