Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/google/ruy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuy Contributors <ruy-eng@google.com>2022-09-14 22:56:04 +0300
committerCopybara-Service <copybara-worker@google.com>2022-09-14 22:56:29 +0300
commit3286a34cc8de6149ac6844107dfdffac91531e72 (patch)
treedcc7f0f6e9f9bc60bd369944481d3b6a673c53d6 /ruy/ctx_test.cc
parent97ebb72aa0655c0af98896b317476a5d0dacad9c (diff)
Create API to determine how many threads to useHEADmaster
PiperOrigin-RevId: 474367386
Diffstat (limited to 'ruy/ctx_test.cc')
-rw-r--r--ruy/ctx_test.cc9
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