提交 c943bcaa 编写于 作者: M Manjunath Kudlur

TensorFlow: Upstream changes to git.

Changes:
- Correct number of CPUs reported on mac.
- Doc updates.

Base CL: 107355041
上级 a2257d08
# TensorFlow
* [Home][home]
* [Getting Started](/tensorflow/g3doc/get_started/index.md)
* [Mechanics](/tensorflow/g3doc/how_tos/index.md)
* [Tutorials](/tensorflow/g3doc/tutorials/index.md)
* [Python API](/tensorflow/g3doc/api_docs/python/index.md)
* [C++ API](/tensorflow/g3doc/api_docs/cc/index.md)
* [Other Resources](/tensorflow/g3doc/resources/index.md)
[home]: /tensorflow/g3doc/index.md
......@@ -9,6 +9,9 @@
#ifdef SNAPPY
#include <snappy.h>
#endif
#if defined(__APPLE__) && defined(__MACH__)
#include <thread>
#endif
namespace tensorflow {
namespace port {
......@@ -29,6 +32,9 @@ int NumSchedulableCPUs() {
return CPU_COUNT(&cpuset);
}
perror("sched_getaffinity");
#endif
#if defined(__APPLE__) && defined(__MACH__)
return std::thread::hardware_concurrency();
#endif
const int kDefaultCores = 4; // Semi-conservative guess
fprintf(stderr, "can't determine number of CPU cores: assuming %d\n",
......
# TensorFlow
* [Home][home]
* [Getting Started](/get_started/index.md)
* [Mechanics](/how_tos/index.md)
* [Tutorials](/tutorials/index.md)
* [Python API](/api_docs/python/index.md)
* [C++ API](/api_docs/cc/index.md)
* [Other Resources](/resources/index.md)
[home]: /index.md
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册