/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 …]
|
D | TMatHelpers.h | 82 typedef typename MATRIX::value_type T; in gaussJordanInverse() typedef 90 T t = std::abs(tmp[i][i]); in gaussJordanInverse() 92 const T t2 = std::abs(tmp[j][i]); in gaussJordanInverse() 105 const T denom(tmp[i][i]); in gaussJordanInverse() 114 const T d = tmp[j][i]; in gaussJordanInverse() 131 typedef typename MATRIX::value_type T; in fastInverse2() typedef 145 const T a = x[0][0]; in fastInverse2() 146 const T c = x[0][1]; in fastInverse2() 147 const T b = x[1][0]; in fastInverse2() 148 const T d = x[1][1]; in fastInverse2() [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/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 | 95 template<typename T, typename ...Args> 96 inline static void emplace(size_t totalSize, T *addr, Args&&... args) { in emplace() 97 new(addr)T(std::forward<Args>(args)...); in emplace() 99 constexpr size_t size = sizeof(T); in emplace() 111 template<typename T> 112 inline static void del(T *addr) { in del() 113 addr->~T(); in del() 161 typename T, typename ...Args, 162 typename=typename std::enable_if<is_one_of<T, void, Ts...>::value>::type> 165 sizeof(_type), reinterpret_cast<T*>(&mValue), std::forward<Args>(args)...); in emplace() [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/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/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 | 51 public static @NonNull <T> List<T> filter(@Nullable List<T> list, in filter() 52 java.util.function.Predicate<? super T> predicate) { in filter() 53 ArrayList<T> result = null; in filter() 55 final T item = list.get(i); in filter() 66 public static @NonNull <T> Set<T> filter(@Nullable Set<T> set, in filter() 67 java.util.function.Predicate<? super T> predicate) { in filter() 69 ArraySet<T> result = null; in filter() 71 ArraySet<T> arraySet = (ArraySet<T>) set; in filter() 74 final T item = arraySet.valueAt(i); in filter() 80 for (T item : set) { in filter() [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/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/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/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 …]
|
D | C2ParamDef.h | 126 template<typename T, typename V=void> 217 (_Type::PARAM_TYPE & T::Index::DIR_UNDEFINED) != T::Index::DIR_UNDEFINED); \ 310 template<typename T, typename S, int ParamIndex=S::CORE_INDEX, class Flex=void> 311 struct C2_HIDE C2GlobalParam : public T, public S, 312 public _C2StructCheck<S, ParamIndex, T::PARAM_KIND | T::Type::DIR_GLOBAL> { 315 typedef C2GlobalParam<T, S, ParamIndex> _Type; 320 … inline C2GlobalParam(const Args(&... args)) : T(sizeof(_Type), _Type::PARAM_TYPE), S(args...) { } 340 template<typename T, typename S, int ParamIndex> 341 struct C2_HIDE C2GlobalParam<T, S, ParamIndex, IF_FLEXIBLE(S)> 342 : public T, public _C2FlexStructCheck<S, ParamIndex, T::PARAM_KIND | T::Type::DIR_GLOBAL> { [all …]
|
/frameworks/native/include/binder/ |
D | Parcel.h | 46 template <typename T> class Flattenable; 47 template <typename T> class LightFlattenable; 182 …template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying… 183 status_t writeEnumVector(const std::vector<T>& val); 184 …template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying… 185 status_t writeEnumVector(const std::optional<std::vector<T>>& val); 186 …template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying… 187 status_t writeEnumVector(const std::unique_ptr<std::vector<T>>& val); 189 …template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlyin… 190 status_t writeEnumVector(const std::vector<T>& val); [all …]
|
/frameworks/native/libs/binder/include/binder/ |
D | Parcel.h | 46 template <typename T> class Flattenable; 47 template <typename T> class LightFlattenable; 182 …template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying… 183 status_t writeEnumVector(const std::vector<T>& val); 184 …template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying… 185 status_t writeEnumVector(const std::optional<std::vector<T>>& val); 186 …template<typename T, std::enable_if_t<std::is_enum_v<T> && std::is_same_v<typename std::underlying… 187 status_t writeEnumVector(const std::unique_ptr<std::vector<T>>& val); 189 …template<typename T, std::enable_if_t<std::is_enum_v<T> && !std::is_same_v<typename std::underlyin… 190 status_t writeEnumVector(const std::vector<T>& val); [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 …]
|