runtime #

fn is_32bit #

fn is_32bit() bool

is_32bit returns true if the current executable is running on a 32 bit system.

fn is_64bit #

fn is_64bit() bool

is_64bit returns true if the current executable is running on a 64 bit system.

fn is_big_endian #

fn is_big_endian() bool

is_big_endian returns true if the current executable is running on a big-endian system.

fn is_little_endian #

fn is_little_endian() bool

is_little_endian returns true if the current executable is running on a little-endian system.

fn nr_cpus #

fn nr_cpus() int

fn nr_jobs #

fn nr_jobs() int

nr_jobs returns the same as nr_cpus with the difference that if an environment variable VJOBS is set, and has a value > 0, then nr_jobs will return that number instead.
This is useful for runtime tweaking of e.g. threaded or concurrent code.