Home
last modified time | relevance | path

Searched refs:newCapacity (Results 1 – 25 of 42) sorted by relevance

12

/external/libgdx/extensions/gdx-box2d/gdx-box2d-gwt/src/com/badlogic/gdx/physics/box2d/gwt/emu/org/jbox2d/common/
DBufferUtils.java11 int newCapacity) { in reallocateBuffer() argument
12 assert (newCapacity > oldCapacity); in reallocateBuffer()
14 T[] newBuffer = (T[]) ArrayReflection.newInstance(klass, newCapacity); in reallocateBuffer()
18 for (int i = oldCapacity; i < newCapacity; i++) { in reallocateBuffer()
29 public static int[] reallocateBuffer(int[] oldBuffer, int oldCapacity, int newCapacity) { in reallocateBuffer() argument
30 assert (newCapacity > oldCapacity); in reallocateBuffer()
31 int[] newBuffer = new int[newCapacity]; in reallocateBuffer()
39 public static float[] reallocateBuffer(float[] oldBuffer, int oldCapacity, int newCapacity) { in reallocateBuffer() argument
40 assert (newCapacity > oldCapacity); in reallocateBuffer()
41 float[] newBuffer = new float[newCapacity]; in reallocateBuffer()
[all …]
/external/icu/icu4c/source/common/
Dcmemory.h235 inline T *allocateInsteadAndReset(int32_t newCapacity=1);
247 inline T *allocateInsteadAndCopy(int32_t newCapacity=1, int32_t length=0);
258 inline T *LocalMemory<T>::allocateInsteadAndReset(int32_t newCapacity) { in allocateInsteadAndReset() argument
259 if(newCapacity>0) { in allocateInsteadAndReset()
260 T *p=(T *)uprv_malloc(newCapacity*sizeof(T)); in allocateInsteadAndReset()
262 uprv_memset(p, 0, newCapacity*sizeof(T)); in allocateInsteadAndReset()
274 inline T *LocalMemory<T>::allocateInsteadAndCopy(int32_t newCapacity, int32_t length) { in allocateInsteadAndCopy() argument
275 if(newCapacity>0) { in allocateInsteadAndCopy()
276 T *p=(T *)uprv_malloc(newCapacity*sizeof(T)); in allocateInsteadAndCopy()
279 if(length>newCapacity) { in allocateInsteadAndCopy()
[all …]
Ducharstriebuilder.cpp106 int32_t newCapacity; in add() local
108 newCapacity=1024; in add()
110 newCapacity=4*elementsCapacity; in add()
112 UCharsTrieElement *newElements=new UCharsTrieElement[newCapacity]; in add()
122 elementsCapacity=newCapacity; in add()
326 int32_t newCapacity=ucharsCapacity; in ensureCapacity() local
328 newCapacity*=2; in ensureCapacity()
329 } while(newCapacity<=length); in ensureCapacity()
330 UChar *newUChars=static_cast<UChar *>(uprv_malloc(newCapacity*2)); in ensureCapacity()
338 u_memcpy(newUChars+(newCapacity-ucharsLength), in ensureCapacity()
[all …]
Dbytestriebuilder.cpp156 int32_t newCapacity; in add() local
158 newCapacity=1024; in add()
160 newCapacity=4*elementsCapacity; in add()
162 BytesTrieElement *newElements=new BytesTrieElement[newCapacity]; in add()
172 elementsCapacity=newCapacity; in add()
378 int32_t newCapacity=bytesCapacity; in ensureCapacity() local
380 newCapacity*=2; in ensureCapacity()
381 } while(newCapacity<=length); in ensureCapacity()
382 char *newBytes=static_cast<char *>(uprv_malloc(newCapacity)); in ensureCapacity()
390 uprv_memcpy(newBytes+(newCapacity-bytesLength), in ensureCapacity()
[all …]
/external/libgdx/extensions/gdx-bullet/jni/src/bullet/BulletCollision/CollisionDispatch/
DbtHashedSimplePairCache.cpp100 int newCapacity = m_overlappingPairArray.capacity(); in growTables() local
102 if (m_hashTable.size() < newCapacity) in growTables()
107 m_hashTable.resize(newCapacity); in growTables()
108 m_next.resize(newCapacity); in growTables()
113 for (i= 0; i < newCapacity; ++i) in growTables()
117 for (i = 0; i < newCapacity; ++i) in growTables()
154 int newCapacity = m_overlappingPairArray.capacity(); in internalAddPair() local
156 if (oldCapacity < newCapacity) in internalAddPair()
/external/lzma/CPP/Common/
DMyVector.h22 unsigned newCapacity = _capacity + (_capacity >> 2) + 1; in ReserveOnePosition() local
23 T *p = new T[newCapacity]; in ReserveOnePosition()
27 _capacity = newCapacity; in ReserveOnePosition()
59 void Reserve(unsigned newCapacity) in Reserve() argument
61 if (newCapacity > _capacity) in Reserve()
63 T *p = new T[newCapacity]; in Reserve()
67 _capacity = newCapacity; in Reserve()
71 void ClearAndReserve(unsigned newCapacity) in ClearAndReserve() argument
74 if (newCapacity > _capacity) in ClearAndReserve()
79 _items = new T[newCapacity]; in ClearAndReserve()
[all …]
/external/guava/guava/src/com/google/common/collect/
DImmutableCollection.java223 int newCapacity = oldCapacity + (oldCapacity >> 1) + 1; in expandedCapacity() local
224 if (newCapacity < minCapacity) { in expandedCapacity()
225 newCapacity = Integer.highestOneBit(minCapacity - 1) << 1; in expandedCapacity()
227 if (newCapacity < 0) { in expandedCapacity()
228 newCapacity = Integer.MAX_VALUE; in expandedCapacity()
231 return newCapacity; in expandedCapacity()
/external/libgdx/extensions/gdx-bullet/jni/src/bullet/LinearMath/
DbtHashMap.h232 int newCapacity = m_valueArray.capacity(); in growTables() local
234 if (m_hashTable.size() < newCapacity) in growTables()
239 m_hashTable.resize(newCapacity); in growTables()
240 m_next.resize(newCapacity); in growTables()
244 for (i= 0; i < newCapacity; ++i) in growTables()
248 for (i = 0; i < newCapacity; ++i) in growTables()
285 int newCapacity = m_valueArray.capacity(); in insert() local
286 if (oldCapacity < newCapacity) in insert()
/external/icu/icu4c/source/tools/toolutil/
Dtoolutil.cpp295 int32_t newCapacity; in utm_hasCapacity() local
305 newCapacity=capacity; in utm_hasCapacity()
307 newCapacity=2*mem->capacity; in utm_hasCapacity()
309 newCapacity=mem->maxCapacity; in utm_hasCapacity()
313 mem->array=uprv_malloc(newCapacity*mem->size); in utm_hasCapacity()
318 mem->array=uprv_realloc(mem->array, newCapacity*mem->size); in utm_hasCapacity()
325 mem->capacity=newCapacity; in utm_hasCapacity()
/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/
DExpandedNameTable.java250 int newCapacity = 2 * oldCapacity + 1; in rehash() local
251 m_capacity = newCapacity; in rehash()
252 m_threshold = (int)(newCapacity * m_loadFactor); in rehash()
254 m_table = new HashEntry[newCapacity]; in rehash()
262 int newIndex = e.hash % newCapacity; in rehash()
/external/libgdx/extensions/gdx-bullet/jni/src/bullet/BulletCollision/BroadphaseCollision/
DbtOverlappingPairCache.cpp175 int newCapacity = m_overlappingPairArray.capacity(); in growTables() local
177 if (m_hashTable.size() < newCapacity) in growTables()
182 m_hashTable.resize(newCapacity); in growTables()
183 m_next.resize(newCapacity); in growTables()
188 for (i= 0; i < newCapacity; ++i) in growTables()
192 for (i = 0; i < newCapacity; ++i) in growTables()
249 int newCapacity = m_overlappingPairArray.capacity(); in internalAddPair() local
251 if (oldCapacity < newCapacity) in internalAddPair()
/external/jmonkeyengine/engine/src/core/com/jme3/util/
DIntMap.java142 int newCapacity = 2 * capacity; in put() local
143 Entry[] newTable = new Entry[newCapacity]; in put()
145 int bucketmask = newCapacity - 1; in put()
160 capacity = newCapacity; in put()
161 threshold = (int) (newCapacity * loadFactor); in put()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DCharsTrieBuilder.java139 int newCapacity=chars.length; in ensureCapacity() local
141 newCapacity*=2; in ensureCapacity()
142 } while(newCapacity<=length); in ensureCapacity()
143 char[] newChars=new char[newCapacity]; in ensureCapacity()
DBytesTrieBuilder.java161 int newCapacity=bytes.length; in ensureCapacity() local
163 newCapacity*=2; in ensureCapacity()
164 } while(newCapacity<=length); in ensureCapacity()
165 byte[] newBytes=new byte[newCapacity]; in ensureCapacity()
/external/icu/android_icu4j/src/main/java/android/icu/util/
DCharsTrieBuilder.java135 int newCapacity=chars.length; in ensureCapacity() local
137 newCapacity*=2; in ensureCapacity()
138 } while(newCapacity<=length); in ensureCapacity()
139 char[] newChars=new char[newCapacity]; in ensureCapacity()
DBytesTrieBuilder.java157 int newCapacity=bytes.length; in ensureCapacity() local
159 newCapacity*=2; in ensureCapacity()
160 } while(newCapacity<=length); in ensureCapacity()
161 byte[] newBytes=new byte[newCapacity]; in ensureCapacity()
/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/
DUVector64.java42 int newCapacity = buffer.length <= 0xffff ? 4 * buffer.length : 2 * buffer.length; in ensureAppendCapacity() local
43 long[] newBuffer = new long[newCapacity]; in ensureAppendCapacity()
DUVector32.java42 int newCapacity = buffer.length <= 0xffff ? 4 * buffer.length : 2 * buffer.length; in ensureAppendCapacity() local
43 int[] newBuffer = new int[newCapacity]; in ensureAppendCapacity()
DCollationKeys.java243 int newCapacity = 2 * buffer.length; in ensureCapacity() local
245 if (newCapacity < altCapacity) { in ensureCapacity()
246 newCapacity = altCapacity; in ensureCapacity()
248 if (newCapacity < 200) { in ensureCapacity()
249 newCapacity = 200; in ensureCapacity()
251 byte[] newbuf = new byte[newCapacity]; in ensureCapacity()
/external/icu/icu4j/main/classes/collate/src/com/ibm/icu/impl/coll/
DUVector32.java38 int newCapacity = buffer.length <= 0xffff ? 4 * buffer.length : 2 * buffer.length; in ensureAppendCapacity() local
39 int[] newBuffer = new int[newCapacity]; in ensureAppendCapacity()
DUVector64.java38 int newCapacity = buffer.length <= 0xffff ? 4 * buffer.length : 2 * buffer.length; in ensureAppendCapacity() local
39 long[] newBuffer = new long[newCapacity]; in ensureAppendCapacity()
DCollationKeys.java239 int newCapacity = 2 * buffer.length; in ensureCapacity() local
241 if (newCapacity < altCapacity) { in ensureCapacity()
242 newCapacity = altCapacity; in ensureCapacity()
244 if (newCapacity < 200) { in ensureCapacity()
245 newCapacity = 200; in ensureCapacity()
247 byte[] newbuf = new byte[newCapacity]; in ensureCapacity()
/external/libgdx/extensions/gdx-box2d/gdx-box2d-gwt/src/com/badlogic/gdx/physics/box2d/gwt/emu/org/jbox2d/particle/
DParticleSystem.java239 int newCapacity = m_proxyCount != 0 ? 2 * m_proxyCount : Settings.minParticleBufferCapacity; in createParticle() local
241 BufferUtils.reallocateBuffer(Proxy.class, m_proxyBuffer, oldCapacity, newCapacity); in createParticle()
242 m_proxyCapacity = newCapacity; in createParticle()
362 int newCapacity = in createParticleGroup() local
365 BufferUtils.reallocateBuffer(Pair.class, m_pairBuffer, oldCapacity, newCapacity); in createParticleGroup()
366 m_pairCapacity = newCapacity; in createParticleGroup()
423 int newCapacity = in joinParticleGroups() local
426 BufferUtils.reallocateBuffer(Pair.class, m_pairBuffer, oldCapacity, newCapacity); in joinParticleGroups()
427 m_pairCapacity = newCapacity; in joinParticleGroups()
563 int newCapacity =
[all …]
/external/deqp/framework/delibs/depool/
DdePoolArray.c72 int newCapacity = deAlign32(size, 1 << DE_ARRAY_ELEMENTS_PER_PAGE_LOG2); in dePoolArray_reserve() local
73 int reqPageTableCapacity = newCapacity >> DE_ARRAY_ELEMENTS_PER_PAGE_LOG2; in dePoolArray_reserve()
127 DE_ASSERT(arr->capacity >= newCapacity); in dePoolArray_reserve()
/external/icu/icu4c/source/i18n/
Dsortkey.cpp99 uint8_t *CollationKey::reallocate(int32_t newCapacity, int32_t length) { in reallocate() argument
100 uint8_t *newBytes = static_cast<uint8_t *>(uprv_malloc(newCapacity)); in reallocate()
107 fUnion.fFields.fCapacity = newCapacity; in reallocate()

12