diff options
author | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2017-08-29 23:37:30 +0300 |
---|---|---|
committer | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2017-08-30 08:20:36 +0000 |
commit | 1f72424b80ac1b84b4f040f195d74d9f2b646a62 (patch) | |
tree | 4119252c3d998fc6facae5f8adbf8dfaf53e78a1 | |
parent | 46b760c5118358a0b4289207c8d408fca8f4369c (diff) |
3rdparty/t9write: Add support for multi-threadingv5.10.0-alpha1
To reduce the recognition response time, the engine allows to use
multi-threading. If the macro DECUMA_USE_MULTI_THREAD is defined
in the OEM build configuration file, and nMaxThreads is set to be
greater than 1, we will use a maximum of threads in recognition
process.
Change-Id: Ie285d5a8c64584e88f85723967fd42228d36208c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r-- | src/virtualkeyboard/t9writeinputmethod.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/virtualkeyboard/t9writeinputmethod.cpp b/src/virtualkeyboard/t9writeinputmethod.cpp index ffee0aa2..14b6508b 100644 --- a/src/virtualkeyboard/t9writeinputmethod.cpp +++ b/src/virtualkeyboard/t9writeinputmethod.cpp @@ -451,6 +451,13 @@ public: << DECUMA_LANG_AR << DECUMA_LANG_IW << DECUMA_LANG_FA << DECUMA_LANG_UR; sessionSettings.writingDirection = rtlLanguages.contains(language) ? rightToLeft : unknownWriting; + // Enable multi-threaded recognition if available. +#ifdef DECUMA_USE_MULTI_THREAD + // Note: This feature requires T9 Write v8.0.0 or later, + // and feature enabled in the SDK. + sessionSettings.nMaxThreads = qMax(QThread::idealThreadCount(), 0); +#endif + VIRTUALKEYBOARD_DEBUG() << " -> language categories:" << languageCategories; VIRTUALKEYBOARD_DEBUG() << " -> symbol categories:" << symbolCategories; VIRTUALKEYBOARD_DEBUG() << " -> recognition mode:" << sessionSettings.recognitionMode; |