/aosp_15_r20/external/python/cpython3/Objects/ |
D | call.c | 33 _Py_CheckFunctionResult(PyThreadState *tstate, PyObject *callable, in _Py_CheckFunctionResult() argument 36 assert((callable != NULL) ^ (where != NULL)); in _Py_CheckFunctionResult() 40 if (callable) in _Py_CheckFunctionResult() 43 callable); in _Py_CheckFunctionResult() 49 /* Ensure that the bug is caught in debug mode. in _Py_CheckFunctionResult() 60 if (callable) { in _Py_CheckFunctionResult() 63 "%R returned a result with an exception set", callable); in _Py_CheckFunctionResult() 71 /* Ensure that the bug is caught in debug mode. in _Py_CheckFunctionResult() 91 slot_name, Py_TYPE(obj)->tp_name); in _Py_CheckSlotResult() 99 slot_name, Py_TYPE(obj)->tp_name); in _Py_CheckSlotResult() [all …]
|
/aosp_15_r20/external/rust/android-crates-io/crates/grpcio-sys/grpc/src/core/lib/promise/ |
D | arena_promise.h | 7 // http://www.apache.org/licenses/LICENSE-2.0 10 // distributed under the License is distributed on an "AS IS" BASIS, 49 // Destroy the underlying callable object if there is one. 51 // destructor, we expose this for when the ArenaPromise object is destroyed. 62 // Used when an empty ArenaPromise is created, or when the ArenaPromise is moved 64 // crash if it is. 80 // Implementation of ImplInterface for a callable object. 81 template <typename T, typename Callable> 86 return poll_cast<T>((*ArgAsPtr<Callable>(arg))()); in PollOnce() 89 static void Destroy(ArgType* arg) { Destruct(ArgAsPtr<Callable>(arg)); } in Destroy() [all …]
|
/aosp_15_r20/external/grpc-grpc/src/core/lib/promise/ |
H A D | arena_promise.h | 7 // http://www.apache.org/licenses/LICENSE-2.0 10 // distributed under the License is distributed on an "AS IS" BASIS, 53 // Destroy the underlying callable object if there is one. 55 // destructor, we expose this for when the ArenaPromise object is destroyed. 66 // Used when an empty ArenaPromise is created, or when the ArenaPromise is moved 68 // crash if it is. 84 // Implementation of ImplInterface for a callable object. 85 template <typename T, typename Callable> 90 return poll_cast<T>((*ArgAsPtr<Callable>(arg))()); in PollOnce() 93 static void Destroy(ArgType* arg) { Destruct(ArgAsPtr<Callable>(arg)); } in Destroy() [all …]
|
/aosp_15_r20/external/pytorch/torch/utils/ |
H A D | _cxx_pytree.py | 4 A *pytree* is Python nested data structure. It is a tree in the sense that 20 Callable, 83 FlattenFunc = Callable[[PyTree], Tuple[List[Any], Context]] 84 UnflattenFunc = Callable[[Iterable[Any], Context], PyTree] 85 OpTreeUnflattenFunc = Callable[[Context, Iterable[Any]], PyTree] 87 ToDumpableContextFn = Callable[[Context], DumpableContext] 88 FromDumpableContextFn = Callable[[DumpableContext], Context] 90 FlattenWithKeysFunc = Callable[[PyTree], Tuple[List[Tuple[KeyEntry, Any]], Any]] 93 def _reverse_args(func: UnflattenFunc) -> OpTreeUnflattenFunc: 95 def wrapped(*args: Any, **kwargs: Any) -> Any: [all …]
|
H A D | _pytree.py | 4 A *pytree* is Python nested data structure. It is a tree in the sense that 14 This pytree implementation is not very performant due to Python overhead 29 Callable, 100 def __hash__(self) -> int: 103 def __eq__(self, other: object) -> bool: 106 def __str__(self) -> str: 109 def get(self, parent: Any) -> Any: 115 FlattenFunc = Callable[[PyTree], Tuple[List[Any], Context]] 116 UnflattenFunc = Callable[[Iterable[Any], Context], PyTree] 118 ToDumpableContextFn = Callable[[Context], DumpableContext] [all …]
|
/aosp_15_r20/external/guava/guava/src/com/google/common/util/concurrent/ |
H A D | TimeLimiter.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 24 import java.util.concurrent.Callable; 45 * target} object, enforcing the specified time limit on each call. This time-limited delegation 46 * is also performed for calls to {@link Object#equals}, {@link Object#hashCode}, and {@link 49 * <p>If the target method call finishes before the limit is reached, the return value or 50 * exception is propagated to the caller exactly as-is. If, on the other hand, the time limit is 54 * <p>It is important to note that the primary purpose of the proxy object is to return control to 55 * the caller when the timeout elapses; aborting the target method call is of secondary concern. 56 * The particular nature and strength of the guarantees made by the proxy is [all …]
|
/aosp_15_r20/hardware/google/gfxstream/guest/android-emu/aemu/base/fit/ |
D | FunctionInternal.h | 7 // http://www.apache.org/licenses/LICENSE-2.0 10 // distributed under the License is distributed on an "AS IS" BASIS, 16 // Use of this source code is governed by a BSD-style license that can be 45 template <typename Callable, bool is_inline, bool is_shared, typename Result, typename... Args> 83 template <typename Callable, typename Result, typename... Args> 84 struct target<Callable, 92 new (bits) Callable(std::forward<Callable_>(target)); 95 auto& target = *static_cast<Callable*>(bits); 99 auto& from_target = *static_cast<Callable*>(from_bits); 100 new (to_bits) Callable(std::move(from_target)); [all …]
|
D | Function.h | 7 // http://www.apache.org/licenses/LICENSE-2.0 10 // distributed under the License is distributed on an "AS IS" BASIS, 16 // Use of this source code is governed by a BSD-style license that can be 39 // A |fit::Function| is a move-only polymorphic function wrapper. 42 // "run-once" semantics (such as callbacks shared with timeouts, or for 46 // |fit::Function<T>| behaves like |std::function<T>| except that it is 47 // move-only instead of copyable, so it can hold targets that cannot be copied, 48 // such as mutable lambdas, and immutable lambdas that capture move-only 53 // any heap allocation. Larger callable objects will be moved to the heap as 61 // |T| is the function's signature. e.g. void(int, std::string). [all …]
|
/aosp_15_r20/external/pigweed/third_party/fuchsia/repo/sdk/lib/fit/include/lib/fit/internal/ |
H A D | function.h | 2 // Use of this source code is governed by a BSD-style license that can be 27 // Rounds the first argument up to a non-zero multiple of the second argument. 29 return value == 0 ? multiple : (value + multiple - 1) / multiple * multiple; in RoundUpToMultiple() 33 // instantiated with an inline size that is a non-zero multiple of the word size. 36 // target_ops is the vtable for the function_base class. The base_target_ops struct holds functions 38 // The derived target_ops template that adds the signature-specific invoke method. 71 template <typename Callable, bool is_inline, bool is_shared, typename Allocator, typename Result, 83 // All function_base instantiations, regardless of callable type, use the same 116 // for all callable types of a particular size to reduce code size. 122 template <typename Callable, typename Allocator, typename Result, typename... Args> [all …]
|
/aosp_15_r20/external/python/cpython3/Doc/c-api/ |
D | call.rst | 12 ---------------------- 14 Instances of classes that set :c:member:`~PyTypeObject.tp_call` are callable. 15 The signature of the slot is:: 17 PyObject *tp_call(PyObject *callable, PyObject *args, PyObject *kwargs); 19 A call is made using a tuple for the positional arguments 21 ``callable(*args, **kwargs)`` in Python code. 22 *args* must be non-NULL (use an empty tuple if there are no arguments) 25 This convention is not only used by *tp_call*: 30 :ref:`call API <capi-call>`. 36 ----------------------- [all …]
|
/aosp_15_r20/out/soong/.intermediates/libcore/core_oj_api_files/gen/19/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | Executors.java | 4 * This code is free software; you can redistribute it and/or modify it 10 * This code is distributed in the hope that it will be useful, but WITHOUT 13 * version 2 for more details (a copy is included in the LICENSE file that 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 26 * This file is available under and governed by the GNU General Public 31 * Written by Doug Lea with assistance from members of JCP JSR-166 53 // BEGIN android-note 55 // END android-note 60 * ThreadFactory}, and {@link Callable} classes defined in this 69 * disables reconfiguration by making implementation-specific methods [all …]
|
/aosp_15_r20/out/soong/.intermediates/libcore/core_oj_api_files/gen/gensrcs/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | Executors.java | 4 * This code is free software; you can redistribute it and/or modify it 10 * This code is distributed in the hope that it will be useful, but WITHOUT 13 * version 2 for more details (a copy is included in the LICENSE file that 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 26 * This file is available under and governed by the GNU General Public 31 * Written by Doug Lea with assistance from members of JCP JSR-166 53 // BEGIN android-note 55 // END android-note 60 * ThreadFactory}, and {@link Callable} classes defined in this 69 * disables reconfiguration by making implementation-specific methods [all …]
|
/aosp_15_r20/libcore/ojluni/src/main/java/java/util/concurrent/ |
H A D | Executors.java | 4 * This code is free software; you can redistribute it and/or modify it 10 * This code is distributed in the hope that it will be useful, but WITHOUT 13 * version 2 for more details (a copy is included in the LICENSE file that 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 26 * This file is available under and governed by the GNU General Public 31 * Written by Doug Lea with assistance from members of JCP JSR-166 53 // BEGIN android-note 55 // END android-note 60 * ThreadFactory}, and {@link Callable} classes defined in this 69 * disables reconfiguration by making implementation-specific methods [all …]
|
/aosp_15_r20/external/cronet/base/test/android/javatests/src/org/chromium/base/test/util/ |
H A D | CriteriaHelper.java | 2 // Use of this source code is governed by a BSD-style license that can be 15 import java.util.concurrent.Callable; 35 * CriteriaHelper.pollUiThread(() -> { 39 * getActivity().getAppMenuHandler().isAppMenuShowing(), Matchers.is(true)); 52 * CriteriaHelper.pollUiThread(() -> getActivity().getAppMenuHandler().isAppMenuShowing(), 73 * This evaluates the Criteria on the Instrumentation thread, which more often than not is not 95 // Espresso catches, wraps, and re-throws the exception we want the CriteriaHelper in pollThreadInternal() 131 // and the criteria is not satisfied, the while loop will run again. in sleepThread() 141 () -> { in nestThread() 165 * This evaluates the Runnable on the test thread, which more often than not is not correct [all …]
|
/aosp_15_r20/external/pytorch/torch/fx/passes/ |
H A D | pass_manager.py | 1 # mypy: allow-untyped-defs 4 from typing import Callable, List, Optional 20 def inplace_wrapper(fn: Callable) -> Callable: argument 26 fn (Callable[Object, Any]) 29 wrapped_fn (Callable[Object, Object]) 39 def log_hook(fn: Callable, level=logging.INFO) -> Callable: argument 41 Logs callable output. 43 This is useful for logging output of passes. Note inplace_wrapper replaces 49 def my_pass(d: Dict) -> bool: 64 fn (Callable[Type1, Type2]) [all …]
|
/aosp_15_r20/libcore/luni/src/test/java/libcore/java/lang/ |
H A D | LambdaImplementationTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 11 * distributed under the License is distributed on an "AS IS" BASIS, 35 import java.util.concurrent.Callable; 42 Callable<String> r1 = () -> "Hello World"; in testNonCapturingLambda() 44 assertLambdaImplementsInterfaces(r1, Callable.class); in testNonCapturingLambda() 45 assertLambdaMethodCharacteristics(r1, Callable.class); in testNonCapturingLambda() 49 List<Callable<String>> callables = new ArrayList<>(); in testNonCapturingLambda() 51 callables.add(() -> "Hello World"); in testNonCapturingLambda() 85 Callable<String> r1 = LambdaImplementationTest::staticMethod; in testStaticMethodReferenceLambda() 87 assertLambdaImplementsInterfaces(r1, Callable.class); in testStaticMethodReferenceLambda() [all …]
|
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r536225/python3/lib/python3.11/site-packages/pip/_internal/cli/ |
D | cmdoptions.py | 4 The principle here is to define options once, but *not* instantiate them 11 # mypy: strict-optional=False 20 from typing import Any, Callable, Dict, Optional, Tuple 36 def raise_option_error(parser: OptionParser, option: Option, msg: str) -> None: 50 def make_option_group(group: Dict[str, Any], parser: ConfigOptionParser) -> OptionGroup: 53 group -- assumed to be dict with 'name' and 'options' keys 54 parser -- an optparse Parser 62 def check_dist_restriction(options: Values, check_target: bool = False) -> None: 66 :param check_target: Whether or not to check if --target is being used. 83 # source distributions and dist-specific wheels, as they are not [all …]
|
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r522817/python3/lib/python3.11/site-packages/pip/_internal/cli/ |
D | cmdoptions.py | 4 The principle here is to define options once, but *not* instantiate them 11 # mypy: strict-optional=False 20 from typing import Any, Callable, Dict, Optional, Tuple 36 def raise_option_error(parser: OptionParser, option: Option, msg: str) -> None: 50 def make_option_group(group: Dict[str, Any], parser: ConfigOptionParser) -> OptionGroup: 53 group -- assumed to be dict with 'name' and 'options' keys 54 parser -- an optparse Parser 62 def check_dist_restriction(options: Values, check_target: bool = False) -> None: 66 :param check_target: Whether or not to check if --target is being used. 83 # source distributions and dist-specific wheels, as they are not [all …]
|
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r530567/python3/lib/python3.11/site-packages/pip/_internal/cli/ |
D | cmdoptions.py | 4 The principle here is to define options once, but *not* instantiate them 11 # mypy: strict-optional=False 20 from typing import Any, Callable, Dict, Optional, Tuple 36 def raise_option_error(parser: OptionParser, option: Option, msg: str) -> None: 50 def make_option_group(group: Dict[str, Any], parser: ConfigOptionParser) -> OptionGroup: 53 group -- assumed to be dict with 'name' and 'options' keys 54 parser -- an optparse Parser 62 def check_dist_restriction(options: Values, check_target: bool = False) -> None: 66 :param check_target: Whether or not to check if --target is being used. 83 # source distributions and dist-specific wheels, as they are not [all …]
|
/aosp_15_r20/prebuilts/clang/host/linux-x86/clang-r530567b/python3/lib/python3.11/site-packages/pip/_internal/cli/ |
D | cmdoptions.py | 4 The principle here is to define options once, but *not* instantiate them 11 # mypy: strict-optional=False 20 from typing import Any, Callable, Dict, Optional, Tuple 36 def raise_option_error(parser: OptionParser, option: Option, msg: str) -> None: 50 def make_option_group(group: Dict[str, Any], parser: ConfigOptionParser) -> OptionGroup: 53 group -- assumed to be dict with 'name' and 'options' keys 54 parser -- an optparse Parser 62 def check_dist_restriction(options: Values, check_target: bool = False) -> None: 66 :param check_target: Whether or not to check if --target is being used. 83 # source distributions and dist-specific wheels, as they are not [all …]
|
/aosp_15_r20/external/pytorch/torch/fx/passes/infra/ |
H A D | pass_manager.py | 1 # mypy: allow-untyped-defs 6 from typing import Callable, Dict, List 19 def pass_result_wrapper(fn: Callable) -> Callable: argument 26 fn (Callable[Module, Any]) 29 wrapped_fn (Callable[Module, PassResult]) 31 if fn is None: 37 if res is None: 50 constraint: Callable[[Callable, Callable], bool], passes: List[Callable] argument 51 ) -> None: 63 passes: List[Callable], constraints: List[Callable] argument [all …]
|
/aosp_15_r20/external/guice/extensions/servlet/src/com/google/inject/servlet/ |
H A D | ServletScopes.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 11 * distributed under the License is distributed on an "AS IS" BASIS, 31 import java.util.concurrent.Callable; 48 * A threadlocal scope map for non-http request scopes. The {@link #REQUEST} scope falls back to 49 * this scope map if no http request is available, and requires {@link #scopeRequest} to be called 67 /** Keys bound in request-scope which are handled directly by GuiceFilter. */ in scope() 77 // request is in progress. in scope() 82 // a reference to it, and it is only available via a threadlocal. in scope() 96 // Store a sentinel for provider-given null values. in scope() 103 // exception is thrown. in scope() [all …]
|
/aosp_15_r20/external/google-cloud-java/java-monitoring/google-cloud-monitoring/src/test/java/com/google/cloud/monitoring/v3/ |
H A D | ITVPCServiceControlTest.java | 8 * https://www.apache.org/licenses/LICENSE-2.0 11 * distributed under the License is distributed on an "AS IS" BASIS, 17 // DO NOT MODIFY! THIS FILE IS AUTO-GENERATED. 18 // This file is auto-generated on 28 Jan 20 00:11 UTC. 34 import java.util.concurrent.Callable; 51 private static Exception getError(Callable callable) { in getError() argument 53 callable.call(); in getError() 61 private static void doTest(Callable delayedInside, Callable delayedOutside) { in doTest() 67 && e.getMessage().contains("Request is prohibited by organization's policy")); in doTest() 71 && e.getMessage().contains("Request is prohibited by organization's policy")); in doTest() [all …]
|
/aosp_15_r20/external/pigweed/third_party/fuchsia/repo/sdk/lib/fit/include/lib/fit/ |
H A D | function.h | 2 // Use of this source code is governed by a BSD-style license that can be 38 // The default allocator used for allocating callables on the heap. Its `value_type` is irrelevant, 42 // A |fit::function| is a move-only polymorphic function wrapper. 45 // "run-once" semantics (such as callbacks shared with timeouts, or for 49 // |fit::function<T>| behaves like |std::function<T>| except that it is 50 // move-only instead of copyable, so it can hold targets that cannot be copied, 51 // such as mutable lambdas, and immutable lambdas that capture move-only 55 // the function object without incurring any heap allocation. Larger callable 56 // objects will be moved to the heap as required. |inline_target_size| is 64 // |T| is the function's signature. e.g. void(int, std::string). [all …]
|
/aosp_15_r20/external/pytorch/torch/ao/quantization/ |
H A D | quantization_mappings.py | 2 from typing import Any, Callable, Dict, Optional, Set, Union 57 DEFAULT_REFERENCE_STATIC_QUANT_MODULE_MAPPINGS: Dict[Callable, Any] = { 76 DEFAULT_STATIC_QUANT_MODULE_MAPPINGS: Dict[Callable, Any] = { 133 DEFAULT_QAT_MODULE_MAPPINGS: Dict[Callable, Any] = { 152 DEFAULT_DYNAMIC_QUANT_MODULE_MAPPINGS: Dict[Callable, Any] = { 165 # accuracy is poor compared to other dynamic ops 175 _INCLUDE_QCONFIG_PROPAGATE_LIST: Set[Callable] = { 181 DEFAULT_FLOAT_TO_QUANTIZED_OPERATOR_MAPPINGS: Dict[Union[Callable, str], Callable] = { 191 DEFAULT_MODULE_TO_ACT_POST_PROCESS: Dict[Callable, Callable] = { 199 DEFAULT_STATIC_SPARSE_QUANT_MODULE_MAPPINGS: Dict[Callable, Any] = { [all …]
|