Home
last modified time | relevance | path

Searched refs:k (Results 1 – 25 of 72) sorted by relevance

123

/libcore/luni/src/main/java/java/util/
DDualPivotQuicksort.java192 for (int k = less; k <= great; k++) { in dualPivotQuicksort()
193 int ak = a[k]; in dualPivotQuicksort()
195 if (k != less) { in dualPivotQuicksort()
196 a[k] = a[less]; in dualPivotQuicksort()
202 if (great-- == k) { in dualPivotQuicksort()
207 a[k] = a[less]; in dualPivotQuicksort()
211 a[k] = a[great]; in dualPivotQuicksort()
237 for (int k = less; k <= great; k++) { in dualPivotQuicksort()
238 int ak = a[k]; in dualPivotQuicksort()
243 if (k != less) { in dualPivotQuicksort()
[all …]
/libcore/luni/src/main/java/org/apache/harmony/security/asn1/
DASN1BitString.java144 for (int k = 0; k < 8; k++, j++) { in getDecodedObject()
145 value[j] = (SET_MASK[k] & octet) != 0; in getDecodedObject()
152 for (int k = 0; k < (8 - unusedBits); k++, j++) { in getDecodedObject()
153 value[j] = (SET_MASK[k] & octet) != 0; in getDecodedObject()
177 for (int k = 0; k < 8; k++, j++) { in setEncodingContent()
179 bytes[i] = (byte) (bytes[i] | SET_MASK[k]); in setEncodingContent()
185 for (int k = 0; k < (8 - unusedBits); k++, j++) { in setEncodingContent()
187 bytes[index] = (byte) (bytes[index] | SET_MASK[k]); in setEncodingContent()
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DDigestOutputStreamTest.java145 for (int k=0; k<algorithmName.length; k++) { in testWriteint01()
147 MessageDigest md = MessageDigest.getInstance(algorithmName[k]); in testWriteint01()
157 MDGoldenData.getDigest(algorithmName[k]))); in testWriteint01()
177 for (int k=0; k<algorithmName.length; k++) { in testWriteint02()
179 MessageDigest md = MessageDigest.getInstance(algorithmName[k]); in testWriteint02()
194 MDGoldenData.getDigest(algorithmName[k]+"_NU"))); in testWriteint02()
211 for (int k=0; k<algorithmName.length; k++) { in testWriteint03()
213 MessageDigest md = MessageDigest.getInstance(algorithmName[k]); in testWriteint03()
284 for (int k=0; k<algorithmName.length; k++) { in test_write$BII_1()
287 MessageDigest md = MessageDigest.getInstance(algorithmName[k]); in test_write$BII_1()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/security/tests/provider/crypto/
DSHA1PRNG_SecureRandomTest.java136 for (int k = 1; k < LENGTH; k += INCR) { in testNextBytesbyteArray02()
137 myBytes1 = new byte[k]; in testNextBytesbyteArray02()
138 myBytes2 = new byte[k]; in testNextBytesbyteArray02()
142 for (int l = 0; l < k; l++) { in testNextBytesbyteArray02()
143 assertFalse("unexpected: myBytes1[l] != myBytes2[l] :: l==" + l + " k=" + k in testNextBytesbyteArray02()
158 for (int k = 0; k < bytes1.length; k++) { in testNextBytesbyteArray02()
159 sr.nextBytes(bytes1[k]); in testNextBytesbyteArray02()
161 for (int k = 0; k < bytes2.length; k++) { in testNextBytesbyteArray02()
162 sr2.nextBytes(bytes2[k]); in testNextBytesbyteArray02()
165 for (int k = 0; k < n3; k++) { in testNextBytesbyteArray02()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/
DKeyGeneratorThread.java32 Key k = kg.generateKey(); in test() local
33 if(kg.getAlgorithm().toLowerCase().equals(k.getAlgorithm().toLowerCase()) != true) { in test()
41 byte[] array1 = k.getEncoded(); in test()
42 k = kg.generateKey(); in test()
43 byte[] array2 = k.getEncoded(); in test()
56 k = kg.generateKey(); in test()
57 array1 = k.getEncoded(); in test()
60 k = kg.generateKey(); in test()
61 array2 = k.getEncoded(); in test()
/libcore/luni/src/main/java/java/lang/
DRealToString.java199 int k = firstK; in freeFormatExponential() local
200 int exponent = k; in freeFormatExponential()
202 k--; in freeFormatExponential()
209 if (k == exponent - 1) { in freeFormatExponential()
221 int k = firstK; in freeFormat() local
222 if (k < 0) { in freeFormat()
225 for (int i = k + 1; i < 0; ++i) { in freeFormat()
233 } else if (k >= -1) { in freeFormat()
236 if (k == 0) { in freeFormat()
239 k--; in freeFormat()
[all …]
DThreadLocal.java207 Object k = table[i]; in inheritValues() local
209 if (k == null || k == TOMBSTONE) { in inheritValues()
216 = (Reference<InheritableThreadLocal<?>>) k; in inheritValues()
271 Object k = table[index]; in cleanUp() local
273 if (k == TOMBSTONE || k == null) { in cleanUp()
280 = (Reference<ThreadLocal<?>>) k; in cleanUp()
337 Object k = oldTable[i]; in rehash() local
338 if (k == null || k == TOMBSTONE) { in rehash()
346 = (Reference<ThreadLocal<?>>) k; in rehash()
367 Object k = table[index]; in add() local
[all …]
/libcore/luni/src/main/java/java/util/concurrent/
DPriorityBlockingQueue.java317 private static <T> void siftUpComparable(int k, T x, Object[] array) { in siftUpComparable() argument
319 while (k > 0) { in siftUpComparable()
320 int parent = (k - 1) >>> 1; in siftUpComparable()
324 array[k] = e; in siftUpComparable()
325 k = parent; in siftUpComparable()
327 array[k] = key; in siftUpComparable()
330 private static <T> void siftUpUsingComparator(int k, T x, Object[] array, in siftUpUsingComparator() argument
332 while (k > 0) { in siftUpUsingComparator()
333 int parent = (k - 1) >>> 1; in siftUpUsingComparator()
337 array[k] = e; in siftUpUsingComparator()
[all …]
DConcurrentHashMap.java199 Class<?> k = HashEntry.class;
201 (k.getDeclaredField("next"));
343 K k; in put() local
344 if ((k = e.key) == key || in put()
345 (e.hash == hash && key.equals(k))) { in put()
419 int k = last.hash & sizeMask; in rehash() local
420 if (k != lastIdx) { in rehash()
421 lastIdx = k; in rehash()
430 int k = h & sizeMask; in rehash() local
431 HashEntry<K,V> n = newTable[k]; in rehash()
[all …]
DScheduledThreadPoolExecutor.java846 private void siftUp(int k, RunnableScheduledFuture<?> key) { in siftUp() argument
847 while (k > 0) { in siftUp()
848 int parent = (k - 1) >>> 1; in siftUp()
852 queue[k] = e; in siftUp()
853 setIndex(e, k); in siftUp()
854 k = parent; in siftUp()
856 queue[k] = key; in siftUp()
857 setIndex(key, k); in siftUp()
864 private void siftDown(int k, RunnableScheduledFuture<?> key) { in siftDown() argument
866 while (k < half) { in siftDown()
[all …]
DConcurrentSkipListMap.java491 Class<?> k = Node.class;
493 (k.getDeclaredField("value"));
495 (k.getDeclaredField("next"));
571 Class<?> k = Index.class;
573 (k.getDeclaredField("right"));
691 K k = n.key; in findPredecessor() local
698 if (key.compareTo(k) > 0) { in findPredecessor()
913 int k; in insertIndex() local
918 k = level; in insertIndex()
926 k = oldLevel; in insertIndex()
[all …]
DCopyOnWriteArraySet.java340 int k = 0; in equals() local
342 if (++k > len) in equals()
353 return k == len; in equals()
DConcurrentLinkedQueue.java181 Class<?> k = Node.class;
183 (k.getDeclaredField("item"));
185 (k.getDeclaredField("next"));
598 int k = 0; in toArray() local
600 for (p = first(); p != null && k < a.length; p = succ(p)) { in toArray()
603 a[k++] = (T)item; in toArray()
606 if (k < a.length) in toArray()
607 a[k] = null; in toArray()
792 Class<?> k = ConcurrentLinkedQueue.class;
794 (k.getDeclaredField("head"));
[all …]
DSynchronousQueue.java260 Class<?> k = SNode.class;
262 (k.getDeclaredField("match"));
264 (k.getDeclaredField("next"));
485 Class<?> k = TransferStack.class;
487 (k.getDeclaredField("head"));
555 Class<?> k = QNode.class;
557 (k.getDeclaredField("item"));
559 (k.getDeclaredField("next"));
798 Class<?> k = TransferQueue.class;
800 (k.getDeclaredField("head"));
[all …]
/libcore/luni/src/test/java/libcore/java/security/
DKeyPairGeneratorTest.java203 private void test_Key(KeyPairGenerator kpg, Key k) throws Exception { in test_Key() argument
208 assertEquals(expectedAlgorithm, k.getAlgorithm().toUpperCase()); in test_Key()
209 assertNotNull(k.getEncoded()); in test_Key()
210 assertNotNull(k.getFormat()); in test_Key()
216 oos.writeObject(k); in test_Key()
222 assertEquals(k, inflatedKey); in test_Key()
225 test_KeyWithAllKeyFactories(k); in test_Key()
228 private void test_KeyWithAllKeyFactories(Key k) throws Exception { in test_KeyWithAllKeyFactories() argument
229 byte[] encoded = k.getEncoded(); in test_KeyWithAllKeyFactories()
231 String keyAlgo = k.getAlgorithm(); in test_KeyWithAllKeyFactories()
[all …]
/libcore/luni/src/test/java/tests/java/security/
DIdentityTest.java66 for (int k=0; k<value.length; k+=2) { in testEquals()
67 assertEquals(value[k+1], new Boolean(i1.equals(value[k]))); in testEquals()
68 if (Boolean.TRUE.equals(value[k+1])) assertEquals(i1.hashCode(), value[k].hashCode()); in testEquals()
228 for (int k=0; k<value.length; k+=2){ in testIdentityEquals()
229 assertEquals(value[k+1], new Boolean(i.identityEquals((Identity)value[k]))); in testIdentityEquals()
230 if (Boolean.TRUE.equals(value[k+1])) assertEquals(i.hashCode(), value[k].hashCode()); in testIdentityEquals()
/libcore/luni/src/main/native/
Djava_lang_RealToString.cpp68 jint k, firstK, U; in RealToString_bigIntDigitGenerator() local
123 k = static_cast<int>(ceil ((e + p - 1) * INV_LOG_OF_TEN_BASE_2 - 1e-10)); in RealToString_bigIntDigitGenerator()
125 if (k > 0) in RealToString_bigIntDigitGenerator()
127 timesTenToTheEHighPrecision (S, STemp_SIZE, k); in RealToString_bigIntDigitGenerator()
131 timesTenToTheEHighPrecision (R , RM_SIZE, -k); in RealToString_bigIntDigitGenerator()
132 timesTenToTheEHighPrecision (mplus , RM_SIZE, -k); in RealToString_bigIntDigitGenerator()
133 timesTenToTheEHighPrecision (mminus, RM_SIZE, -k); in RealToString_bigIntDigitGenerator()
155 firstK = k; in RealToString_bigIntDigitGenerator()
159 firstK = k - 1; in RealToString_bigIntDigitGenerator()
Djava_lang_StringToReal.cpp338 int32_t k, comparison, comparison2; in doubleAlgorithm() local
352 k = doubleExponent (z); in doubleAlgorithm()
361 if (e >= 0 && k >= 0) in doubleAlgorithm()
369 yLength = (k >> 6) + 2; in doubleAlgorithm()
373 simpleShiftLeftHighPrecision (y, yLength, k); in doubleAlgorithm()
377 xLength = sizeOfTenToTheE (e) + length + ((-k) >> 6) + 1; in doubleAlgorithm()
382 simpleShiftLeftHighPrecision (x, xLength, -k); in doubleAlgorithm()
388 else if (k >= 0) in doubleAlgorithm()
393 yLength = sizeOfTenToTheE (-e) + 2 + (k >> 6); in doubleAlgorithm()
398 simpleShiftLeftHighPrecision (y, yLength, k); in doubleAlgorithm()
[all …]
Djava_math_NativeBN.cpp211 #define BYTES2INT(bytes, k) \ argument
212 …((bytes[k + 3] & 0xff) | (bytes[k + 2] & 0xff) << 8 | (bytes[k + 1] & 0xff) << 16 | (bytes[k + 0] …
227 int k = bytesLen; in negBigEndianBytes2bn() local
230 while (k > highBytes) { in negBigEndianBytes2bn()
231 k -= 4; in negBigEndianBytes2bn()
232 di = BYTES2INT(bytes, k); in negBigEndianBytes2bn()
237 while (k > highBytes) { in negBigEndianBytes2bn()
238 k -= 4; in negBigEndianBytes2bn()
239 d[i] = ~BYTES2INT(bytes, k); in negBigEndianBytes2bn()
252 for (k = 0; k < highBytes; k++) { in negBigEndianBytes2bn()
[all …]
/libcore/luni/src/main/java/org/apache/harmony/security/provider/crypto/
DSHA1_MessageDigestImpl.java121 int k = buffer[i]; in processDigest() local
122 digest[j ] = (byte) ( k >>>24 ); // getting first byte from left in processDigest()
123 digest[j+1] = (byte) ( k >>>16 ); // getting second byte from left in processDigest()
124 digest[j+2] = (byte) ( k >>> 8 ); // getting third byte from left in processDigest()
125 digest[j+3] = (byte) ( k ); // getting fourth byte from left in processDigest()
DSHA1Impl.java210 for ( int k = 0; k < maxWord ; k++ ) { in updateHash()
/libcore/luni/src/main/java/java/util/regex/
DPattern.java438 int k; in quote() local
439 while ((k = string.indexOf("\\E", apos)) >= 0) { in quote()
440 sb.append(string.substring(apos, k + 2)).append("\\\\E\\Q"); in quote()
441 apos = k + 2; in quote()
/libcore/luni/src/main/java/java/util/prefs/
DPreferenceChangeEvent.java61 public PreferenceChangeEvent(Preferences p, String k, String v) { in PreferenceChangeEvent() argument
64 key = k; in PreferenceChangeEvent()
/libcore/luni/src/test/java/libcore/java/io/
DOldFileWriterTest.java88 for (int k = 0; k < str.length(); ++k) { in test_handleEarlyEOFChar_1()
89 strChars[j++] = str.charAt(k); in test_handleEarlyEOFChar_1()
/libcore/luni/src/main/java/java/security/
DSecurity.java310 for (int k = 0; k < result.size(); k++) { in getProviders()
312 p = result.get(k); in getProviders()
318 k--; in getProviders()

123