| 55 | : env_(env), thread_options_(thread_options), name_(name) {} |
| 56 | |
| 57 | EnvThread* CreateThread(std::function<void()> f) { |
| 58 | return env_->StartThread(thread_options_, name_, [=]() { |
| 59 | // Set the processor flag to flush denormals to zero. |
| 60 | port::ScopedFlushDenormal flush; |
| 61 | // Set the processor rounding mode to ROUND TO NEAREST. |
| 62 | port::ScopedSetRound round(FE_TONEAREST); |
| 63 | if (thread_options_.numa_node != port::kNUMANoAffinity) { |
| 64 | port::NUMASetThreadNodeAffinity(thread_options_.numa_node); |
| 65 | } |
| 66 | f(); |
| 67 | }); |
| 68 | } |
| 69 | |
| 70 | Task CreateTask(std::function<void()> f, int64 cost = 0) { |
| 71 | uint64 id = 0; |
nothing calls this directly
no test coverage detected