Home
last modified time | relevance | path

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

12345678910>>...12

/art/libartbase/base/
Dbit_utils.h31 template <typename T>
33 static_assert(std::is_integral_v<T>, "T must be integral"); in BitSizeOf()
34 using unsigned_type = std::make_unsigned_t<T>; 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_v<T>, "T must be integral"); in CLZ()
[all …]
Dbit_utils_iterator.h34 template <typename T, typename Iter>
36 static_assert(std::is_integral_v<T>, "T must be integral");
37 static_assert(std::is_unsigned_v<T>, "T must be unsigned");
39 static_assert(sizeof(T) == sizeof(uint32_t) || sizeof(T) == sizeof(uint64_t), "Unsupported size");
49 explicit BitIteratorBase(T bits) : bits_(bits) { } in BitIteratorBase()
54 bits_ &= ~(static_cast<T>(1u) << bit);
65 T bits_;
71 template <typename T, typename Iter>
72 bool operator==(const BitIteratorBase<T, Iter>& lhs, const BitIteratorBase<T, Iter>& rhs) {
76 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.h45 template <typename T>
48 template <typename T>
49 using ScopedArenaDeque = std::deque<T, ScopedArenaAllocatorAdapter<T>>;
51 template <typename T>
52 using ScopedArenaForwardList = std::forward_list<T, ScopedArenaAllocatorAdapter<T>>;
54 template <typename T>
55 using ScopedArenaQueue = std::queue<T, ScopedArenaDeque<T>>;
57 template <typename T>
58 using ScopedArenaVector = dchecked_vector<T, ScopedArenaAllocatorAdapter<T>>;
60 template <typename T, typename Comparator = std::less<T>>
[all …]
Darray_slice.h31 template <typename T>
34 using value_type = T;
35 using reference = T&;
36 using const_reference = const T&;
37 using pointer = T*;
38 using const_pointer = const T*;
39 using iterator = StrideIterator<T>;
40 using const_iterator = StrideIterator<const T>;
51 ArraySlice(T* array,
53 size_t element_size = sizeof(T))
[all …]
Darena_containers.h47 template <typename T>
50 template <typename T>
51 using ArenaDeque = std::deque<T, ArenaAllocatorAdapter<T>>;
53 template <typename T>
54 using ArenaForwardList = std::forward_list<T, ArenaAllocatorAdapter<T>>;
56 template <typename T>
57 using ArenaQueue = std::queue<T, ArenaDeque<T>>;
59 template <typename T>
60 using ArenaVector = dchecked_vector<T, ArenaAllocatorAdapter<T>>;
62 template <typename T, typename Comparator = std::less<T>>
[all …]
Dstride_iterator.h26 template <typename T>
30 using value_type = T;
40 StrideIterator(T* ptr, size_t stride) in StrideIterator()
59 StrideIterator<T> temp = *this;
70 StrideIterator<T> temp = *this;
81 StrideIterator<T> temp = *this;
92 StrideIterator<T> temp = *this;
103 T& operator*() const {
104 return *reinterpret_cast<T*>(ptr_);
107 T* operator->() const {
[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 using U = std::make_unsigned_t<T>; in LoadUnaligned()
90 return bit_cast<T, U>(equivalent_unsigned_integer_value); in LoadUnaligned()
[all …]
Dbit_struct_detail.h30 template <typename T>
48 template <typename T, size_t kBitSize>
53 std::conditional_t</* if */ std::is_signed_v<T>,
59 template <typename T>
61 using StorageType = typename MinimumTypeHelper<T, sizeof(T) * kBitsPerByte>::type;
63 static constexpr StorageType ToUnderlyingStorage(T value) { in ToUnderlyingStorage()
69 static constexpr T FromUnderlyingStorage(StorageType storage) { in FromUnderlyingStorage()
81 T val_;
118 template <typename T>
131 static constexpr bool value = decltype(Test<T>(nullptr))::value;
[all …]
Darray_ref.h40 template <typename T>
43 using value_type = T;
44 using reference = T&;
45 using const_reference = const T&;
46 using pointer = T*;
47 using const_pointer = const T*;
48 using iterator = T*;
49 using const_iterator = const T*;
62 explicit constexpr ArrayRef(T (&array)[size]) in ArrayRef()
68 typename = std::enable_if_t<std::is_same_v<T, const U>>>
[all …]
Dintrusive_forward_list.h51 template <typename T, IntrusiveForwardListHook T::* NextPtr = &T::hook>
54 template <typename T, typename Tag = void>
57 template <typename T,
58 typename HookTraits = IntrusiveForwardListBaseHookTraits<std::remove_const_t<T>>>
61 template <typename T, typename HookTraits>
65 using value_type = T;
77 typename = std::enable_if_t<std::is_same_v<T, const OtherT>>>
94 T& operator*() const {
98 T* operator->() const {
119 template <typename T, typename OtherT, typename HookTraits>
[all …]
/art/runtime/
Dreflective_handle.h31 template <typename T>
34 static_assert(std::is_same_v<T, ArtField> || std::is_same_v<T, ArtMethod>,
39 ALWAYS_INLINE ReflectiveHandle(const ReflectiveHandle<T>& handle) = default;
40 ALWAYS_INLINE ReflectiveHandle<T>& operator=(const ReflectiveHandle<T>& handle) = default;
42 ALWAYS_INLINE explicit ReflectiveHandle(ReflectiveReference<T>* reference) in ReflectiveHandle()
45 ALWAYS_INLINE T& operator*() const REQUIRES_SHARED(Locks::mutator_lock_) { in REQUIRES_SHARED()
49 ALWAYS_INLINE T* operator->() const REQUIRES_SHARED(Locks::mutator_lock_) {
53 ALWAYS_INLINE T* Get() const REQUIRES_SHARED(Locks::mutator_lock_) { in Get()
71 ReflectiveReference<T>* reference_;
80 template <typename T>
[all …]
Dhandle.h34 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 …]
Dhandle_wrapper.h28 template<class T>
29 class HandleWrapper : public MutableHandle<T> {
31 HandleWrapper(T** obj, const MutableHandle<T>& handle) in HandleWrapper()
32 : MutableHandle<T>(handle), obj_(obj) { in HandleWrapper()
38 *obj_ = MutableHandle<T>::Get(); in ~HandleWrapper()
42 T** const obj_;
48 template<class T>
49 class HandleWrapperObjPtr : public MutableHandle<T> {
51 HandleWrapperObjPtr(ObjPtr<T>* obj, const MutableHandle<T>& handle) in HandleWrapperObjPtr()
52 : 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 …]
/art/runtime/mirror/
Dobject_array-inl.h39 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 …]
Dobject_array.h29 template<typename T, typename Container> class ArrayIter;
30 template <typename T> using ConstObjPtrArrayIter = ArrayIter<T, const ObjPtr<ObjectArray<T>>>;
31 template <typename T> using ConstHandleArrayIter = ArrayIter<T, const Handle<ObjectArray<T>>>;
32 template <typename T> using ObjPtrArrayIter = ArrayIter<T, ObjPtr<ObjectArray<T>>>;
33 template <typename T> using HandleArrayIter = ArrayIter<T, Handle<ObjectArray<T>>>;
35 template<class T>
45 static ObjPtr<ObjectArray<T>> Alloc(Thread* self,
51 static ObjPtr<ObjectArray<T>> Alloc(Thread* self,
58 ALWAYS_INLINE ObjPtr<T> Get(int32_t i) REQUIRES_SHARED(Locks::mutator_lock_);
64 bool CheckAssignable(ObjPtr<T> object) NO_THREAD_SAFETY_ANALYSIS;
[all …]
Dvar_handle.cc270 template <typename T>
305 template <typename T, std::memory_order MO>
306 class AtomicGetAccessor : public Object::Accessor<T> {
310 void Access(T* addr) override { in Access()
311 std::atomic<T>* atom = reinterpret_cast<std::atomic<T>*>(addr); in Access()
319 template <typename T, std::memory_order MO>
320 class AtomicSetAccessor : public Object::Accessor<T> {
322 explicit AtomicSetAccessor(T new_value) : new_value_(new_value) {} in AtomicSetAccessor()
324 void Access(T* addr) override { in Access()
325 std::atomic<T>* atom = reinterpret_cast<std::atomic<T>*>(addr); in Access()
[all …]
Darray-inl.h68 template<typename T>
69 inline T PrimitiveArray<T>::Get(int32_t i) { in Get()
72 return T(0); in Get()
77 template<typename T>
78 inline void PrimitiveArray<T>::Set(int32_t i, T value) { in Set()
86 template<typename T>
88 inline void PrimitiveArray<T>::Set(int32_t i, T value) { in Set()
96 template<typename T>
98 inline void PrimitiveArray<T>::SetWithoutChecks(int32_t i, T value) { in SetWithoutChecks()
110 template<typename T>
[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/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.h146 template <typename T>
156 void operator()(T* ptr) const { in operator()
166 template <typename T>
167 class JvmtiDeleter<T[]> {
187 template <typename T>
188 using JvmtiUniquePtr = std::unique_ptr<T, JvmtiDeleter<T>>;
190 template <typename T>
192 static inline JvmtiUniquePtr<T> MakeJvmtiUniquePtr(jvmtiEnv* env, T* mem) { in MakeJvmtiUniquePtr()
193 return JvmtiUniquePtr<T>(mem, JvmtiDeleter<T>(env)); in MakeJvmtiUniquePtr()
196 template <typename T>
[all …]
/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/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 …]

12345678910>>...12