Home
last modified time | relevance | path

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

12345678910>>...14

/system/core/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/core/libutils/include/utils/
DStrongPointer.h26 template<typename T> class wp;
30 template<typename T>
39 static inline sp<T> make(Args&&... args);
41 sp(T* other); // NOLINT(implicit)
42 sp(const sp<T>& other);
43 sp(sp<T>&& other) noexcept;
52 sp& operator = (T* other);
53 sp& operator = (const sp<T>& other);
54 sp& operator=(sp<T>&& other) noexcept;
61 void force_set(T* other);
[all …]
DFlattenable.h74 template<typename T>
75 static void write(void*& buffer, size_t& size, const T& value) { in write()
76 static_assert(std::is_trivially_copyable<T>::value, in write()
78 memcpy(buffer, &value, sizeof(T)); in write()
79 advance(buffer, size, sizeof(T)); in write()
83 template<typename T>
84 static void read(void const*& buffer, size_t& size, T& value) { in read()
85 static_assert(std::is_trivially_copyable<T>::value, in read()
87 memcpy(&value, buffer, sizeof(T)); in read()
88 advance(buffer, size, sizeof(T)); in read()
[all …]
/system/media/audio_utils/include/audio_utils/
DStatistics.h49 template <typename T>
51 T mSum{};
52 T mCorrection{}; // negative low order bits of mSum.
54 constexpr KahanSum<T>() = default;
56 explicit constexpr KahanSum<T>(const T& value) in KahanSum()
61 friend constexpr KahanSum<T> operator+(KahanSum<T> lhs, const T& rhs) {
62 const T y = rhs - lhs.mCorrection;
63 const T t = lhs.mSum + y;
74 constexpr KahanSum<T>& operator+=(const T& rhs) { // takes T not KahanSum<T>
79 constexpr operator T() const { in T() function
[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/bt/common/
Dleaky_bonded_queue.h42 template <class T>
55 void Enqueue(T* new_item);
60 T* EnqueueWithPop(T* new_item);
64 T* Dequeue();
85 std::queue<std::unique_ptr<T>> queue_;
94 template <class T>
95 LeakyBondedQueue<T>::LeakyBondedQueue(size_t capacity) { in LeakyBondedQueue()
99 template <class T>
100 LeakyBondedQueue<T>::~LeakyBondedQueue() {} in ~LeakyBondedQueue()
102 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/libbase/include/android-base/
Dparseint.h34 template <typename T>
35 bool ParseUint(const char* s, T* out, T max = std::numeric_limits<T>::max(),
37 static_assert(std::is_unsigned<T>::value, "ParseUint can only be used with unsigned types");
70 *out = static_cast<T>(result);
76 template <typename T>
77 bool ParseUint(const std::string& s, T* out, T max = std::numeric_limits<T>::max(),
82 template <typename T>
83 bool ParseByteCount(const char* s, T* out, T max = std::numeric_limits<T>::max()) {
88 template <typename T>
89 bool ParseByteCount(const std::string& s, T* out, 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/core/libpixelflinger/codeflinger/tinyutils/
Dsmartpointer.h31 inline bool operator _op_ (const sp<T>& o) const { \
34 inline bool operator _op_ (const T* o) const { \
48 template <typename T>
54 sp(T* other); // NOLINT, implicit
55 sp(const sp<T>& other);
63 sp& operator = (T* other);
64 sp& operator = (const sp<T>& other);
74 inline T& operator* () const { return *m_ptr; }
75 inline T* operator-> () const { return m_ptr; }
76 inline T* get() const { return m_ptr; } 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/update_engine/update_manager/
Dgeneric_variables.h50 template <typename T>
51 class PollCopyVariable : public Variable<T> {
59 const T& ref, in PollCopyVariable()
62 : Variable<T>(name, kVariableModePoll), in PollCopyVariable()
66 PollCopyVariable(const std::string& name, const T& ref, const bool* is_set_p) in PollCopyVariable()
68 PollCopyVariable(const std::string& name, const T& ref) in PollCopyVariable()
73 const T& ref, in PollCopyVariable()
76 : Variable<T>(name, poll_interval), in PollCopyVariable()
82 const T& ref, in PollCopyVariable()
87 const T& ref) in PollCopyVariable()
[all …]
/system/keymaster/include/keymaster/
Dandroid_keymaster_utils.h76 template <typename T, size_t N> inline size_t array_size(const T (&a)[N]) { in array_size()
83 template <typename T, size_t N> inline size_t array_length(const T (&)[N]) { in array_length()
91 template <typename T> inline T* dup_array(const T* a, size_t n) { in dup_array()
92 T* dup = new (std::nothrow) T[n]; in dup_array()
104 template <typename T, size_t N> inline T* dup_array(const T (&a)[N]) { in dup_array()
117 template <typename T, size_t N> inline void copy_array(const T (&arr)[N], T* dest) { in copy_array()
127 template <typename T, size_t N> inline bool array_contains(const T (&a)[N], T val) { in array_contains()
167 template <typename T> explicit Eraser(T* t);
169 template <typename T>
170 explicit Eraser(T& t) : buf_(reinterpret_cast<uint8_t*>(&t)), size_(sizeof(t)) {} in Eraser()
[all …]
/system/chre/external/flatbuffers/include/flatbuffers/
Dflatbuffers.h90 template<class T> inline operator T*() const { return 0; }
173 template<typename T> struct Offset {
187 template<typename T> T EndianSwap(T t) { in EndianSwap()
203 if (sizeof(T) == 1) { // Compile-time if-then's. in EndianSwap()
205 } else if (sizeof(T) == 2) { in EndianSwap()
207 return *reinterpret_cast<T *>(&r); in EndianSwap()
208 } else if (sizeof(T) == 4) { in EndianSwap()
210 return *reinterpret_cast<T *>(&r); in EndianSwap()
211 } else if (sizeof(T) == 8) { in EndianSwap()
213 return *reinterpret_cast<T *>(&r); in EndianSwap()
[all …]
/system/bt/gd/storage/
Dconfig_cache_helper.h58 …template <typename T, typename std::enable_if<std::is_signed_v<T> && std::is_integral_v<T>, int>::…
59 std::optional<T> Get(const std::string& section, const std::string& property) { in Get()
64 if (!common::IsNumberInNumericLimits<T>(*value)) { in Get()
67 return static_cast<T>(*value); in Get()
70 …template <typename T, typename std::enable_if<std::is_unsigned_v<T> && std::is_integral_v<T>, int>…
71 std::optional<T> Get(const std::string& section, const std::string& property) { in Get()
76 if (!common::IsNumberInNumericLimits<T>(*value)) { in Get()
79 return static_cast<T>(*value); in Get()
82 template <typename T, typename std::enable_if<std::is_same_v<T, std::string>, int>::type = 0>
83 std::optional<T> Get(const std::string& section, const std::string& property) { in Get()
[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 …]
Dmsg_formatting.h35 template <size_t... idx, typename... T>
36 std::tuple<std::remove_reference_t<T>&&...> tuple_move_helper(std::index_sequence<idx...>, in tuple_move_helper()
37 std::tuple<T...>&& t) { in tuple_move_helper()
41 template <typename... T>
42 std::tuple<std::remove_reference_t<T>&&...> tuple_move(std::tuple<T...>&& t) { in tuple_move()
43 return tuple_move_helper(std::make_index_sequence<sizeof...(T)>(), std::move(t)); in tuple_move()
46 template <typename... T>
47 std::tuple<std::remove_reference_t<T>&&...> tuple_move(std::tuple<T...>& t) { in tuple_move()
48 return tuple_move_helper(std::make_index_sequence<sizeof...(T)>(), std::move(t)); in tuple_move()
53 template <typename T> class StreamState {
[all …]
/system/bt/service/ipc/binder/
Dremote_callback_list.h52 template <typename T>
62 bool Register(const android::sp<T>& callback);
63 bool Unregister(const android::sp<T>& callback);
67 void ForEach(const std::function<void(T*)>& callback);
72 CallbackDeathRecipient(const android::sp<T>& callback,
75 android::sp<T> get_callback() const { return callback_; } in get_callback()
81 android::sp<T> callback_;
82 RemoteCallbackList<T>* owner_; // weak
106 template <typename T>
107 RemoteCallbackList<T>::~RemoteCallbackList() { in ~RemoteCallbackList()
[all …]
/system/libfmq/include/fmq/
DMessageQueueBase.h36 template <template <typename, hardware::MQFlavor> class MQDescriptorType, typename T,
39 typedef MQDescriptorType<T, flavor> Descriptor;
99 bool write(const T* data);
109 bool read(T* data);
119 bool write(const T* data, size_t count);
160 bool writeBlocking(const T* data, size_t count, uint32_t readNotification,
164 bool writeBlocking(const T* data, size_t count, int64_t timeOutNanos = 0);
174 bool read(T* data, size_t count);
211 bool readBlocking(T* data, size_t count, uint32_t readNotification, uint32_t writeNotification,
214 bool readBlocking(T* data, size_t count, int64_t timeOutNanos = 0);
[all …]
/system/libhidl/base/
DSynchronizedQueue.h30 template <typename T>
38 T wait_pop();
42 bool push(const T& item);
62 std::queue<T> mQueue;
67 template <typename T>
68 SynchronizedQueue<T>::SynchronizedQueue(size_t limit) : mQueueLimit(limit) { in SynchronizedQueue()
71 template <typename T>
72 T SynchronizedQueue<T>::wait_pop() { in wait_pop()
79 T item = mQueue.front(); in wait_pop()
85 template <typename T>
[all …]
/system/extras/simpleperf/
Dutils.h93 template <class T>
94 void MoveFromBinaryFormat(T& data, const char*& p) { in MoveFromBinaryFormat()
95 static_assert(std::is_standard_layout<T>::value, "not standard layout"); in MoveFromBinaryFormat()
96 memcpy(&data, p, sizeof(T)); in MoveFromBinaryFormat()
97 p += sizeof(T); in MoveFromBinaryFormat()
100 template <class T>
101 void MoveFromBinaryFormat(T& data, char*& p) { in MoveFromBinaryFormat()
102 static_assert(std::is_standard_layout<T>::value, "not standard layout"); in MoveFromBinaryFormat()
103 memcpy(&data, p, sizeof(T)); in MoveFromBinaryFormat()
104 p += sizeof(T); in MoveFromBinaryFormat()
[all …]
/system/connectivity/wifilogd/
Dlocal_utils.h56 template <typename T>
57 constexpr auto CastEnumToInteger(T enum_value) { in CastEnumToInteger()
58 static_assert(std::is_enum<T>::value, "argument must be of an enum type"); in CastEnumToInteger()
59 return static_cast<typename std::underlying_type<T>::type>(enum_value); in CastEnumToInteger()
75 template <typename T>
76 T CopyFromBufferOrDie(NONNULL const void* buf, size_t buf_len) { in CopyFromBufferOrDie()
77 static_assert(std::is_trivially_copyable<T>::value, in CopyFromBufferOrDie()
79 T out; in CopyFromBufferOrDie()
87 template <typename T>
88 constexpr T GetMaxVal() { in GetMaxVal()
[all …]
/system/libhidl/base/include/hidl/
DHidlSupport.h335 template<typename T>
337 using value_type = T;
340 static_assert(hidl_vec<T>::kOffsetOfBuffer == 0, "wrong offset"); in hidl_vec()
347 hidl_vec(const hidl_vec<T> &other) : hidl_vec() { in hidl_vec()
351 hidl_vec(hidl_vec<T> &&other) noexcept : hidl_vec() { in hidl_vec()
355 hidl_vec(const std::initializer_list<T> list) : hidl_vec() { *this = list; } in hidl_vec()
357 hidl_vec(const std::vector<T> &other) : hidl_vec() { in hidl_vec()
374 mBuffer = new T[mSize](); in hidl_vec()
379 mBuffer[idx++] = static_cast<T>(*first); in hidl_vec()
393 void setToExternal(T *data, size_t size, bool shouldOwn = false) {
[all …]

12345678910>>...14