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:
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