Home
last modified time | relevance | path

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

123

/art/runtime/
Datomic.h187 template<typename T>
188 class PACKED(sizeof(T)) Atomic : public std::atomic<T> { in PACKED() argument
190 Atomic<T>() : std::atomic<T>(0) { } in PACKED()
192 explicit Atomic<T>(T value) : std::atomic<T>(value) { } in PACKED()
195 T LoadRelaxed() const { in PACKED()
203 T LoadJavaData() const { in PACKED()
209 T LoadSequentiallyConsistent() const { in PACKED()
214 void StoreRelaxed(T desired) { in PACKED()
219 void StoreJavaData(T desired) { in PACKED()
224 void StoreRelease(T desired) { in PACKED()
[all …]
Dutils.h56 template <typename T>
57 bool ParseUint(const char *in, T* out) { in ParseUint()
63 if (std::numeric_limits<T>::max() < result) { in ParseUint()
66 *out = static_cast<T>(result); in ParseUint()
70 template <typename T>
71 bool ParseInt(const char* in, T* out) { in ParseInt()
77 if (result < std::numeric_limits<T>::min() || std::numeric_limits<T>::max() < result) { in ParseInt()
80 *out = static_cast<T>(result); in ParseInt()
84 template<typename T>
85 static constexpr bool IsPowerOfTwo(T x) { in IsPowerOfTwo()
[all …]
Dhandle.h29 template<class T> class Handle;
35 template<class T>
41 ALWAYS_INLINE ConstHandle(const ConstHandle<T>& handle) : reference_(handle.reference_) { in ConstHandle()
44 ALWAYS_INLINE ConstHandle<T>& operator=(const ConstHandle<T>& handle) {
49 ALWAYS_INLINE explicit ConstHandle(StackReference<T>* reference) : reference_(reference) { in ConstHandle()
52 ALWAYS_INLINE T& operator*() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { in SHARED_LOCKS_REQUIRED()
56 ALWAYS_INLINE T* operator->() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
60 ALWAYS_INLINE T* Get() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { in Get()
61 return down_cast<T*>(reference_->AsMirrorPtr()); in Get()
101 template<class T>
[all …]
Dobject_lock.cc24 template <typename T>
25 ObjectLock<T>::ObjectLock(Thread* self, Handle<T> object) : self_(self), obj_(object) { in ObjectLock()
30 template <typename T>
31 ObjectLock<T>::~ObjectLock() { in ~ObjectLock()
35 template <typename T>
36 void ObjectLock<T>::WaitIgnoringInterrupts() { in WaitIgnoringInterrupts()
40 template <typename T>
41 void ObjectLock<T>::Notify() { in Notify()
45 template <typename T>
46 void ObjectLock<T>::NotifyAll() { in NotifyAll()
Dhandle_scope.h147 template<class T>
148 class HandleWrapper : public Handle<T> {
150 HandleWrapper(T** obj, const Handle<T>& handle) in HandleWrapper()
151 : Handle<T>(handle), obj_(obj) { in HandleWrapper()
155 *obj_ = Handle<T>::Get(); in ~HandleWrapper()
159 T** const obj_;
169 template<class T>
170 ALWAYS_INLINE Handle<T> NewHandle(T* object) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { in NewHandle()
172 Handle<T> h(GetHandle<T>(pos_)); in NewHandle()
177 template<class T>
[all …]
Dmemory_region.h47 template<typename T> T Load(uintptr_t offset) const { in Load()
48 return *ComputeInternalPointer<T>(offset); in Load()
51 template<typename T> void Store(uintptr_t offset, T value) const { in Store()
52 *ComputeInternalPointer<T>(offset) = value; in Store()
55 template<typename T> T* PointerTo(uintptr_t offset) const { in PointerTo()
56 return ComputeInternalPointer<T>(offset); in PointerTo()
93 template<typename T> T* ComputeInternalPointer(size_t offset) const { in ComputeInternalPointer()
94 CHECK_GE(size(), sizeof(T)); in ComputeInternalPointer()
95 CHECK_LE(offset, size() - sizeof(T)); in ComputeInternalPointer()
96 return reinterpret_cast<T*>(start() + offset); in ComputeInternalPointer()
Dstack_map.h67 template<typename T> friend class CodeInfo;
68 template<typename T> friend class StackMap;
69 template<typename T> friend class StackMapStream;
117 template <typename T> friend class CodeInfo;
118 template <typename T> friend class StackMapStream;
135 template <typename T>
148 T GetNativePc() const { in GetNativePc()
149 return region_.Load<T>(kNativePcOffset); in GetNativePc()
152 void SetNativePc(T native_pc) { in SetNativePc()
153 return region_.Store<T>(kNativePcOffset, native_pc); in SetNativePc()
[all …]
Ddex_instruction_visitor.h25 template<typename T>
29 T* derived = static_cast<T*>(this); in Visit()
55 T* derived = static_cast<T*>(this); \
/art/runtime/mirror/
Dobject_array-inl.h34 template<class T>
35 inline ObjectArray<T>* ObjectArray<T>::Alloc(Thread* self, Class* object_array_class, in Alloc()
42 return array->AsObjectArray<T>(); in Alloc()
46 template<class T>
47 inline ObjectArray<T>* ObjectArray<T>::Alloc(Thread* self, Class* object_array_class, in Alloc()
53 template<class T>
54 inline T* ObjectArray<T>::Get(int32_t i) { in Get()
59 return GetFieldObject<T>(OffsetOfElement(i)); in Get()
62 template<class T> template<VerifyObjectFlags kVerifyFlags>
63 inline bool ObjectArray<T>::CheckAssignable(T* object) { in CheckAssignable()
[all …]
Darray-inl.h167 template<class T>
168 inline void PrimitiveArray<T>::VisitRoots(RootCallback* callback, void* arg) { in VisitRoots()
172 template<typename T>
173 inline PrimitiveArray<T>* PrimitiveArray<T>::Alloc(Thread* self, size_t length) { in Alloc()
174 Array* raw_array = Array::Alloc<true>(self, GetArrayClass(), length, sizeof(T), in Alloc()
176 return down_cast<PrimitiveArray<T>*>(raw_array); in Alloc()
179 template<typename T>
180 inline T PrimitiveArray<T>::Get(int32_t i) { in Get()
183 return T(0); in Get()
188 template<typename T>
[all …]
Dobject_array.h25 template<class T>
33 static ObjectArray<T>* Alloc(Thread* self, Class* object_array_class, int32_t length,
37 static ObjectArray<T>* Alloc(Thread* self, Class* object_array_class, int32_t length)
40 T* Get(int32_t i) ALWAYS_INLINE SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
46 bool CheckAssignable(T* object) NO_THREAD_SAFETY_ANALYSIS;
48 ALWAYS_INLINE void Set(int32_t i, T* object) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
52 ALWAYS_INLINE void Set(int32_t i, T* object) NO_THREAD_SAFETY_ANALYSIS;
60 ALWAYS_INLINE void SetWithoutChecks(int32_t i, T* object) NO_THREAD_SAFETY_ANALYSIS;
65 ALWAYS_INLINE void SetWithoutChecksAndWriteBarrier(int32_t i, T* object)
68 ALWAYS_INLINE T* GetWithoutChecks(int32_t i) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
[all …]
Darray.h27 template<class T> class Handle;
110 template<typename T>
113 typedef T ElementType;
115 static PrimitiveArray<T>* Alloc(Thread* self, size_t length)
118 const T* GetData() const ALWAYS_INLINE SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { in GetData()
119 return reinterpret_cast<const T*>(GetRawData(sizeof(T), 0)); in GetData()
122 T* GetData() ALWAYS_INLINE SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { in GetData()
123 return reinterpret_cast<T*>(GetRawData(sizeof(T), 0)); in GetData()
126 T Get(int32_t i) ALWAYS_INLINE SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
128 T GetWithoutChecks(int32_t i) ALWAYS_INLINE SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { in GetWithoutChecks()
[all …]
/art/compiler/utils/
Dscoped_arena_containers.h39 template <typename T>
42 template <typename T>
43 using ScopedArenaDeque = std::deque<T, ScopedArenaAllocatorAdapter<T>>;
45 template <typename T>
46 using ScopedArenaQueue = std::queue<T, ScopedArenaDeque<T>>;
48 template <typename T>
49 using ScopedArenaVector = std::vector<T, ScopedArenaAllocatorAdapter<T>>;
51 template <typename T, typename Comparator = std::less<T>>
52 using ScopedArenaSet = std::set<T, Comparator, ScopedArenaAllocatorAdapter<T>>;
99 template <typename T>
[all …]
Darena_containers.h41 template <typename T>
44 template <typename T>
45 using ArenaDeque = std::deque<T, ArenaAllocatorAdapter<T>>;
47 template <typename T>
48 using ArenaQueue = std::queue<T, ArenaDeque<T>>;
50 template <typename T>
51 using ArenaVector = std::vector<T, ArenaAllocatorAdapter<T>>;
53 template <typename T, typename Comparator = std::less<T>>
54 using ArenaSet = std::set<T, Comparator, ArenaAllocatorAdapter<T>>;
123 template <typename T>
[all …]
Dgrowable_array.h42 template<typename T>
57 T Next() { in Next()
89 elem_list_ = static_cast<T*>(arena_->Alloc(sizeof(T) * init_length, in arena_()
103 T* new_array = static_cast<T*>(arena_->Alloc(sizeof(T) * target_length, in Resize()
105 memcpy(new_array, elem_list_, sizeof(T) * num_allocated_); in Resize()
116 void Insert(T elem) { in Insert()
123 void InsertAt(size_t index, T elem) { in InsertAt()
132 void Add(T elem) { in Add()
136 T Get(size_t index) const { in Get()
142 void Put(size_t index, T elem) { in Put()
[all …]
Dswap_space.h102 template <typename T> class SwapAllocator;
132 template <typename T>
135 typedef T value_type;
136 typedef T* pointer;
137 typedef T& reference;
138 typedef const T* const_pointer;
139 typedef const T& const_reference;
158 return static_cast<size_type>(-1) / sizeof(T); in max_size()
167 return reinterpret_cast<T*>(malloc(n * sizeof(T)));
169 return reinterpret_cast<T*>(swap_space_->Alloc(n * sizeof(T)));
[all …]
Darray_ref.h40 template <typename T>
46 typedef T value_type;
47 typedef T& reference;
48 typedef const T& const_reference;
49 typedef T* pointer;
50 typedef const T* const_pointer;
51 typedef T* iterator;
52 typedef const T* const_iterator;
65 constexpr ArrayRef(T (&array)[size]) in ArrayRef()
71 typename std::enable_if<std::is_same<T, const U>::value, tag>::type t = tag())
[all …]
/art/runtime/base/
Dallocator.h93 template<class T, AllocatorTag kTag>
94 class TrackingAllocatorImpl : public std::allocator<T> {
96 typedef typename std::allocator<T>::value_type value_type;
97 typedef typename std::allocator<T>::size_type size_type;
98 typedef typename std::allocator<T>::difference_type difference_type;
99 typedef typename std::allocator<T>::pointer pointer;
100 typedef typename std::allocator<T>::const_pointer const_pointer;
101 typedef typename std::allocator<T>::reference reference;
102 typedef typename std::allocator<T>::const_reference const_reference;
122 const size_t size = n * sizeof(T);
[all …]
Dhash_set.h30 template <class T>
33 void MakeEmpty(T& item) const { in MakeEmpty()
34 item = T(); in MakeEmpty()
36 bool IsEmpty(const T& item) const { in IsEmpty()
37 return item == T(); in IsEmpty()
41 template <class T>
42 class DefaultEmptyFn<T*> {
44 void MakeEmpty(T*& item) const { in MakeEmpty()
47 bool IsEmpty(const T*& item) const { in IsEmpty()
55 template <class T, class EmptyFn = DefaultEmptyFn<T>, class HashFn = std::hash<T>,
[all …]
Dstl_util.h26 template<class T>
27 void STLSortAndRemoveDuplicates(T* v) { in STLSortAndRemoveDuplicates()
62 template <class T>
63 void STLDeleteElements(T *container) { in STLDeleteElements()
72 template <class T>
73 void STLDeleteValues(T *v) { in STLDeleteValues()
75 for (typename T::iterator i = v->begin(); i != v->end(); ++i) { in STLDeleteValues()
81 template <class T>
82 std::string ToString(const T& v) { in ToString()
Dbit_field.h29 template<typename T, int position, int size>
33 static bool IsValid(T value) { in IsValid()
60 static uword Encode(T value) { in Encode()
66 static T Decode(uword value) { in Decode()
67 return static_cast<T>((value >> position) & ((kUwordOne << size) - 1)); in Decode()
73 static uword Update(T value, uword original) { in Update()
Dbounded_fifo.h24 template <typename T, const size_t MaxSize>
46 void push_back(const T& value) { in push_back()
53 const T& front() const { in front()
66 T data_[MaxSize];
Dlogging.h232 template<typename T>
235 explicit Dumpable(T& value) : value_(value) { in Dumpable()
243 T& value_;
248 template<typename T>
249 std::ostream& operator<<(std::ostream& os, const Dumpable<T>& rhs) {
254 template<typename T>
257 explicit ConstDumpable(const T& value) : value_(value) { in ConstDumpable()
265 const T& value_;
270 template<typename T>
271 std::ostream& operator<<(std::ostream& os, const ConstDumpable<T>& rhs) {
[all …]
/art/runtime/gc/accounting/
Datomic_stack.h34 template <typename T>
58 bool AtomicPushBackIgnoreGrowthLimit(const T& value) { in AtomicPushBackIgnoreGrowthLimit()
63 bool AtomicPushBack(const T& value) { in AtomicPushBack()
69 bool AtomicBumpBack(size_t num_slots, T** start_address, T** end_address) { in AtomicBumpBack()
88 DCHECK_EQ(begin_[i], static_cast<T>(0)) in AtomicBumpBack()
98 DCHECK_EQ(begin_[i], static_cast<T>(0)) << "i=" << i; in AssertAllZero()
103 void PushBack(const T& value) { in PushBack()
113 T PopBack() { in PopBack()
121 T PopFront() { in PopFront()
143 T* Begin() const { in Begin()
[all …]
/art/compiler/optimizing/
Dbuilder.h78 template<typename T>
81 template<typename T>
84 template<typename T>
87 template<typename T>
90 template<typename T> void If_21t(const Instruction& instruction, uint32_t dex_offset);
91 template<typename T> void If_22t(const Instruction& instruction, uint32_t dex_offset);

123