Home
last modified time | relevance | path

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

123456789

/packages/apps/Gallery2/jni/filters/
Dkmeans.h25 template <typename T, typename N>
26 inline void sum(T values[], int len, int dimension, int stride, N dst[]) { in sum()
39 template <typename T, typename N>
40 inline void set(T val1[], N val2[], int dimension) { in set()
47 template <typename T, typename N>
48 inline void add(T val[], N dst[], int dimension) { in add()
55 template <typename T, typename N>
56 inline void divide(T dst[], N divisor, int dimension) { in divide()
70 template <typename T, typename N>
71 inline N euclideanDist(T val1[], T val2[], int dimension) { in euclideanDist()
[all …]
/packages/apps/Messaging/src/com/android/messaging/datamodel/media/
DMediaResourceManager.java93 public interface MediaResourceLoadListener<T extends RefCountedMediaResource> {
94 void onMediaResourceLoaded(MediaRequest<T> request, T resource, boolean cached); in onMediaResourceLoaded()
95 void onMediaResourceLoadError(MediaRequest<T> request, Exception exception); in onMediaResourceLoadError()
126 public <T extends RefCountedMediaResource> void requestMediaResourceAsync( in requestMediaResourceAsync()
127 final MediaRequest<T> mediaRequest) { in requestMediaResourceAsync()
136 public <T extends RefCountedMediaResource> T requestMediaResourceSync( in requestMediaResourceSync()
137 final MediaRequest<T> mediaRequest) { in requestMediaResourceSync()
140 MediaLoadingResult<T> loadResult = null; in requestMediaResourceSync()
159 private <T extends RefCountedMediaResource> MediaLoadingResult<T> processMediaRequestInternal( in processMediaRequestInternal()
160 final MediaRequest<T> mediaRequest) in processMediaRequestInternal()
[all …]
DAsyncMediaRequestWrapper.java26 class AsyncMediaRequestWrapper<T extends RefCountedMediaResource> extends BindableMediaRequest<T> {
31 public static <T extends RefCountedMediaResource> AsyncMediaRequestWrapper<T>
32 createWith(final MediaRequest<T> wrappedRequest, in createWith()
33 final MediaResourceLoadListener<T> listener) { in createWith()
34 return new AsyncMediaRequestWrapper<T>(listener, wrappedRequest); in createWith()
37 private final MediaRequest<T> mWrappedRequest;
39 private AsyncMediaRequestWrapper(final MediaResourceLoadListener<T> listener, in AsyncMediaRequestWrapper()
40 final MediaRequest<T> wrappedRequest) { in AsyncMediaRequestWrapper()
51 public MediaCache<T> getMediaCache() { in getMediaCache()
61 public T loadMediaBlocking(List<MediaRequest<T>> chainedTask) throws Exception { in loadMediaBlocking()
[all …]
/packages/apps/Test/connectivity/sl4n/rapidjson/include/rapidjson/internal/
Dmeta.h38 template <typename T> struct Void { typedef void Type; };
73 template <typename T> struct AddConst { typedef const T Type; };
74 template <bool Constify, typename T> struct MaybeAddConst : SelectIfCond<Constify, const T, T> {};
75 template <typename T> struct RemoveConst { typedef T Type; };
76 template <typename T> struct RemoveConst<const T> { typedef T Type; };
82 template <typename T, typename U> struct IsSame : FalseType {};
83 template <typename T> struct IsSame<T, T> : TrueType {};
85 template <typename T> struct IsConst : FalseType {};
86 template <typename T> struct IsConst<const T> : TrueType {};
88 template <typename CT, typename T>
[all …]
Dstack.h110 template<typename T>
111 RAPIDJSON_FORCEINLINE T* Push(size_t count = 1) {
113 if (stackTop_ + sizeof(T) * count >= stackEnd_)
114 Expand<T>(count);
116 T* ret = reinterpret_cast<T*>(stackTop_);
117 stackTop_ += sizeof(T) * count;
121 template<typename T>
122 T* Pop(size_t count) { in Pop()
123 RAPIDJSON_ASSERT(GetSize() >= count * sizeof(T)); in Pop()
124 stackTop_ -= count * sizeof(T); in Pop()
[all …]
/packages/apps/Test/connectivity/sl4n/rapidjson/include/rapidjson/
Dpointer.h230 template <typename T>
231 …RAPIDJSON_DISABLEIF_RETURN((internal::NotExpr<internal::IsSame<typename internal::RemoveConst<T>::…
232 Append(T* name, Allocator* allocator = 0) const {
530 template <typename T>
531 …RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >…
532 …GetWithDefault(ValueType& root, T defaultValue, typename ValueType::AllocatorType& allocator) cons… in GetWithDefault()
560 template <typename T, typename stackAllocator>
561 …RAPIDJSON_DISABLEIF_RETURN((internal::OrExpr<internal::IsPointer<T>, internal::IsGenericValue<T> >…
562 …EncodingType, typename ValueType::AllocatorType, stackAllocator>& document, T defaultValue) const { in GetWithDefault()
606 template <typename T>
[all …]
/packages/services/Car/car-lib/src/android/car/hardware/
DCarPropertyConfig.java39 public class CarPropertyConfig<T> implements Parcelable {
41 private final Class<T> mType;
43 private final SparseArray<AreaConfig<T>> mSupportedAreas;
45 private CarPropertyConfig(Class<T> type, int propertyId, int areaType, in CarPropertyConfig()
46 SparseArray<AreaConfig<T>> supportedAreas) { in CarPropertyConfig()
54 public Class<T> getPropertyType() { return mType; } in getPropertyType()
91 public T getMinValue(int areaId) { in getMinValue()
92 AreaConfig<T> area = mSupportedAreas.get(areaId); in getMinValue()
97 public T getMaxValue(int areaId) { in getMaxValue()
98 AreaConfig<T> area = mSupportedAreas.get(areaId); in getMaxValue()
[all …]
/packages/apps/Camera2/src/com/android/camera/async/
DConcurrentBufferQueue.java40 public class ConcurrentBufferQueue<T> implements BufferQueue<T>, BufferQueueController<T>,
46 public static interface UnusedElementProcessor<T> {
51 public void process(T element); in process()
58 private static class Entry<T> {
59 private final T mValue;
62 private Entry(T value, boolean closing) { in Entry()
71 public T getValue() { in getValue()
82 private final BlockingQueue<Entry<T>> mQueue;
91 private final UnusedElementProcessor<T> mUnusedElementProcessor;
93 public ConcurrentBufferQueue(UnusedElementProcessor<T> unusedElementProcessor) { in ConcurrentBufferQueue()
[all …]
DCountableBufferQueue.java28 public class CountableBufferQueue<T> implements BufferQueueController<T>, BufferQueue<T> {
29 private class DecrementingProcessor<T> implements
30 ConcurrentBufferQueue.UnusedElementProcessor<T> {
33 private DecrementingProcessor(ConcurrentBufferQueue.UnusedElementProcessor<T> processor) { in DecrementingProcessor()
38 public void process(T element) { in process()
44 private final ConcurrentBufferQueue<T> mBufferQueue;
56 .UnusedElementProcessor<T> processor) { in CountableBufferQueue()
57 mBufferQueue = new ConcurrentBufferQueue<T>(new DecrementingProcessor<T>(processor)); in CountableBufferQueue()
64 this(sizeCallback, new ConcurrentBufferQueue.UnusedElementProcessor<T>() { in CountableBufferQueue()
66 public void process(T element) { in CountableBufferQueue()
[all …]
DObservables.java51 public static <F, T> Observable<T> transform(final Observable<F> input, in transform()
52 final Function<F, T> function) { in transform()
53 return new Observable<T>() { in transform()
56 public T get() { in transform()
72 public static <T> Observable<T> transform(final List<? extends Observable<?>> inputs,
73 final Supplier<T> output) {
82 public static <F, T> Observable<T> transform(final List<? extends Observable<F>> input,
83 Function<List<F>, T> function) {
91 public static <T> Observable<T> of(final @Nonnull T constant) {
92 return new Observable<T>() {
[all …]
/packages/apps/TV/tests/common/src/com/android/tv/testing/
DComparatorTester.java49 public class ComparatorTester<T> {
51 private final List<List<T>> listOfGroups = new ArrayList<>();
53 private final Comparator<T> comparator;
56 public static <T> ComparatorTester<T> withoutEqualsTest(Comparator<T> comparator) { in withoutEqualsTest()
60 private ComparatorTester(Comparator<T> comparator) { in ComparatorTester()
65 public final ComparatorTester<T> addComparableGroup(T... items) { in addComparableGroup()
72 List<T> currentGroup = listOfGroups.get(i); in test()
74 List<T> lhs = listOfGroups.get(j); in test()
79 List<T> rhs = listOfGroups.get(j); in test()
86 private void assertOrder(int less, int more, List<T> lessGroup, List<T> moreGroup) { in assertOrder()
[all …]
DComparableTester.java47 public class ComparableTester<T extends Comparable<T>> {
49 private final List<List<T>> listOfGroups = new ArrayList<>();
52 public final ComparableTester<T> addEquivalentGroup(T... items) { in addEquivalentGroup()
59 List<T> currentGroup = listOfGroups.get(i); in test()
61 List<T> lhs = listOfGroups.get(j); in test()
66 List<T> rhs = listOfGroups.get(j); in test()
72 private void assertOrder(int less, int more, List<T> lessGroup, List<T> moreGroup) { in assertOrder()
77 private void assertLess(int left, int right, Collection<T> leftGroup, in assertLess()
78 Collection<T> rightGroup) { in assertLess()
80 for (T leftItem : leftGroup) { in assertLess()
[all …]
/packages/services/Car/service/src/com/android/car/
DBinderInterfaceContainer.java30 public class BinderInterfaceContainer<T extends IInterface> {
32 public static class BinderInterface<T extends IInterface>
34 public final T binderInterface;
35 private final BinderInterfaceContainer<T> mContainer;
37 public BinderInterface(BinderInterfaceContainer<T> container, T binderInterface) { in BinderInterface()
49 public interface BinderEventHandler<T extends IInterface> {
50 void onBinderDeath(BinderInterface<T> bInterface); in onBinderDeath()
53 private final BinderEventHandler<T> mEventHandler;
54 private final HashMap<IBinder, BinderInterface<T>> mBinders = new HashMap<>();
56 public BinderInterfaceContainer(@Nullable BinderEventHandler<T> eventHandler) { in BinderInterfaceContainer()
[all …]
/packages/apps/Test/connectivity/sl4n/rapidjson/test/unittest/
Ditoatest.cpp25 template <typename T>
57 template <typename T>
58 static void VerifyValue(T value, void(*f)(T, char*), char* (*g)(T, char*)) { in VerifyValue() argument
59 char buffer1[Traits<T>::kBufferSize]; in VerifyValue()
60 char buffer2[Traits<T>::kBufferSize]; in VerifyValue()
69 template <typename T>
70 static void Verify(void(*f)(T, char*), char* (*g)(T, char*)) { in Verify() argument
72 VerifyValue<T>(0, f, g); in Verify()
73 VerifyValue<T>(std::numeric_limits<T>::min(), f, g); in Verify()
74 VerifyValue<T>(std::numeric_limits<T>::max(), f, g); in Verify()
[all …]
Dwritertest.cpp181 #define T(x)\ in TEST() macro
187 T(writer.Bool(false)); in TEST()
188 T(writer.Bool(true)); in TEST()
189 T(writer.Null()); in TEST()
190 T(writer.Int(0)); in TEST()
191 T(writer.Uint(0)); in TEST()
192 T(writer.Int64(0)); in TEST()
193 T(writer.Uint64(0)); in TEST()
194 T(writer.Double(0)); in TEST()
195 T(writer.String("foo")); in TEST()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/util/
DJobLimiter.java41 private static class JobWrapper<T> implements Future<T>, Job<T> {
43 private Job<T> mJob;
44 private Future<T> mDelegate;
45 private FutureListener<T> mListener;
46 private T mResult;
48 public JobWrapper(Job<T> job, FutureListener<T> listener) { in JobWrapper()
53 public synchronized void setFuture(Future<T> future) { in setFuture()
60 FutureListener<T> listener = null; in cancel()
90 public synchronized T get() { in get()
104 public T run(JobContext jc) { in run()
[all …]
DLinkedNode.java43 public static class List<T extends LinkedNode> {
46 public void insertLast(T node) { in insertLast()
50 public T getFirst() { in getFirst()
51 return (T) (mHead.mNext == mHead ? null : mHead.mNext); in getFirst()
54 public T getLast() { in getLast()
55 return (T) (mHead.mPrev == mHead ? null : mHead.mPrev); in getLast()
58 public T nextOf(T node) { in nextOf()
59 return (T) (node.mNext == mHead ? null : node.mNext); in nextOf()
62 public T previousOf(T node) { in previousOf()
63 return (T) (node.mPrev == mHead ? null : node.mPrev); in previousOf()
[all …]
/packages/apps/UnifiedEmail/src/com/android/mail/browse/
DMergedAdapter.java34 public class MergedAdapter<T extends ListAdapter> extends BaseAdapter {
36 private List<T> mAdapters;
39 public static class LocalAdapterPosition<T extends ListAdapter> {
40 private final T mAdapter;
43 public LocalAdapterPosition(T adapter, int offset) { in LocalAdapterPosition()
48 public T getAdapter() { in getAdapter()
66 public void setAdapters(T... adapters) { in setAdapters()
68 for (T adapter : mAdapters) { in setAdapters()
75 for (T adapter : mAdapters) { in setAdapters()
84 public T getSubAdapter(int index) { in getSubAdapter()
[all …]
/packages/apps/Messaging/src/com/android/messaging/datamodel/binding/
DBindingBase.java31 public abstract class BindingBase<T extends BindableData> {
35 public static <T extends BindableData> Binding<T> createBinding(final Object owner) { in createBinding()
36 return new Binding<T>(owner); in createBinding()
44 public static <T extends BindableData> ImmutableBindingRef<T> createBindingReference( in createBindingReference()
45 final BindingBase<T> srcBinding) { in createBindingReference()
46 return new ImmutableBindingRef<T>(srcBinding); in createBindingReference()
53 public static <T extends BindableData> DetachableBinding<T> createDetachableBinding( in createDetachableBinding()
55 return new DetachableBinding<T>(owner); in createDetachableBinding()
58 public abstract T getData(); in getData()
68 public abstract boolean isBound(final T data); in isBound()
[all …]
DImmutableBindingRef.java27 public class ImmutableBindingRef<T extends BindableData> extends BindingBase<T> {
31 private final BindingBase<T> mBinding;
36 ImmutableBindingRef(final BindingBase<T> binding) { in ImmutableBindingRef()
41 public T getData() { in getData()
51 public boolean isBound(final T data) { in isBound()
61 public void ensureBound(final T data) { in ensureBound()
75 private BindingBase<T> resolveBinding(final BindingBase<T> binding) { in resolveBinding()
76 BindingBase<T> resolvedBinding = binding; in resolveBinding()
78 resolvedBinding = ((ImmutableBindingRef<T>) resolvedBinding).mBinding; in resolveBinding()
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/util/
DThreadPool.java44 public interface Job<T> {
45 public T run(JobContext jc); in run()
97 public <T> Future<T> submit(Job<T> job, FutureListener<T> listener) { in submit()
98 Worker<T> w = new Worker<T>(job, listener); in submit()
103 public <T> Future<T> submit(Job<T> job) { in submit()
107 private class Worker<T> implements Runnable, Future<T>, JobContext {
110 private Job<T> mJob;
111 private FutureListener<T> mListener;
116 private T mResult;
119 public Worker(Job<T> job, FutureListener<T> listener) { in Worker()
[all …]
/packages/apps/Camera2/src/android/util/
DPools.java50 public static interface Pool<T> {
55 public T acquire(); in acquire()
65 public boolean release(T instance); in release()
77 public static class SimplePool<T> implements Pool<T> {
98 public T acquire() { in acquire()
101 T instance = (T) mPool[lastPooledIndex]; in acquire()
110 public boolean release(T instance) { in release()
122 private boolean isInPool(T instance) { in isInPool()
137 public static class SynchronizedPool<T> extends SimplePool<T> {
152 public T acquire() { in acquire()
[all …]
/packages/apps/Gallery2/src/android/util/
DPools.java50 public static interface Pool<T> {
55 public T acquire(); in acquire()
65 public boolean release(T instance); in release()
77 public static class SimplePool<T> implements Pool<T> {
98 public T acquire() { in acquire()
101 T instance = (T) mPool[lastPooledIndex]; in acquire()
110 public boolean release(T instance) { in release()
122 private boolean isInPool(T instance) { in isInPool()
137 public static class SynchronizedPool<T> extends SimplePool<T> {
152 public T acquire() { in acquire()
[all …]
/packages/apps/TV/src/com/android/tv/dvr/ui/
DSortedArrayAdapter.java34 abstract class SortedArrayAdapter<T> extends ObjectAdapter {
35 private final List<T> mItems = new ArrayList<>();
36 private final Comparator<T> mComparator;
38 SortedArrayAdapter(PresenterSelector presenterSelector, Comparator<T> comparator) { in SortedArrayAdapter()
59 T item = mItems.get(position); in getId()
68 abstract long getId(T item); in getId()
76 final T getItem(int position) { in getItem()
107 final void addAll(Collection<T> items) { in addAll()
118 final void add(T item) { in add()
133 final void remove(T item) { in remove()
[all …]
/packages/apps/TV/src/com/android/tv/util/
DMultiLongSparseArray.java31 public class MultiLongSparseArray<T> {
34 private final LongSparseArray<Set<T>> mSparseArray;
35 private final Set<T>[] mEmptySets;
53 public void put(long key, T value) { in put()
54 Set<T> values = mSparseArray.get(key); in put()
65 public void remove(long key, T value) { in remove()
66 Set<T> values = mSparseArray.get(key); in remove()
80 public Iterable<T> get(long key) { in get()
81 Set<T> values = mSparseArray.get(key); in get()
99 private void cacheEmptySet(Set<T> emptySet) { in cacheEmptySet()
[all …]

123456789