Home
last modified time | relevance | path

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

12345678910

/art/libartbase/base/
Dbit_utils.h31 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 …]
Dbit_utils_iterator.h34 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 …]
Datomic.h36 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 …]
Dlength_prefixed_array.h30 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 …]
Dscoped_arena_containers.h42 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 …]
Dstride_iterator.h26 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 …]
Darena_containers.h46 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 …]
Dmemory_region.h61 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 …]
Darray_slice.h29 template <typename T>
32 using value_type = T;
33 using reference = T&;
34 using const_reference = const T&;
35 using pointer = T*;
36 using const_pointer = const T*;
37 using iterator = StrideIterator<T>;
38 using const_iterator = StrideIterator<const T>;
49 ArraySlice(T* array,
51 size_t element_size = sizeof(T))
[all …]
Dstl_util.h57 template <class T>
58 void STLDeleteElements(T *container) { in STLDeleteElements()
68 template <class T>
69 void STLDeleteValues(T *v) { in STLDeleteValues()
71 for (typename T::iterator i = v->begin(); i != v->end(); ++i) { in STLDeleteValues()
87 template <typename T>
88 using UniqueCPtr = std::unique_ptr<T, FreeDelete>;
91 template <typename Container, typename T>
92 size_t IndexOfElement(const Container& container, const T& value) { in IndexOfElement()
99 template <typename Container, typename T>
[all …]
Dbit_struct.h107 template <typename T,
109 size_t kBitWidth = BitStructSizeOf<T>(),
112 static_assert(std::is_standard_layout<T>::value, "T must be standard layout");
114 operator T() const { in T() function
120 typename = std::enable_if_t<std::is_same<T, StorageType>::value, _>>
125 BitStructField& operator=(T value) {
135 return *this = static_cast<T>(other);
139 Assign(*this, static_cast<T>(other)); in BitStructField()
147 T2& Assign(T2& what, T value) { in Assign()
156 T Get() const { in Get()
[all …]
Dbit_struct_detail.h30 template <typename T>
49 template <typename T, size_t kBitSize>
54 typename std::conditional</* if */ std::is_signed<T>::value,
75 template <typename T>
88 static constexpr bool value = decltype(Test<T>(nullptr))::value;
92 template <typename T, typename M>
93 M GetMemberType(M T:: *);
97 template <typename T>
99 static_assert(std::is_union<T>::value, "T must be union"); in ValidateBitStructSize()
100 static_assert(std::is_standard_layout<T>::value, "T must be standard-layout"); in ValidateBitStructSize()
[all …]
Dmemory_type_table.h30 template <typename T>
33 MemoryTypeRange(uintptr_t start, uintptr_t limit, const T& type) in MemoryTypeRange()
52 const T& Type() const { return type_; } in Type()
76 T type_;
80 template <typename T>
97 const MemoryTypeRange<T>* Lookup(uintptr_t address) const { in Lookup()
123 std::vector<MemoryTypeRange<T>> ranges_;
130 template <typename T>
131 class MemoryTypeTable<T>::Builder final {
141 inline bool Add(const MemoryTypeRange<T>& region);
[all …]
/art/cmdline/
Dcmdline_parse_result.h29 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/runtime/
Dhandle_wrapper.h27 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 …]
Dobject_lock.cc25 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 …]
Dhandle.h34 template<class T> class Handle;
40 template<class T>
46 ALWAYS_INLINE Handle(const Handle<T>& handle) = default;
48 ALWAYS_INLINE Handle<T>& operator=(const Handle<T>& handle) = default;
50 ALWAYS_INLINE explicit Handle(StackReference<T>* reference) : reference_(reference) { in Handle()
53 ALWAYS_INLINE T& operator*() const REQUIRES_SHARED(Locks::mutator_lock_) { in REQUIRES_SHARED()
57 ALWAYS_INLINE T* operator->() const REQUIRES_SHARED(Locks::mutator_lock_) {
61 ALWAYS_INLINE T* Get() const REQUIRES_SHARED(Locks::mutator_lock_) { in Get()
62 return down_cast<T*>(reference_->AsMirrorPtr()); in Get()
115 template<class T>
[all …]
/art/runtime/mirror/
Dobject_array-inl.h38 template<class T> template<VerifyObjectFlags kVerifyFlags, ReadBarrierOption kReadBarrierOption>
39 inline ObjPtr<T> ObjectArray<T>::Get(int32_t i) { in Get()
44 return GetFieldObject<T, kVerifyFlags, kReadBarrierOption>(OffsetOfElement(i)); in Get()
47 template<class T> template<VerifyObjectFlags kVerifyFlags>
48 inline bool ObjectArray<T>::CheckAssignable(ObjPtr<T> object) { in CheckAssignable()
59 template<class T>
60 inline void ObjectArray<T>::Set(int32_t i, ObjPtr<T> object) { in Set()
68 template<class T>
70 inline void ObjectArray<T>::Set(int32_t i, ObjPtr<T> object) { in Set()
78 template<class T>
[all …]
Darray-inl.h63 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 …]
Dobject_array-alloc-inl.h35 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(Thread* self, int32_t new_length) { in CopyOf()
68 Handle<ObjectArray<T>> h_this(hs.NewHandle(this)); in CopyOf()
72 ObjPtr<ObjectArray<T>> new_array = Alloc(self, GetClass(), new_length, allocator_type); in CopyOf()
/art/tools/ahat/src/main/com/android/ahat/heapdump/
DSkipNullsIterator.java25 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/openjdkjvmti/
Djvmti_weak_table-inl.h53 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 …]
Dart_jvmti.h137 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/cmdline/detail/
Dcmdline_parser_detail.h27 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 …]
/art/compiler/utils/
Dintrusive_forward_list.h51 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 …]

12345678910