/art/libartbase/base/ |
D | bit_utils.h | 31 template <typename T> 33 static_assert(std::is_integral<T>::value, "T must be integral"); in BitSizeOf() 34 using unsigned_type = typename std::make_unsigned<T>::type; in BitSizeOf() 35 static_assert(sizeof(T) == sizeof(unsigned_type), "Unexpected type size mismatch!"); in BitSizeOf() 41 template <typename T> 42 constexpr size_t BitSizeOf(T /*x*/) { in BitSizeOf() argument 43 return BitSizeOf<T>(); in BitSizeOf() 46 template<typename T> 47 constexpr int CLZ(T x) { in CLZ() 48 static_assert(std::is_integral<T>::value, "T must be integral"); in CLZ() [all …]
|
D | bit_utils_iterator.h | 34 template <typename T, typename Iter> 37 static_assert(std::is_integral<T>::value, "T must be integral"); 38 static_assert(std::is_unsigned<T>::value, "T must be unsigned"); 40 static_assert(sizeof(T) == sizeof(uint32_t) || sizeof(T) == sizeof(uint64_t), "Unsupported size"); 44 explicit BitIteratorBase(T bits) : bits_(bits) { } in BitIteratorBase() 49 bits_ &= ~(static_cast<T>(1u) << bit); 60 T bits_; 66 template <typename T, typename Iter> 67 bool operator==(const BitIteratorBase<T, Iter>& lhs, const BitIteratorBase<T, Iter>& rhs) { 71 template <typename T, typename Iter> [all …]
|
D | atomic.h | 36 template<typename T> 37 class PACKED(sizeof(T)) Atomic : public std::atomic<T> { in PACKED() argument 39 Atomic<T>() : std::atomic<T>(T()) { } in PACKED() 41 explicit Atomic<T>(T value) : std::atomic<T>(value) { } in PACKED() 50 T LoadJavaData() const { in PACKED() 61 void StoreJavaData(T desired_value) { in PACKED() 67 bool CompareAndSetStrongSequentiallyConsistent(T expected_value, T desired_value) { in PACKED() 72 bool CompareAndSetWeakSequentiallyConsistent(T expected_value, T desired_value) { in PACKED() 78 bool CompareAndSetStrongRelaxed(T expected_value, T desired_value) { in PACKED() 85 bool CompareAndSetStrongRelease(T expected_value, T desired_value) { in PACKED() [all …]
|
D | length_prefixed_array.h | 30 template<typename T> 36 T& At(size_t index, size_t element_size = sizeof(T), size_t alignment = alignof(T)) { 41 const T& At(size_t index, size_t element_size = sizeof(T), size_t alignment = alignof(T)) const { 46 StrideIterator<T> begin(size_t element_size = sizeof(T), size_t alignment = alignof(T)) { 47 return StrideIterator<T>(&AtUnchecked(0, element_size, alignment), element_size); 50 StrideIterator<const T> begin(size_t element_size = sizeof(T), 51 size_t alignment = alignof(T)) const { 52 return StrideIterator<const T>(&AtUnchecked(0, element_size, alignment), element_size); 55 StrideIterator<T> end(size_t element_size = sizeof(T), size_t alignment = alignof(T)) { 56 return StrideIterator<T>(&AtUnchecked(size_, element_size, alignment), element_size); [all …]
|
D | scoped_arena_containers.h | 42 template <typename T> 45 template <typename T> 46 using ScopedArenaDeque = std::deque<T, ScopedArenaAllocatorAdapter<T>>; 48 template <typename T> 49 using ScopedArenaQueue = std::queue<T, ScopedArenaDeque<T>>; 51 template <typename T> 52 using ScopedArenaVector = dchecked_vector<T, ScopedArenaAllocatorAdapter<T>>; 54 template <typename T, typename Comparator = std::less<T>> 55 using ScopedArenaPriorityQueue = std::priority_queue<T, ScopedArenaVector<T>, Comparator>; 57 template <typename T> [all …]
|
D | stride_iterator.h | 26 template<typename T> 27 class StrideIterator : public std::iterator<std::random_access_iterator_tag, T> { 30 typename std::iterator<std::random_access_iterator_tag, T>::difference_type; 37 StrideIterator(T* ptr, size_t stride) in StrideIterator() 56 StrideIterator<T> temp = *this; 67 StrideIterator<T> temp = *this; 78 StrideIterator<T> temp = *this; 89 StrideIterator<T> temp = *this; 100 T& operator*() const { 101 return *reinterpret_cast<T*>(ptr_); [all …]
|
D | arena_containers.h | 46 template <typename T> 49 template <typename T> 50 using ArenaDeque = std::deque<T, ArenaAllocatorAdapter<T>>; 52 template <typename T> 53 using ArenaQueue = std::queue<T, ArenaDeque<T>>; 55 template <typename T> 56 using ArenaVector = dchecked_vector<T, ArenaAllocatorAdapter<T>>; 58 template <typename T, typename Comparator = std::less<T>> 59 using ArenaPriorityQueue = std::priority_queue<T, ArenaVector<T>, Comparator>; 61 template <typename T> [all …]
|
D | memory_region.h | 61 template<typename T> 62 ALWAYS_INLINE T Load(uintptr_t offset) const { in Load() 63 T* address = ComputeInternalPointer<T>(offset); in Load() 71 template<typename T> 72 ALWAYS_INLINE void Store(uintptr_t offset, T value) const { in Store() 73 T* address = ComputeInternalPointer<T>(offset); in Store() 80 template<typename T> 81 ALWAYS_INLINE T LoadUnaligned(uintptr_t offset) const { in LoadUnaligned() 83 typedef typename std::make_unsigned<T>::type U; in LoadUnaligned() 90 return bit_cast<T, U>(equivalent_unsigned_integer_value); in LoadUnaligned() [all …]
|
D | array_slice.h | 30 template <typename T> 33 using value_type = T; 34 using reference = T&; 35 using const_reference = const T&; 36 using pointer = T*; 37 using const_pointer = const T*; 38 using iterator = StrideIterator<T>; 39 using const_iterator = StrideIterator<const T>; 50 ArraySlice(T* array, 52 size_t element_size = sizeof(T)) [all …]
|
D | bit_struct_detail.h | 30 template <typename T> 49 template <typename T, size_t kBitSize> 54 typename std::conditional</* if */ std::is_signed<T>::value, 60 template <typename T> 62 using StorageType = typename MinimumTypeHelper<T, sizeof(T) * kBitsPerByte>::type; 64 static constexpr StorageType ToUnderlyingStorage(T value) { in ToUnderlyingStorage() 70 static constexpr T FromUnderlyingStorage(StorageType storage) { in FromUnderlyingStorage() 82 T val_; 119 template <typename T> 132 static constexpr bool value = decltype(Test<T>(nullptr))::value; [all …]
|
D | intrusive_forward_list.h | 51 template <typename T, IntrusiveForwardListHook T::* NextPtr = &T::hook> 54 template <typename T, typename Tag = void> 57 template <typename T, 59 IntrusiveForwardListBaseHookTraits<typename std::remove_const<T>::type>> 62 template <typename T, typename HookTraits> 63 class IntrusiveForwardListIterator : public std::iterator<std::forward_iterator_tag, T> { 72 typename = typename std::enable_if<std::is_same<T, const OtherT>::value>::type> 89 T& operator*() const { 93 T* operator->() const { 114 template <typename T, typename OtherT, typename HookTraits> [all …]
|
/art/runtime/ |
D | reflective_handle.h | 30 template <typename T> 33 static_assert(std::is_same_v<T, ArtField> || std::is_same_v<T, ArtMethod>, 38 ALWAYS_INLINE ReflectiveHandle(const ReflectiveHandle<T>& handle) = default; 39 ALWAYS_INLINE ReflectiveHandle<T>& operator=(const ReflectiveHandle<T>& handle) = default; 41 ALWAYS_INLINE explicit ReflectiveHandle(ReflectiveReference<T>* reference) in ReflectiveHandle() 44 ALWAYS_INLINE T& operator*() const REQUIRES_SHARED(Locks::mutator_lock_) { in REQUIRES_SHARED() 48 ALWAYS_INLINE T* operator->() const REQUIRES_SHARED(Locks::mutator_lock_) { 52 ALWAYS_INLINE T* Get() const REQUIRES_SHARED(Locks::mutator_lock_) { in Get() 70 ReflectiveReference<T>* reference_; 79 template <typename T> [all …]
|
D | handle.h | 34 template<class T> class Handle; 35 template<typename T> class IterationRange; 38 template<typename T> class ObjectArray; 39 template<typename T, typename C> class ArrayIter; 40 template<typename T> using HandleArrayIter = ArrayIter<T, Handle<ObjectArray<T>>>; 41 template<typename T> using ConstHandleArrayIter = ArrayIter<T, const Handle<ObjectArray<T>>>; 48 template<class T> 54 ALWAYS_INLINE Handle(const Handle<T>& handle) = default; 56 ALWAYS_INLINE Handle<T>& operator=(const Handle<T>& handle) = default; 59 typename = typename std::enable_if_t<std::is_base_of_v<T, Type>>> [all …]
|
D | handle_wrapper.h | 27 template<class T> 28 class HandleWrapper : public MutableHandle<T> { 30 HandleWrapper(T** obj, const MutableHandle<T>& handle) in HandleWrapper() 31 : MutableHandle<T>(handle), obj_(obj) { in HandleWrapper() 37 *obj_ = MutableHandle<T>::Get(); in ~HandleWrapper() 41 T** const obj_; 47 template<class T> 48 class HandleWrapperObjPtr : public MutableHandle<T> { 50 HandleWrapperObjPtr(ObjPtr<T>* obj, const MutableHandle<T>& handle) in HandleWrapperObjPtr() 51 : MutableHandle<T>(handle), obj_(obj) {} in HandleWrapperObjPtr() [all …]
|
D | object_lock.cc | 25 template <typename T> 26 ObjectLock<T>::ObjectLock(Thread* self, Handle<T> object) : self_(self), obj_(object) { in ObjectLock() 31 template <typename T> 32 ObjectLock<T>::~ObjectLock() { in ~ObjectLock() 36 template <typename T> 37 void ObjectLock<T>::WaitIgnoringInterrupts() { in WaitIgnoringInterrupts() 41 template <typename T> 42 void ObjectLock<T>::Notify() { in Notify() 46 template <typename T> 47 void ObjectLock<T>::NotifyAll() { in NotifyAll() [all …]
|
/art/runtime/mirror/ |
D | object_array-inl.h | 39 template<class T> template<VerifyObjectFlags kVerifyFlags, ReadBarrierOption kReadBarrierOption> 40 inline ObjPtr<T> ObjectArray<T>::Get(int32_t i) { in Get() 45 return GetFieldObject<T, kVerifyFlags, kReadBarrierOption>(OffsetOfElement(i)); in Get() 48 template<class T> template<VerifyObjectFlags kVerifyFlags> 49 inline bool ObjectArray<T>::CheckAssignable(ObjPtr<T> object) { in CheckAssignable() 60 template<class T> 61 inline void ObjectArray<T>::Set(int32_t i, ObjPtr<T> object) { in Set() 69 template<class T> 71 inline void ObjectArray<T>::Set(int32_t i, ObjPtr<T> object) { in Set() 79 template<class T> [all …]
|
D | object_array.h | 28 template<typename T, typename Container> class ArrayIter; 29 template <typename T> using ConstObjPtrArrayIter = ArrayIter<T, const ObjPtr<ObjectArray<T>>>; 30 template <typename T> using ConstHandleArrayIter = ArrayIter<T, const Handle<ObjectArray<T>>>; 31 template <typename T> using ObjPtrArrayIter = ArrayIter<T, ObjPtr<ObjectArray<T>>>; 32 template <typename T> using HandleArrayIter = ArrayIter<T, Handle<ObjectArray<T>>>; 34 template<class T> 42 static ObjPtr<ObjectArray<T>> Alloc(Thread* self, 48 static ObjPtr<ObjectArray<T>> Alloc(Thread* self, 55 ALWAYS_INLINE ObjPtr<T> Get(int32_t i) REQUIRES_SHARED(Locks::mutator_lock_); 61 bool CheckAssignable(ObjPtr<T> object) NO_THREAD_SAFETY_ANALYSIS; [all …]
|
D | var_handle.cc | 357 template <typename T> 392 template <typename T, std::memory_order MO> 393 class AtomicGetAccessor : public Object::Accessor<T> { 397 void Access(T* addr) override { in Access() 398 std::atomic<T>* atom = reinterpret_cast<std::atomic<T>*>(addr); in Access() 406 template <typename T, std::memory_order MO> 407 class AtomicSetAccessor : public Object::Accessor<T> { 409 explicit AtomicSetAccessor(T new_value) : new_value_(new_value) {} in AtomicSetAccessor() 411 void Access(T* addr) override { in Access() 412 std::atomic<T>* atom = reinterpret_cast<std::atomic<T>*>(addr); in Access() [all …]
|
D | array-inl.h | 63 template<typename T> 64 inline T PrimitiveArray<T>::Get(int32_t i) { in Get() 67 return T(0); in Get() 72 template<typename T> 73 inline void PrimitiveArray<T>::Set(int32_t i, T value) { in Set() 81 template<typename T> 83 inline void PrimitiveArray<T>::Set(int32_t i, T value) { in Set() 91 template<typename T> 93 inline void PrimitiveArray<T>::SetWithoutChecks(int32_t i, T value) { in SetWithoutChecks() 105 template<typename T> [all …]
|
D | object_array-alloc-inl.h | 35 template<class T> 36 inline ObjPtr<ObjectArray<T>> ObjectArray<T>::Alloc(Thread* self, in Alloc() 50 return array->AsObjectArray<T>(); in Alloc() 53 template<class T> 54 inline ObjPtr<ObjectArray<T>> ObjectArray<T>::Alloc(Thread* self, in Alloc() 63 template<class T> 64 inline ObjPtr<ObjectArray<T>> ObjectArray<T>::CopyOf(Handle<ObjectArray<T>> h_this, in CopyOf() 72 ObjPtr<ObjectArray<T>> new_array = Alloc(self, h_this->GetClass(), new_length, allocator_type); in CopyOf()
|
/art/cmdline/ |
D | cmdline_parse_result.h | 29 template <typename T> 39 static CmdlineParseResult<T> Failure() { in Failure() 44 static CmdlineParseResult<T> Failure(const std::string& message) { in Failure() 49 static CmdlineParseResult<T> Success(const T& value) { in Success() 54 static CmdlineParseResult<T> Success(T&& value) { in Success() 55 return CmdlineParseResult(std::forward<T>(value)); in Success() 60 static CmdlineParseResult<T> SuccessNoValue() { in SuccessNoValue() 61 return CmdlineParseResult(T {}); in SuccessNoValue() 65 static CmdlineParseResult<T> OutOfRange(const std::string& message) { in OutOfRange() 72 static CmdlineParseResult<T> OutOfRange(const T& value, in OutOfRange() [all …]
|
/art/openjdkjvmti/ |
D | jvmti_weak_table-inl.h | 53 template <typename T> 54 void JvmtiWeakTable<T>::Lock() { in Lock() 57 template <typename T> 58 void JvmtiWeakTable<T>::Unlock() { in Unlock() 61 template <typename T> 62 void JvmtiWeakTable<T>::AssertLocked() { in AssertLocked() 66 template <typename T> 67 void JvmtiWeakTable<T>::UpdateTableWithReadBarrier() { in UpdateTableWithReadBarrier() 79 template <typename T> 80 bool JvmtiWeakTable<T>::GetTagSlowPath(art::Thread* self, art::ObjPtr<art::mirror::Object> obj, T* … in GetTagSlowPath() [all …]
|
D | art_jvmti.h | 137 template <typename T> 147 void operator()(T* ptr) const { in operator() 157 template <typename T> 158 class JvmtiDeleter<T[]> { 178 template <typename T> 179 using JvmtiUniquePtr = std::unique_ptr<T, JvmtiDeleter<T>>; 181 template <typename T> 183 static inline JvmtiUniquePtr<T> MakeJvmtiUniquePtr(jvmtiEnv* env, T* mem) { in MakeJvmtiUniquePtr() 184 return JvmtiUniquePtr<T>(mem, JvmtiDeleter<T>(env)); in MakeJvmtiUniquePtr() 187 template <typename T> [all …]
|
/art/tools/ahat/src/main/com/android/ahat/heapdump/ |
D | SkipNullsIterator.java | 25 class SkipNullsIterator<T> implements Iterator<T>, Iterable<T> { 26 Iterator<T> mIter; 27 private T mNext; 29 public SkipNullsIterator(Iterable<T> iterable) { in SkipNullsIterator() 43 public T next() { in next() 47 T next = mNext; in next() 53 public Iterator<T> iterator() { in iterator()
|
/art/cmdline/detail/ |
D | cmdline_parser_detail.h | 27 template <typename T> 28 typename std::remove_reference<T>::type& FakeReference(); 36 template <typename TStream, typename T> 37 static std::true_type InsertionOperatorTest(TStream& os, const T& value, 40 template <typename TStream, typename ... T> 41 static std::false_type InsertionOperatorTest(TStream& os, const T& ... args); 58 template <typename TL, typename ... T> 59 static std::false_type EqualityOperatorTest(const TL& left, const T& ... args); 90 template <typename T> 91 std::string ToStringAny(const T& value, [all …]
|