File tree Expand file tree Collapse file tree 3 files changed +17
-11
lines changed Expand file tree Collapse file tree 3 files changed +17
-11
lines changed Original file line number Diff line number Diff line change 1+ # TensorFlow
2+
3+ * [ Home] [ home ]
4+ * [ Getting Started] ( /tensorflow/g3doc/get_started/index.md )
5+ * [ Mechanics] ( /tensorflow/g3doc/how_tos/index.md )
6+ * [ Tutorials] ( /tensorflow/g3doc/tutorials/index.md )
7+ * [ Python API] ( /tensorflow/g3doc/api_docs/python/index.md )
8+ * [ C++ API] ( /tensorflow/g3doc/api_docs/cc/index.md )
9+ * [ Other Resources] ( /tensorflow/g3doc/resources/index.md )
10+
11+ [ home ] : /tensorflow/g3doc/index.md
Original file line number Diff line number Diff line change 99#ifdef SNAPPY
1010#include < snappy.h>
1111#endif
12+ #if defined(__APPLE__) && defined(__MACH__)
13+ #include < thread>
14+ #endif
1215
1316namespace tensorflow {
1417namespace port {
@@ -29,6 +32,9 @@ int NumSchedulableCPUs() {
2932 return CPU_COUNT (&cpuset);
3033 }
3134 perror (" sched_getaffinity" );
35+ #endif
36+ #if defined(__APPLE__) && defined(__MACH__)
37+ return std::thread::hardware_concurrency ();
3238#endif
3339 const int kDefaultCores = 4 ; // Semi-conservative guess
3440 fprintf (stderr, " can't determine number of CPU cores: assuming %d\n " ,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments