File tree 3 files changed +17
-11
lines changed
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 9
9
#ifdef SNAPPY
10
10
#include < snappy.h>
11
11
#endif
12
+ #if defined(__APPLE__) && defined(__MACH__)
13
+ #include < thread>
14
+ #endif
12
15
13
16
namespace tensorflow {
14
17
namespace port {
@@ -29,6 +32,9 @@ int NumSchedulableCPUs() {
29
32
return CPU_COUNT (&cpuset);
30
33
}
31
34
perror (" sched_getaffinity" );
35
+ #endif
36
+ #if defined(__APPLE__) && defined(__MACH__)
37
+ return std::thread::hardware_concurrency ();
32
38
#endif
33
39
const int kDefaultCores = 4 ; // Semi-conservative guess
34
40
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