Enable tests

Host tests fail, so remove them for now.

Test: atest
-------
x86_64 num_cpus_host_test_src_lib: Passed: 3, Failed: 5, Ignored: 0, Assumption Failed: 0,   (Completed With ERRORS)
x86 num_cpus_device_test_src_lib: Passed: 2, Failed: 0, Ignored: 0, Assumption Failed: 0,
Change-Id: I34a91c0f8a65f2beaed40c85633305ecd8537959

Change-Id: I3e2fb74d0c299d61bf9ac222ac450f6680919e7b
4 files changed
tree: ca6304f83cf1a9b13037019d84b52f00b2796ea2
  1. ci/
  2. examples/
  3. fixtures/
  4. patches/
  5. src/
  6. .appveyor.yml
  7. .cargo_vcs_info.json
  8. .gitignore
  9. .travis.yml
  10. Android.bp
  11. Cargo.lock
  12. Cargo.toml
  13. Cargo.toml.orig
  14. cargo2android.json
  15. CHANGELOG.md
  16. CONTRIBUTING.md
  17. LICENSE-APACHE
  18. LICENSE-MIT
  19. METADATA
  20. MODULE_LICENSE_APACHE2
  21. OWNERS
  22. README.md
  23. TEST_MAPPING
README.md

num_cpus

crates.io Travis CI Status AppVeyor status

Count the number of CPUs on the current machine.

Usage

Add to Cargo.toml:

[dependencies]
num_cpus = "1.0"

In your main.rs or lib.rs:

extern crate num_cpus;

// count logical cores this process could try to use
let num = num_cpus::get();