/frameworks/av/media/codec2/vndk/include/util/ |
D | C2InterfaceUtils.h | 32 template<typename T> 34 typedef T ValueType; 36 return os << p.ref<T>(); in put() 57 template<typename T> 59 typedef typename _C2FieldValueHelper<T>::ValueType ValueType; 62 constexpr static T MIN_VALUE = std::numeric_limits<T>::min(); 63 constexpr static T MAX_VALUE = std::numeric_limits<T>::max(); 64 constexpr static T MIN_STEP = std::is_floating_point<T>::value ? 0 : 1; 73 inline static constexpr C2SupportedRange<T> None() { 80 inline static constexpr C2SupportedRange<T> Any() { [all …]
|
/frameworks/base/tools/aapt2/util/ |
D | Maybe.h | 34 template <typename T> 67 Maybe(const T& value); // NOLINT(google-explicit-constructor) 72 Maybe(T&& value); // NOLINT(google-explicit-constructor) 84 T& value(); 90 const T& value() const; 92 T value_or_default(const T& def) const; 108 typename std::aligned_storage<sizeof(T), alignof(T)>::type storage_; 111 template <typename T> 112 Maybe<T>::Maybe() : nothing_(true) {} in Maybe() 114 template <typename T> [all …]
|
/frameworks/native/libs/math/include/math/ |
D | TQuatHelpers.h | 50 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 …]
|
D | TVecHelpers.h | 55 template <template<typename T> class VECTOR, typename T> 62 VECTOR<T>& operator +=(const VECTOR<OTHER>& v) { 63 VECTOR<T>& lhs = static_cast<VECTOR<T>&>(*this); 70 VECTOR<T>& operator -=(const VECTOR<OTHER>& v) { 71 VECTOR<T>& lhs = static_cast<VECTOR<T>&>(*this); 83 VECTOR<T>& operator +=(const VECTOR<T>& v) { 84 VECTOR<T>& lhs = static_cast<VECTOR<T>&>(*this); 90 VECTOR<T>& operator -=(const VECTOR<T>& v) { 91 VECTOR<T>& lhs = static_cast<VECTOR<T>&>(*this); 110 friend inline constexpr VECTOR<T> PURE operator +(VECTOR<T> lv, const VECTOR<RT>& rv) { [all …]
|
D | scalar.h | 24 template<typename T> 25 static constexpr T saturate(T v) noexcept { in saturate() 26 return T(std::min(T(1), std::max(T(0), v))); in saturate() 29 template<typename T> 30 static constexpr T clamp(T v, T min, T max) noexcept { in clamp() 31 return T(std::min(max, std::max(min, v))); in clamp() 34 template<typename T> 35 static constexpr T mix(T x, T y, T a) noexcept { in mix() 36 return x * (T(1) - a) + y * a; in mix() 39 template<typename T> [all …]
|
/frameworks/av/media/libstagefright/foundation/include/media/stagefright/foundation/ |
D | AUtils.h | 24 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 …]
|
D | TypeTraits.h | 36 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 …]
|
D | AData.h | 99 template<typename T, typename ...Args> 100 inline static void NO_CFI emplace(size_t totalSize, T *addr, Args&&... args) { in emplace() 101 new(addr)T(std::forward<Args>(args)...); in emplace() 103 constexpr size_t size = sizeof(T); in emplace() 115 template<typename T> 116 inline static void del(T *addr) { in del() 117 addr->~T(); in del() 165 typename T, typename ...Args, 166 typename=typename std::enable_if<is_one_of<T, void, Ts...>::value>::type> 169 sizeof(_type), reinterpret_cast<T*>(&mValue), std::forward<Args>(args)...); in emplace() [all …]
|
/frameworks/native/services/sensorservice/ |
D | RingBuffer.h | 35 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/av/media/libmedia/include/media/ |
D | RingBuffer.h | 35 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/av/media/libeffects/loudness/common/core/ |
D | byte_swapper.h | 40 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/ |
D | Result.h | 49 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/ |
D | numeric.h | 27 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/ |
D | StrongPointer.h | 34 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/core/java/com/android/internal/util/ |
D | CollectionUtils.java | 55 public static @NonNull <T> List<T> filter(@Nullable List<T> list, in filter() 56 java.util.function.Predicate<? super T> predicate) { in filter() 57 ArrayList<T> result = null; in filter() 59 final T item = list.get(i); in filter() 70 public static @NonNull <T> Set<T> filter(@Nullable Set<T> set, in filter() 71 java.util.function.Predicate<? super T> predicate) { in filter() 73 ArraySet<T> result = null; in filter() 75 ArraySet<T> arraySet = (ArraySet<T>) set; in filter() 78 final T item = arraySet.valueAt(i); in filter() 84 for (T item : set) { in filter() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | ExtensionController.java | 29 <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/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/ |
D | CameraErrorCollector.java | 91 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/native/services/surfaceflinger/Scheduler/ |
D | StrongTyping.h | 20 template <typename T, template <typename> class AbilityType> 22 T& base() { return static_cast<T&>(*this); } in base() 23 T const& base() const { return static_cast<T const&>(*this); } in base() 26 template <typename T> 27 struct Add : Ability<T, Add> { 28 inline T operator+(T const& other) const { return T(this->base().value() + other.value()); } 29 inline T& operator++() { 33 inline T operator++(int) { 34 T tmp(this->base()); 38 inline T& operator+=(T const& other) { [all …]
|
/frameworks/base/media/mca/filterpacks/native/base/ |
D | vec_types.h | 23 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/av/media/libmediatranscoding/include/media/ |
D | AdjustableMaxPriorityQueue.h | 39 template <class T, class Comparator = std::less<T>> 42 typedef typename std::vector<T>::iterator iterator; 43 typedef typename std::vector<T>::const_iterator const_iterator; 54 const T& top() const; 67 T consume_top(); 70 bool push(const T& item) { return pushInternal(item); } in push() 73 bool push(T&& item) { return pushInternal(std::move(item)); } in push() 105 const std::vector<T>& getStorage() const { return mHeap; }; in getStorage() 108 std::vector<T> mHeap; 115 template <class T, class Comparator> [all …]
|
/frameworks/native/libs/binder/include/binder/ |
D | Parcel.h | 46 template <typename T> class Flattenable; 47 template <typename T> class LightFlattenable; 167 …template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying… 168 status_t writeEnumVector(const std::vector<T>& val); 169 …template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying… 170 status_t writeEnumVector(const std::unique_ptr<std::vector<T>>& val); 172 …template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlyin… 173 status_t writeEnumVector(const std::vector<T>& val); 174 …template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlyin… 175 status_t writeEnumVector(const std::unique_ptr<std::vector<T>>& val); [all …]
|
/frameworks/native/include/binder/ |
D | Parcel.h | 46 template <typename T> class Flattenable; 47 template <typename T> class LightFlattenable; 167 …template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying… 168 status_t writeEnumVector(const std::vector<T>& val); 169 …template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying… 170 status_t writeEnumVector(const std::unique_ptr<std::vector<T>>& val); 172 …template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlyin… 173 status_t writeEnumVector(const std::vector<T>& val); 174 …template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlyin… 175 status_t writeEnumVector(const std::unique_ptr<std::vector<T>>& val); [all …]
|
/frameworks/av/media/codec2/core/include/ |
D | C2.h | 189 template<typename T, typename B> 197 template<typename T> 201 inline static constexpr T get(const U &value) { in get() 202 return T(value); in get() 205 template<typename U, typename E=typename std::enable_if<(sizeof(U) >= sizeof(T))>::type> 207 inline static constexpr T get(const c2_cntr_t<U, void> &value) { in get() 208 return T(value.mValue); in get() 235 template<typename T, typename B=typename std::enable_if<std::is_integral<T>::value && std::is_unsig… 237 using compat = _c2_cntr_compat_helper<T>; 239 T mValue; [all …]
|
/frameworks/native/libs/vr/libpdx/private/pdx/rpc/ |
D | variant.h | 18 template <typename T> 41 template <typename T, typename U> 42 struct IsConstructible<T, U> 44 std::is_constructible<T, U>::value && 45 !(std::is_same<std::decay_t<T>, bool>::value && 47 template <typename T, typename... Args> 48 struct IsConstructible<T, Args...> : std::is_constructible<T, Args...> {}; 51 template <typename R, typename T, typename... Args> 53 typename std::enable_if<IsConstructible<T, Args...>::value, R>::type; 55 template <typename R, typename T, typename... Args> [all …]
|
/frameworks/base/telephony/common/com/android/internal/telephony/util/ |
D | ArrayUtils.java | 40 public static <T> T[] appendElement(Class<T> kind, @Nullable T[] array, T element) { in appendElement() 55 public static <T> T[] appendElement(Class<T> kind, @Nullable T[] array, T element, in appendElement() 57 final T[] result; in appendElement() 62 result = (T[]) Array.newInstance(kind, end + 1); in appendElement() 66 result = (T[]) Array.newInstance(kind, 1); in appendElement() 82 public static <T> T[] concatElements(Class<T> kind, @Nullable T[]... arrays) { in concatElements() 88 for (T[] item : arrays) { in concatElements() 101 final T[] all = (T[]) Array.newInstance(kind, totalLength); in concatElements() 103 for (T[] item : arrays) { in concatElements() 113 private static @NonNull <T> T[] createEmptyArray(Class<T> kind) { in createEmptyArray() [all …]
|