Home
last modified time | relevance | path

Searched refs:T (Results 1 – 25 of 1704) sorted by relevance

12345678910>>...69

/frameworks/base/libs/dream/lowlight/tests/src/com/android/dream/lowlight/utils/
DKotlinMockitoHelpers.kt16 fun <T> eq(obj: T): T = Mockito.eq<T>(obj) in eq()
24 fun <T> any(type: Class<T>): T = Mockito.any<T>(type) in eq()
25 inline fun <reified T> any(): T = any(T::class.java) in eq()
33 fun <T> argThat(matcher: ArgumentMatcher<T>): T = Mockito.argThat(matcher) in eq()
38 inline fun <reified T> nullable(): T? = Mockito.nullable(T::class.java) in eq()
46 fun <T> capture(argumentCaptor: ArgumentCaptor<T>): T = argumentCaptor.capture() in eq()
53 inline fun <reified T : Any> argumentCaptor(): ArgumentCaptor<T> = in eq()
54 ArgumentCaptor.forClass(T::class.java) in eq()
63 inline fun <reified T : Any> mock(apply: T.() -> Unit = {}): T = Mockito.mock(T::class.java) in eq()
71 fun <T> whenever(methodCall: T): OngoingStubbing<T> = `when`(methodCall) in whenever()
[all …]
/frameworks/av/media/codec2/vndk/include/util/
DC2InterfaceUtils.h33 template<typename T>
35 typedef T ValueType;
37 return os << p.ref<T>(); in put()
58 template<typename T>
60 typedef typename _C2FieldValueHelper<T>::ValueType ValueType;
63 constexpr static T MIN_VALUE = std::numeric_limits<T>::min();
64 constexpr static T MAX_VALUE = std::numeric_limits<T>::max();
65 constexpr static T MIN_STEP = std::is_floating_point<T>::value ? 0 : 1;
74 inline static constexpr C2SupportedRange<T> None() {
81 inline static constexpr C2SupportedRange<T> Any() {
[all …]
/frameworks/native/libs/math/include/math/
DTQuatHelpers.h50 template <template<typename T> class QUATERNION, typename T>
57 QUATERNION<T>& operator *= (const QUATERNION<OTHER>& r) {
58 QUATERNION<T>& q = static_cast<QUATERNION<T>&>(*this);
65 QUATERNION<T>& operator *= (T v) {
66 QUATERNION<T>& lhs = static_cast<QUATERNION<T>&>(*this);
67 for (size_t i = 0; i < QUATERNION<T>::size(); i++) {
72 QUATERNION<T>& operator /= (T v) {
73 QUATERNION<T>& lhs = static_cast<QUATERNION<T>&>(*this);
74 for (size_t i = 0; i < QUATERNION<T>::size(); i++) {
93 constexpr QUATERNION<T> PURE operator *(const QUATERNION<T>& q, const QUATERNION<RT>& r) {
[all …]
DTVecHelpers.h57 template <template<typename T> class VECTOR, typename T>
64 VECTOR<T>& operator +=(const VECTOR<OTHER>& v) {
65 VECTOR<T>& lhs = static_cast<VECTOR<T>&>(*this);
72 VECTOR<T>& operator -=(const VECTOR<OTHER>& v) {
73 VECTOR<T>& lhs = static_cast<VECTOR<T>&>(*this);
85 VECTOR<T>& operator +=(const VECTOR<T>& v) {
86 VECTOR<T>& lhs = static_cast<VECTOR<T>&>(*this);
92 VECTOR<T>& operator -=(const VECTOR<T>& v) {
93 VECTOR<T>& lhs = static_cast<VECTOR<T>&>(*this);
112 friend inline constexpr VECTOR<T> PURE operator +(VECTOR<T> lv, const VECTOR<RT>& rv) {
[all …]
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/util/mockito/
DKotlinMockitoHelpers.kt46 fun <T> eq(obj: T): T = Mockito.eq<T>(obj) ?: obj in eq()
59 fun <T> any(type: Class<T>): T = Mockito.any<T>(type) in eq()
66 inline fun <reified T> any(): T = any(T::class.java) in eq()
79 fun <T> argThat(matcher: ArgumentMatcher<T>): T = Mockito.argThat(matcher) in eq()
91 inline fun <reified T> nullable(): T? = Mockito.nullable(T::class.java) in eq()
106 fun <T> capture(argumentCaptor: ArgumentCaptor<T>): T = argumentCaptor.capture() in eq()
120 inline fun <reified T : Any> argumentCaptor(): ArgumentCaptor<T> = in eq()
121 ArgumentCaptor.forClass(T::class.java) in eq()
147 inline fun <reified T : Any> mock(settings: MockSettings? = null, apply: T.() -> Unit = {}): T = in eq()
148 Mockito.mock(T::class.java, settings ?: withSettings()).apply(apply)
[all …]
/frameworks/av/media/module/foundation/include/media/stagefright/foundation/
DAUtils.h24 template<class T>
25 inline static const T divRound(const T &num, const T &den) { in divRound()
34 template<class T>
35 inline static const T divUp(const T &num, const T &den) { in divUp()
44 template<class T, class U>
45 inline static const T align(const T &num, const U &den) { in align()
46 return (num + (T)(den - 1)) & (T)~(den - 1); in align()
49 template<class T>
50 inline static T abs(const T &a) { in abs()
54 template<class T>
[all …]
DTypeTraits.h36 template<typename T>
38 : std::integral_constant<bool, std::is_integral<T>::value || std::is_enum<T>::value> { };
48 template<typename T,
49 typename U=typename std::enable_if<is_integral_or_enum<T>::value>::type,
50 bool=std::is_enum<T>::value,
51 bool=std::is_integral<T>::value>
53 static_assert(!std::is_enum<T>::value, "T should not be enum here");
54 static_assert(!std::is_integral<T>::value, "T should not be integral here");
59 template<typename T, typename U>
60 struct HIDE underlying_integral_type<T, U, true, false> {
[all …]
/frameworks/av/media/libmedia/include/media/
DRingBuffer.h35 template <class T>
47 class iterator : public std::iterator<std::forward_iterator_tag, T> {
49 iterator(T* ptr, size_t size, size_t pos, size_t ctr);
59 T& operator*();
61 T* operator->();
64 T* mPtr;
73 class const_iterator : public std::iterator<std::forward_iterator_tag, T> {
75 const_iterator(const T* ptr, size_t size, size_t pos, size_t ctr);
85 const T& operator*();
87 const T* operator->();
[all …]
/frameworks/native/services/sensorservice/
DRingBuffer.h35 template <class T>
47 class iterator : public std::iterator<std::forward_iterator_tag, T> {
49 iterator(T* ptr, size_t size, size_t pos, size_t ctr);
59 T& operator*();
61 T* operator->();
64 T* mPtr;
73 class const_iterator : public std::iterator<std::forward_iterator_tag, T> {
75 const_iterator(const T* ptr, size_t size, size_t pos, size_t ctr);
85 const T& operator*();
87 const T* operator->();
[all …]
/frameworks/base/services/permission/java/com/android/server/permission/access/immutable/
DIndexedSetExtensions.kt22 fun <T> indexedSetOf(vararg elements: T): IndexedSet<T> = in <lambda>()
25 inline fun <T> IndexedSet<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean { in <lambda>()
34 inline fun <T> IndexedSet<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean { in anyIndexed()
43 inline fun <T> IndexedSet<T>.forEachIndexed(action: (Int, T) -> Unit) { in forEachIndexed()
49 inline fun <T> IndexedSet<T>.forEachReversedIndexed(action: (Int, T) -> Unit) { in forEachReversedIndexed()
55 inline val <T> IndexedSet<T>.lastIndex: Int
58 operator fun <T> IndexedSet<T>.minus(element: T): MutableIndexedSet<T> = in minus()
61 inline fun <T> IndexedSet<T>.noneIndexed(predicate: (Int, T) -> Boolean): Boolean { in noneIndexed()
70 operator fun <T> IndexedSet<T>.plus(element: T): MutableIndexedSet<T> = in plus()
74 inline operator fun <T> MutableIndexedSet<T>.minusAssign(element: T) { in minusAssign()
[all …]
DIndexedListSetExtensions.kt19 inline fun <T> IndexedListSet<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean { in <lambda>()
28 inline fun <T> IndexedListSet<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean { in anyIndexed()
37 inline fun <T> IndexedListSet<T>.forEachIndexed(action: (Int, T) -> Unit) { in forEachIndexed()
43 inline fun <T> IndexedListSet<T>.forEachReversedIndexed(action: (Int, T) -> Unit) { in forEachReversedIndexed()
49 inline val <T> IndexedListSet<T>.lastIndex: Int
52 operator fun <T> IndexedListSet<T>.minus(element: T): MutableIndexedListSet<T> = in minus()
55 inline fun <T> IndexedListSet<T>.noneIndexed(predicate: (Int, T) -> Boolean): Boolean { in noneIndexed()
64 operator fun <T> IndexedListSet<T>.plus(element: T): MutableIndexedListSet<T> = in plus()
68 inline fun <T> IndexedListSet<T>.reduceIndexed( in reduceIndexed()
70 accumulator: (Int, Int, T) -> Int in reduceIndexed()
[all …]
DIndexedListExtensions.kt19 inline fun <T> IndexedList<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean { in <lambda>()
28 inline fun <T> IndexedList<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean { in anyIndexed()
37 inline fun <T> IndexedList<T>.forEachIndexed(action: (Int, T) -> Unit) { in forEachIndexed()
43 inline fun <T> IndexedList<T>.forEachReversedIndexed(action: (Int, T) -> Unit) { in forEachReversedIndexed()
49 inline val <T> IndexedList<T>.lastIndex: Int
52 operator fun <T> IndexedList<T>.minus(element: T): MutableIndexedList<T> = in minus()
55 inline fun <T> IndexedList<T>.noneIndexed(predicate: (Int, T) -> Boolean): Boolean { in noneIndexed()
64 operator fun <T> IndexedList<T>.plus(element: T): MutableIndexedList<T> = in plus()
68 inline fun <T> IndexedList<T>.reduceIndexed( in reduceIndexed()
70 accumulator: (Int, Int, T) -> Int in reduceIndexed()
[all …]
DIntMapExtensions.kt19 inline fun <T> IntMap<T>.allIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { in <lambda>()
28 inline fun <T> IntMap<T>.anyIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { in anyIndexed()
37 inline fun <T, R> IntMap<T>.firstNotNullOfOrNullIndexed(transform: (Int, Int, T) -> R): R? { in firstNotNullOfOrNullIndexed()
46 inline fun <T> IntMap<T>.forEachIndexed(action: (Int, Int, T) -> Unit) { in forEachIndexed()
52 inline fun <T> IntMap<T>.forEachReversedIndexed(action: (Int, Int, T) -> Unit) { in forEachReversedIndexed()
58 fun <T> IntMap<T>?.getWithDefault(key: Int, defaultValue: T): T { in getWithDefault()
64 inline val <T> IntMap<T>.lastIndex: Int
67 inline fun <T> IntMap<T>.noneIndexed(predicate: (Int, Int, T) -> Boolean): Boolean { in noneIndexed()
76 inline fun <T> MutableIntMap<T>.getOrPut(key: Int, defaultValue: () -> T): T { in getOrPut()
83 operator fun <T> MutableIntMap<T>.minusAssign(key: Int) { in minusAssign()
[all …]
/frameworks/minikin/include/minikin/
DBuffer.h62 template <typename T, size_t AlignT = sizeof(T)>
72 template <typename T, size_t align = sizeof(T)>
73 const T& read() { in read()
74 const T* data = map<T, align>(sizeof(T)); in read()
78 template <typename T, size_t align = sizeof(T)>
79 const T* map(uint32_t size) { in map()
80 static_assert(std::is_pod<T>::value, "T must be a POD"); in map()
81 mCurrent = BufferReader::align<T, align>(mCurrent); in map()
82 const T* data = reinterpret_cast<const T*>(mCurrent); in map()
87 template <typename T, size_t align = sizeof(T)>
[all …]
/frameworks/av/media/libeffects/loudness/common/core/
Dbyte_swapper.h40 template <typename T, unsigned int kValSize>
42 static T Swap(const T &val) { in Swap()
43 T new_val = val; in Swap()
54 template <typename T>
55 struct ByteSwapper<T, 1> {
56 static T Swap(const T &val) {
61 template <typename T>
62 struct ByteSwapper<T, 2> {
63 static T Swap(const T &val) {
64 T new_val;
[all …]
/frameworks/base/cmds/idmap2/include/idmap2/
DResult.h49 template <typename T>
52 Result(const T& value); // NOLINT(runtime/explicit)
53 Result(T&& value) noexcept; // NOLINT(runtime/explicit)
65 constexpr const T& operator*() const&;
66 T& operator*() &;
68 constexpr const T* operator->() const&;
69 T* operator->() &;
77 std::variant<T, Error> data_;
80 template <typename T>
81 Result<T>::Result(const T& value) : data_(std::in_place_type<T>, value) { in Result()
[all …]
/frameworks/native/libs/vr/libdvrcommon/include/private/dvr/
Dnumeric.h27 template <typename T>
28 T NormalizePeriodicRange(T x, T lo, T hi) { in NormalizePeriodicRange()
29 T range_size = hi - lo; in NormalizePeriodicRange()
46 template <typename T>
47 T NormalizeDegrees(T x, T centre = static_cast<T>(180.0)) {
48 return NormalizePeriodicRange(x, centre - static_cast<T>(180.0),
49 centre + static_cast<T>(180.0));
61 template <typename T>
62 T NormalizeRadians(T x, T centre = static_cast<T>(M_PI)) {
63 return NormalizePeriodicRange(x, centre - static_cast<T>(M_PI),
[all …]
/frameworks/rs/cpp/util/
DStrongPointer.h34 template<typename T> class wp;
39 inline bool operator _op_ (const sp<T>& o) const { \
42 inline bool operator _op_ (const T* o) const { \
53 inline bool operator _op_ (const wp<T>& o) const { \
63 template <typename T>
69 sp(T* other); // NOLINT, implicit
70 sp(const sp<T>& other);
78 sp& operator = (T* other);
79 sp& operator = (const sp<T>& other);
85 void force_set(T* other);
[all …]
/frameworks/base/services/permission/java/com/android/server/permission/access/collection/
DArraySetExtensions.kt21 fun <T> arraySetOf(vararg elements: T): ArraySet<T> = ArraySet(elements.asList()) in <lambda>()
23 inline fun <T> ArraySet<T>.allIndexed(predicate: (Int, T) -> Boolean): Boolean { in <lambda>()
32 inline fun <T> ArraySet<T>.anyIndexed(predicate: (Int, T) -> Boolean): Boolean { in anyIndexed()
41 inline fun <T> ArraySet<T>.forEachIndexed(action: (Int, T) -> Unit) { in forEachIndexed()
47 inline fun <T> ArraySet<T>.forEachReversedIndexed(action: (Int, T) -> Unit) { in forEachReversedIndexed()
53 inline val <T> ArraySet<T>.lastIndex: Int
57 inline operator fun <T> ArraySet<T>.minusAssign(value: T) { in minusAssign()
61 inline fun <T> ArraySet<T>.noneIndexed(predicate: (Int, T) -> Boolean): Boolean { in noneIndexed()
71 inline operator fun <T> ArraySet<T>.plusAssign(value: T) { in plusAssign()
75 inline fun <T> ArraySet<T>.removeAllIndexed(predicate: (Int, T) -> Boolean): Boolean { in removeAllIndexed()
[all …]
DLongSparseArrayExtensions.kt21 inline fun <T> LongSparseArray<T>.allIndexed(predicate: (Int, Long, T) -> Boolean): Boolean { in <lambda>()
30 inline fun <T> LongSparseArray<T>.anyIndexed(predicate: (Int, Long, T) -> Boolean): Boolean { in anyIndexed()
39 inline fun <T> LongSparseArray<T>.forEachIndexed(action: (Int, Long, T) -> Unit) { in forEachIndexed()
45 inline fun <T> LongSparseArray<T>.forEachReversedIndexed(action: (Int, Long, T) -> Unit) { in forEachReversedIndexed()
51 inline fun <T> LongSparseArray<T>.getOrPut(key: Long, defaultValue: () -> T): T { in getOrPut()
60 inline val <T> LongSparseArray<T>.lastIndex: Int
64 inline operator fun <T> LongSparseArray<T>.minusAssign(key: Long) { in minusAssign()
68 inline fun <T> LongSparseArray<T>.noneIndexed(predicate: (Int, Long, T) -> Boolean): Boolean { in noneIndexed()
77 inline fun <T> LongSparseArray<T>.removeAllIndexed(predicate: (Int, Long, T) -> Boolean): Boolean { in removeAllIndexed()
88 inline fun <T> LongSparseArray<T>.retainAllIndexed(predicate: (Int, Long, T) -> Boolean): Boolean { in retainAllIndexed()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DExtensionController.java29 <T> ExtensionBuilder<T> newExtension(Class<T> cls); in newExtension()
31 interface Extension<T> {
32 T get(); in get()
35 void addCallback(Consumer<T> callback); in addCallback()
40 T reload(); in reload()
50 interface ExtensionBuilder<T> {
51 ExtensionBuilder<T> withTunerFactory(TunerFactory<T> factory); in withTunerFactory()
52 <P extends T> ExtensionBuilder<T> withPlugin(Class<P> cls); in withPlugin()
53 <P extends T> ExtensionBuilder<T> withPlugin(Class<P> cls, String action); in withPlugin()
54 <P> ExtensionBuilder<T> withPlugin(Class<P> cls, String action, in withPlugin()
[all …]
/frameworks/native/services/inputflinger/tests/fuzzers/
DThreadSafeFuzzedDataProvider.h30 template <typename T>
31 std::vector<T> ConsumeBytes(size_t num_bytes) { in ConsumeBytes()
33 return FuzzedDataProvider::ConsumeBytes<T>(num_bytes); in ConsumeBytes()
36 template <typename T>
37 std::vector<T> ConsumeBytesWithTerminator(size_t num_bytes, T terminator) { in ConsumeBytesWithTerminator()
39 return FuzzedDataProvider::ConsumeBytesWithTerminator<T>(num_bytes, terminator); in ConsumeBytesWithTerminator()
42 template <typename T>
43 std::vector<T> ConsumeRemainingBytes() { in ConsumeRemainingBytes()
45 return FuzzedDataProvider::ConsumeRemainingBytes<T>(); in ConsumeRemainingBytes()
68 template <typename T>
[all …]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/
DCameraErrorCollector.java91 public <T> void checkThat(final T value, final Matcher<T> matcher) { in checkThat()
102 public <T> void checkThat(final String reason, final T value, final Matcher<T> matcher) { in checkThat()
147 public <T> boolean expectEquals(String msg, T expected, T actual) { in expectEquals()
169 public <T> boolean expectNotEquals(String msg, T expected, T actual) { in expectNotEquals()
189 public <T> boolean expectEquals(String msg, T[] expected, T[] actual) { in expectEquals()
214 public <T> boolean expectNotEquals(String msg, T[] expected, T[] actual) { in expectNotEquals()
236 public <T extends Comparable<? super T>> boolean expectGreater(String msg, T expected, in expectGreater()
237 T actual) { in expectGreater()
250 public <T extends Comparable<? super T>> boolean expectGreaterOrEqual(String msg, T expected, in expectGreaterOrEqual()
251 T actual) { in expectGreaterOrEqual()
[all …]
/frameworks/base/media/mca/filterpacks/native/base/
Dvec_types.h23 template < class T, int dim>
26 T data[dim];
28 VecBase<T,dim>& operator = (const VecBase<T, dim> &x) {
29 memcpy(data, x.data, sizeof(T)*dim);
32 T & operator [] (int i) {
36 const T & operator [] (int i) const {
40 T Length() { in Length()
44 return static_cast<T>(sqrt(sum)); in Length()
48 template < class T, int dim>
49 class Vec : public VecBase<T,dim> {
[all …]
/frameworks/base/core/java/com/android/internal/util/
DCollectionUtils.java53 public static <T> boolean contains(@Nullable Collection<T> collection, T element) { in contains()
63 public static @NonNull <T> List<T> filter(@Nullable List<T> list, in filter()
64 java.util.function.Predicate<? super T> predicate) { in filter()
65 ArrayList<T> result = null; in filter()
67 final T item = list.get(i); in filter()
78 public static @NonNull <T> Set<T> filter(@Nullable Set<T> set, in filter()
79 java.util.function.Predicate<? super T> predicate) { in filter()
81 ArraySet<T> result = null; in filter()
83 ArraySet<T> arraySet = (ArraySet<T>) set; in filter()
86 final T item = arraySet.valueAt(i); in filter()
[all …]

12345678910>>...69