Home
last modified time | relevance | path

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

12345678910>>...19

/system/core/libutils/include/utils/
DStrongPointer.h26 template<typename T> class wp;
30 template<typename T>
51 static inline sp<T> make(Args&&... args);
57 static inline sp<T> fromExisting(T* other);
64 sp(T* other); // NOLINT(implicit)
67 sp& operator=(T* other);
72 sp(const sp<T>& other);
73 sp(sp<T>&& other) noexcept;
82 static inline sp<T> cast(const sp<U>& other);
88 sp& operator = (const sp<T>& other);
[all …]
DFlattenable.h72 template<typename T>
73 static void write(void*& buffer, size_t& size, const T& value) { in write()
74 static_assert(std::is_trivially_copyable<T>::value, in write()
76 memcpy(buffer, &value, sizeof(T)); in write()
77 advance(buffer, size, sizeof(T)); in write()
81 template<typename T>
82 static void read(void const*& buffer, size_t& size, T& value) { in read()
83 static_assert(std::is_trivially_copyable<T>::value, in read()
85 memcpy(&value, buffer, sizeof(T)); in read()
86 advance(buffer, size, sizeof(T)); in read()
[all …]
DRefBase.h238 inline bool operator _op_ (const T* o) const { \
242 template<template<typename C> class comparator, typename T, typename U>
243 static inline bool _wp_compare_(T* a, U* b) { in _wp_compare_()
244 return comparator<typename std::common_type<T*, U*>::type>()(a, b); in _wp_compare_()
401 template <typename T>
413 static inline wp<T> fromExisting(T* other);
419 wp(T* other); // NOLINT(implicit)
422 wp& operator=(T* other);
427 wp(const wp<T>& other);
428 explicit wp(const sp<T>& other);
[all …]
/system/core/libutils/binder/include/utils/
DStrongPointer.h26 template<typename T> class wp;
30 template<typename T>
51 static inline sp<T> make(Args&&... args);
57 static inline sp<T> fromExisting(T* other);
64 sp(T* other); // NOLINT(implicit)
67 sp& operator=(T* other);
72 sp(const sp<T>& other);
73 sp(sp<T>&& other) noexcept;
82 static inline sp<T> cast(const sp<U>& other);
88 sp& operator = (const sp<T>& other);
[all …]
DRefBase.h238 inline bool operator _op_ (const T* o) const { \
242 template<template<typename C> class comparator, typename T, typename U>
243 static inline bool _wp_compare_(T* a, U* b) { in _wp_compare_()
244 return comparator<typename std::common_type<T*, U*>::type>()(a, b); in _wp_compare_()
401 template <typename T>
413 static inline wp<T> fromExisting(T* other);
419 wp(T* other); // NOLINT(implicit)
422 wp& operator=(T* other);
427 wp(const wp<T>& other);
428 explicit wp(const sp<T>& other);
[all …]
/system/chre/external/flatbuffers/include/flatbuffers/
Dstl_emulation.h65 template <typename T> inline T *vector_data(std::vector<T> &vector) { in vector_data()
71 template <typename T> inline const T *vector_data( in vector_data()
72 const std::vector<T> &vector) { in vector_data()
76 template <typename T, typename V>
77 inline void vector_emplace_back(std::vector<T> *vector, V &&data) { in vector_emplace_back()
88 template <typename T>
89 using numeric_limits = std::numeric_limits<T>;
91 template <typename T> class numeric_limits :
92 public std::numeric_limits<T> {};
95 template <typename T> class numeric_limits :
[all …]
Dflatbuffers.h48 template<typename T> inline bool IsTheSameAs(T e, T def) { return e == def; } in IsTheSameAs()
53 template<typename T> inline bool IsFloatTheSameAs(T e, T def) { in IsFloatTheSameAs()
67 template<typename T>
68 inline bool IsOutRange(const T &v, const T &low, const T &high) { in IsOutRange()
73 template<typename T>
74 inline bool IsInRange(const T &v, const T &low, const T &high) { in IsInRange()
80 template<typename T> struct Offset {
96 template<typename T> FLATBUFFERS_CONSTEXPR size_t AlignOf() { in AlignOf()
99 return __alignof(T); in AlignOf()
102 return __alignof__(T); in AlignOf()
[all …]
/system/logging/liblog/include/log/
Dlog_time.h43 explicit log_time(const timespec& T) in log_time()
44 : tv_sec(static_cast<uint32_t>(T.tv_sec)), tv_nsec(static_cast<uint32_t>(T.tv_nsec)) {} in log_time()
50 timespec T; in log_time() local
51 clock_gettime(id, &T); in log_time()
52 tv_sec = static_cast<uint32_t>(T.tv_sec); in log_time()
53 tv_nsec = static_cast<uint32_t>(T.tv_nsec); in log_time()
57 bool operator==(const timespec& T) const {
58 return (tv_sec == static_cast<uint32_t>(T.tv_sec)) &&
59 (tv_nsec == static_cast<uint32_t>(T.tv_nsec));
61 bool operator!=(const timespec& T) const {
[all …]
/system/media/audio_utils/include/audio_utils/
DStatistics.h51 template <typename T>
53 T mSum{};
54 T mCorrection{}; // negative low order bits of mSum.
56 constexpr KahanSum<T>() = default;
58 explicit constexpr KahanSum<T>(const T& value) in KahanSum()
63 friend constexpr KahanSum<T> operator+(KahanSum<T> lhs, const T& rhs) {
64 const T y = rhs - lhs.mCorrection;
65 const T t = lhs.mSum + y;
76 constexpr KahanSum<T>& operator+=(const T& rhs) { // takes T not KahanSum<T>
81 constexpr operator T() const { in T() function
[all …]
Dintrinsic_utils.h44 template <typename T>
49 template<typename T, size_t N>
51 T v[N];
57 template<typename T>
58 concept is_array_like = requires(T a) { in requires()
63 template <typename S, typename T>
64 inline S vconvert(const T& in) { in vconvert()
68 if constexpr (is_array_like<T>) { in vconvert()
77 for (size_t i = 0; i < T::size(); ++i) { in vconvert()
83 if constexpr (is_array_like<T>) { in vconvert()
[all …]
Dsafe_math.h81 template <typename T, typename U,
83 std::is_same<std::decay_t<T>, std::decay_t<U>>{}>>
86 auto safe_sub_overflow(const T& a, const U& b) { in safe_sub_overflow()
87 std::decay_t<T> result; in safe_sub_overflow()
94 template <typename T, typename U,
96 std::is_same<std::decay_t<T>, std::decay_t<U>>{}>>
99 auto safe_add_overflow(const T& a, const U& b) { in safe_add_overflow()
100 std::decay_t<T> result; in safe_add_overflow()
109 template <typename T>
110 requires std::is_integral_v<T>
[all …]
Dvariadic_utils.h48 template <typename T, template <typename...> class C>
53 template <typename T> using is_tuple = is_template<std::decay_t<T>, std::tuple>;
54 template <typename T> using is_pair = is_template<std::decay_t<T>, std::pair>;
57 template <typename T>
59 template <typename T, size_t N>
60 struct is_array_impl<std::array<T, N>> : std::true_type {};
61 template <typename T>
62 struct is_array : is_array_impl<std::decay_t<T>> {};
67 template <typename T> static int test(int, int[std::tuple_size<T>::value] = nullptr);
68 template <typename T> static bool test(...);
[all …]
/system/memory/libmemunreachable/
DAllocator.h37 template <typename T>
64 template <class T>
65 T* allocate() { in allocate()
66 return reinterpret_cast<T*>(allocate(sizeof(T))); in allocate()
75 template <class T>
76 using unique_ptr = std::unique_ptr<T, std::function<void(void*)>>;
78 template <class T, class... Args>
79 unique_ptr<T> make_unique(Args&&... args) { in make_unique()
81 return unique_ptr<T>(new (allocate<T>()) T(std::forward<Args>(args)...), [impl](void* ptr) { in make_unique()
82 reinterpret_cast<T*>(ptr)->~T(); in make_unique()
[all …]
DTarjan.h29 template <class T>
32 allocator::set<Node<T>*> references_in;
33 allocator::set<Node<T>*> references_out;
37 T* ptr;
39 Node(T* ptr, Allocator<Node> allocator) in Node()
42 void Edge(Node<T>* ref) { in Edge()
54 DISALLOW_COPY_AND_ASSIGN(Node<T>);
57 template <class T>
58 using Graph = allocator::vector<Node<T>*>;
60 template <class T>
[all …]
/system/gatekeeper/include/gatekeeper/
Dgatekeeper_utils.h43 template <typename T, size_t N> inline size_t array_length(const T (&)[N]) { in array_length()
56 template<typename T> struct remove_reference {typedef T type;};
57 template<typename T> struct remove_reference<T&> {typedef T type;};
58 template<typename T> struct remove_reference<T&&> {typedef T type;};
59 template<typename T>
60 using remove_reference_t = typename remove_reference<T>::type;
61 template<typename T>
62 remove_reference_t<T>&& move(T&& x) {
63 return static_cast<remove_reference_t<T>&&>(x);
66 template<typename T>
[all …]
/system/keymaster/include/keymaster/
Dmem.h32 template <typename T, size_t N> inline size_t array_size(const T (&a)[N]) { in array_size()
39 template <typename T, size_t N> inline size_t array_length(const T (&)[N]) { in array_length()
47 template <typename T> inline T* dup_array(const T* a, size_t n) { in dup_array()
48 T* dup = new (std::nothrow) T[n]; in dup_array()
60 template <typename T, size_t N> inline T* dup_array(const T (&a)[N]) { in dup_array()
73 template <typename T, size_t N> inline void copy_array(const T (&arr)[N], T* dest) { in copy_array()
83 template <typename T, size_t N> inline bool array_contains(const T (&a)[N], T val) { in array_contains()
122 template <typename T> explicit Eraser(T* t);
124 template <typename T>
125 explicit Eraser(T& t) : buf_(reinterpret_cast<uint8_t*>(&t)), size_(sizeof(t)) {} in Eraser()
[all …]
/system/libbase/include/android-base/
Dparseint.h36 template <typename T>
37 LIBBASE_ALWAYS_INLINE bool ParseUint(const char* s, T* out, T max = std::numeric_limits<T>::max(),
39 static_assert(std::is_unsigned<T>::value, "ParseUint can only be used with unsigned types");
75 *out = static_cast<T>(result);
81 template <typename T>
82 LIBBASE_ALWAYS_INLINE bool ParseUint(const std::string& s, T* out,
83 T max = std::numeric_limits<T>::max(),
88 template <typename T>
89 LIBBASE_ALWAYS_INLINE bool ParseByteCount(const char* s, T* out,
90 T max = std::numeric_limits<T>::max()) {
[all …]
Dno_destructor.h60 template <typename T>
67 new (storage_) T(std::forward<Args>(args)...); in NoDestructor()
72 explicit NoDestructor(const T& x) { new (storage_) T(x); } in NoDestructor()
73 explicit NoDestructor(T&& x) { new (storage_) T(std::move(x)); } in NoDestructor()
80 const T& operator*() const { return *get(); }
81 T& operator*() { return *get(); }
83 const T* operator->() const { return get(); }
84 T* operator->() { return get(); }
86 const T* get() const { return reinterpret_cast<const T*>(storage_); } in get()
87 T* get() { return reinterpret_cast<T*>(storage_); } in get()
[all …]
/system/nvram/messages/include/nvram/messages/
Dtype_traits.h30 template <typename T>
32 using Type = T;
34 template <typename T>
35 struct remove_const<const T> {
36 using Type = T;
39 template <typename T>
41 using Type = T;
43 template <typename T>
44 struct remove_reference<T&> {
45 using Type = T;
[all …]
/system/libfmq/include/fmq/
DAidlMessageQueue.h36 template <typename T>
56 template <typename T, typename = void>
59 template <typename T>
60 struct has_typedef_fixed_size<T, std::void_t<typename T::fixed_size>> : T::fixed_size {};
62 #define STATIC_AIDL_TYPE_CHECK(T) \
63 static_assert(has_typedef_fixed_size<T>::value == true || std::is_fundamental<T>::value || \
64 std::is_enum<T>::value, \
68 template <typename T, typename U>
70 : public MessageQueueBase<AidlMQDescriptorShim, T, FlavorTypeToValue<U>::value> {
71 STATIC_AIDL_TYPE_CHECK(T);
[all …]
/system/keymint/hal/src/
Dsecureclock.rs26 pub struct Device<T: SerializedChannel + 'static> {
27 channel: Arc<Mutex<T>>,
30 impl<T: SerializedChannel + Send> binder::Interface for Device<T> {}
32 impl<T: SerializedChannel + 'static> Device<T> {
34 pub fn new(channel: Arc<Mutex<T>>) -> Self { in new()
38 pub fn new_as_binder(channel: Arc<Mutex<T>>) -> binder::Strong<dyn ISecureClock::ISecureClock> { in new_as_binder()
46 impl<T: SerializedChannel> ChannelHalService<T> for Device<T> {
47 fn channel(&self) -> MutexGuard<T> { in channel() argument
52 impl<T: SerializedChannel> ISecureClock::ISecureClock for Device<T> {
/system/extras/simpleperf/
Dutils.h118 template <class T>
119 void MoveFromBinaryFormat(T& data, const char*& p) { in MoveFromBinaryFormat()
120 static_assert(std::is_standard_layout<T>::value, "not standard layout"); in MoveFromBinaryFormat()
121 memcpy(&data, p, sizeof(T)); in MoveFromBinaryFormat()
122 p += sizeof(T); in MoveFromBinaryFormat()
125 template <class T>
126 void MoveFromBinaryFormat(T& data, char*& p) { in MoveFromBinaryFormat()
127 static_assert(std::is_standard_layout<T>::value, "not standard layout"); in MoveFromBinaryFormat()
128 memcpy(&data, p, sizeof(T)); in MoveFromBinaryFormat()
129 p += sizeof(T); in MoveFromBinaryFormat()
[all …]
/system/authgraph/core/src/
Dlib.rs31 pub trait FallibleAllocExt<T> {
33 fn try_push(&mut self, value: T) -> Result<(), alloc::collections::TryReserveError>; in try_push()
37 other: &[T], in try_extend_from_slice() argument
40 T: Clone; in try_extend_from_slice()
43 impl<T> FallibleAllocExt<T> for Vec<T> {
44 fn try_push(&mut self, value: T) -> Result<(), alloc::collections::TryReserveError> { in try_push()
51 other: &[T], in try_extend_from_slice() argument
54 T: Clone, in try_extend_from_slice()
64 pub fn vec_try_fill_with_alloc_err<T: Clone>( in vec_try_fill_with_alloc_err() argument
65 elem: T, in vec_try_fill_with_alloc_err()
[all …]
/system/core/libutils/binder/
DVector_fuzz.cpp39 template <typename T>
41 Vector<T> vector;
42 const std::vector<std::function<void(FuzzedDataProvider&, Vector<T>&)>> funcs = {
43 [&](FuzzedDataProvider& provider, Vector<T>& vector) { in __anondcfdc6f70102()
49 [&](FuzzedDataProvider& provider, Vector<T>& vector) { in __anondcfdc6f70202()
54 [&](FuzzedDataProvider& provider, Vector<T>& vector) { in __anondcfdc6f70302()
59 [&](FuzzedDataProvider& provider, Vector<T>& vector) { in __anondcfdc6f70402()
64 [&](FuzzedDataProvider& provider, Vector<T>& vector) { in __anondcfdc6f70502()
69 [&](FuzzedDataProvider& provider, Vector<T>& vector) { in __anondcfdc6f70602()
74 [&](FuzzedDataProvider& provider, Vector<T>& vector) { in __anondcfdc6f70702()
[all …]
/system/teeui/libteeui/include/teeui/
Dstatic_vec.h40 template <typename T> class static_vec {
42 T* data_;
47 static_vec(T* begin, T* end) : data_(begin), size_(end - begin) {} in static_vec()
48 template <size_t s> static_vec(T (&arr)[s]) : data_(&arr[0]), size_(s) {} in static_vec()
54 T* data() { return data_; } in data()
55 const T* data() const { return data_; } in data()
58 T* begin() { return data_; } in begin()
59 T* end() { return data_ + size_; } in end()
60 const T* begin() const { return data_; } in begin()
61 const T* end() const { return data_ + size_; } in end()
[all …]

12345678910>>...19