diff options
author | Ruy Contributors <ruy-eng@google.com> | 2022-09-14 22:56:04 +0300 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-09-14 22:56:29 +0300 |
commit | 3286a34cc8de6149ac6844107dfdffac91531e72 (patch) | |
tree | dcc7f0f6e9f9bc60bd369944481d3b6a673c53d6 /ruy/ctx_test.cc | |
parent | 97ebb72aa0655c0af98896b317476a5d0dacad9c (diff) |
PiperOrigin-RevId: 474367386
Diffstat (limited to 'ruy/ctx_test.cc')
-rw-r--r-- | ruy/ctx_test.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ruy/ctx_test.cc b/ruy/ctx_test.cc index e55dcfc..c40f2d6 100644 --- a/ruy/ctx_test.cc +++ b/ruy/ctx_test.cc @@ -15,6 +15,7 @@ limitations under the License. #include "ruy/ctx_impl.h" #include "ruy/gtest_wrapper.h" +#include "ruy/strategy_controls.h" #include "ruy/path.h" #include "ruy/platform.h" @@ -67,6 +68,14 @@ TEST(ContextInternalTest, ThreadSpecificResources) { } } +TEST(ContextInternalTest, SetNumThreadsStrategy) { + CtxImpl ctx; + EXPECT_EQ(ctx.num_threads_strategy(), NumThreadsStrategy::kDefault); + ctx.set_num_threads_strategy(NumThreadsStrategy::kForceMaxNumThreads); + EXPECT_EQ(ctx.num_threads_strategy(), + NumThreadsStrategy::kForceMaxNumThreads); +} + } // namespace } // namespace ruy |