Project import generated by Copybara.

GitOrigin-RevId: d8caa66de45839696f5bd0786ad3bfbcb9cff632
This commit is contained in:
MediaPipe Team
2020-12-09 22:43:33 -05:00
committed by chuoling
parent f15da632de
commit 2b58cceec9
750 changed files with 22901 additions and 9478 deletions
+4 -4
View File
@@ -25,16 +25,16 @@
namespace mediapipe {
// static
::mediapipe::StatusOr<Executor*> ThreadPoolExecutor::Create(
mediapipe::StatusOr<Executor*> ThreadPoolExecutor::Create(
const MediaPipeOptions& extendable_options) {
auto& options =
extendable_options.GetExtension(ThreadPoolExecutorOptions::ext);
if (!options.has_num_threads()) {
return ::mediapipe::InvalidArgumentError(
return mediapipe::InvalidArgumentError(
"num_threads is not specified in ThreadPoolExecutorOptions.");
}
if (options.num_threads() <= 0) {
return ::mediapipe::InvalidArgumentErrorBuilder(MEDIAPIPE_LOC)
return mediapipe::InvalidArgumentErrorBuilder(MEDIAPIPE_LOC)
<< "The num_threads field in ThreadPoolExecutorOptions should be "
"positive but is "
<< options.num_threads();
@@ -46,7 +46,7 @@ namespace mediapipe {
// pass a negative value. 0 has a special meaning (the default thread
// stack size for the system), so we also avoid that.
if (options.stack_size() <= 0) {
return ::mediapipe::InvalidArgumentErrorBuilder(MEDIAPIPE_LOC)
return mediapipe::InvalidArgumentErrorBuilder(MEDIAPIPE_LOC)
<< "The stack_size field in ThreadPoolExecutorOptions should be "
"positive but is "
<< options.stack_size();