Home
last modified time | relevance | path

Searched refs:dst (Results 1 – 25 of 153) sorted by relevance

1234567

/libcore/luni/src/main/java/libcore/io/
DMemory.java46 public static native void unsafeBulkGet(Object dst, int dstOffset, int byteCount, in unsafeBulkGet() argument
54 public static native void unsafeBulkPut(byte[] dst, int dstOffset, int byteCount, in unsafeBulkPut() argument
142 … public static void pokeInt(@NonNull byte[] dst, int offset, int value, @NonNull ByteOrder order) { in pokeInt() argument
144 dst[offset++] = (byte) ((value >> 24) & 0xff); in pokeInt()
145 dst[offset++] = (byte) ((value >> 16) & 0xff); in pokeInt()
146 dst[offset++] = (byte) ((value >> 8) & 0xff); in pokeInt()
147 dst[offset ] = (byte) ((value >> 0) & 0xff); in pokeInt()
149 dst[offset++] = (byte) ((value >> 0) & 0xff); in pokeInt()
150 dst[offset++] = (byte) ((value >> 8) & 0xff); in pokeInt()
151 dst[offset++] = (byte) ((value >> 16) & 0xff); in pokeInt()
[all …]
/libcore/benchmarks/src/benchmarks/
DSystemArrayCopyBenchmark.java31 char[] dst = new char[len]; in timeSystemCharArrayCopy() local
33 System.arraycopy(src, 0, dst, 0, len); in timeSystemCharArrayCopy()
40 byte[] dst = new byte[len]; in timeSystemByteArrayCopy()
42 System.arraycopy(src, 0, dst, 0, len); in timeSystemByteArrayCopy()
49 short[] dst = new short[len]; in timeSystemShortArrayCopy() local
51 System.arraycopy(src, 0, dst, 0, len); in timeSystemShortArrayCopy()
58 int[] dst = new int[len]; in timeSystemIntArrayCopy() local
60 System.arraycopy(src, 0, dst, 0, len); in timeSystemIntArrayCopy()
67 long[] dst = new long[len]; in timeSystemLongArrayCopy() local
69 System.arraycopy(src, 0, dst, 0, len); in timeSystemLongArrayCopy()
[all …]
DArrayCopyBenchmark.java25 char[] dst = new char[8192]; in timeManualArrayCopy() local
27 dst[i] = src[i]; in timeManualArrayCopy()
35 char[] dst = new char[8192]; in time_System_arrayCopy() local
36 System.arraycopy(src, 0, dst, 0, 8192); in time_System_arrayCopy()
43 char[] dst = Arrays.copyOf(src, 8192); in time_Arrays_copyOf() local
50 char[] dst = Arrays.copyOfRange(src, 0, 8192); in time_Arrays_copyOfRange() local
/libcore/ojluni/src/main/java/java/lang/
DSystem.java467 private static void arraycopy(char[] src, int srcPos, char[] dst, int dstPos, int length) { in arraycopy() argument
471 if (dst == null) { in arraycopy()
475 srcPos > src.length - length || dstPos > dst.length - length) { in arraycopy()
478 " dst.length=" + dst.length + " dstPos=" + dstPos + " length=" + length); in arraycopy()
482 if (src == dst && srcPos < dstPos && dstPos < srcPos + length) { in arraycopy()
487 dst[dstPos + i] = src[srcPos + i]; in arraycopy()
492 dst[dstPos + i] = src[srcPos + i]; in arraycopy()
497 arraycopyCharUnchecked(src, srcPos, dst, dstPos, length); in arraycopy()
507 char[] dst, int dstPos, int length); in arraycopyCharUnchecked() argument
522 private static void arraycopy(byte[] src, int srcPos, byte[] dst, int dstPos, int length) { in arraycopy() argument
[all …]
/libcore/ojluni/src/main/java/java/util/
DBase64.java291 byte[] dst = new byte[len]; in encode()
292 int ret = encode0(src, 0, src.length, dst); in encode()
293 if (ret != dst.length) in encode()
294 return Arrays.copyOf(dst, ret); in encode()
295 return dst; in encode()
317 public int encode(byte[] src, byte[] dst) { in encode() argument
319 if (dst.length < len || len == -1) in encode()
322 return encode0(src, 0, src.length, dst); in encode()
364 byte[] dst = new byte[len]; in encode()
370 dst); in encode()
[all …]
/libcore/ojluni/src/test/java/lang/StringBuffer/
DGetCharsOverLength.java41 char dst[] = new char[30]; in main() local
45 {0, 0, dst.length + 1}, in main()
46 {0, 0, dst.length + 2}, in main()
47 {0, 0, dst.length + 20}, in main()
48 {5, 5, dst.length + 1}, in main()
49 {5, 5, dst.length + 2}, in main()
50 {5, 5, dst.length + 20} in main()
55 sb.getChars(a[i][0], a[i][1], dst, a[i][2]); in main()
/libcore/benchmarks/src/benchmarks/regression/
DByteBufferScalarVersusVectorBenchmark.java29 ByteBuffer dst = ByteBufferBenchmark.newBuffer(byteOrder, aligned, bufferType); in timeManualByteBufferCopy() local
32 dst.position(0); in timeManualByteBufferCopy()
34 dst.put(src.get()); in timeManualByteBufferCopy()
41 byte[] dst = new byte[8192]; in timeByteBufferBulkGet()
44 src.get(dst, 0, dst.length); in timeByteBufferBulkGet()
50 byte[] dst = new byte[8192]; in timeDirectByteBufferBulkGet()
53 src.get(dst, 0, dst.length); in timeDirectByteBufferBulkGet()
DByteBufferBenchmark.java96 byte[] dst = new byte[1024]; in timeByteBuffer_getByteArray()
100 src.get(dst); in timeByteBuffer_getByteArray()
127 char[] dst = new char[1024]; in timeCharBuffer_getCharArray() local
131 src.get(dst); in timeCharBuffer_getCharArray()
158 double[] dst = new double[1024]; in timeDoubleBuffer_getDoubleArray() local
162 src.get(dst); in timeDoubleBuffer_getDoubleArray()
179 float[] dst = new float[1024]; in timeFloatBuffer_getFloatArray() local
183 src.get(dst); in timeFloatBuffer_getFloatArray()
200 int[] dst = new int[1024]; in timeIntBuffer_getIntArray() local
204 src.get(dst); in timeIntBuffer_getIntArray()
[all …]
/libcore/luni/src/test/native/
Dlibcore_io_Memory_test.cpp30 uint8_t* dst = nullptr; in swap_align_test() local
32 ASSERT_EQ(0, posix_memalign(reinterpret_cast<void**>(&dst), ALIGNMENT, in swap_align_test()
45 T* dst_aligned = reinterpret_cast<T*>(&dst[dst_align]); in swap_align_test()
55 free(dst); in swap_align_test()
62 swap_align_test<jshort, 9> (swapShorts, [] (jshort* src, jshort* dst, uint64_t i) { in TEST() argument
64 *dst = (2*i) | ((2*(i+1)) << 8); in TEST()
69 swap_align_test<jint, 10> (swapInts, [] (jint* src, jint* dst, uint64_t i) { in TEST() argument
71 *dst = (4*i) | ((4*(i+1)) << 8) | ((4*(i+2)) << 16) | ((4*(i+3)) << 24); in TEST()
76 swap_align_test<jlong, 10> (swapLongs, [] (jlong* src, jlong* dst, uint64_t i) { in TEST() argument
79 *dst = (8*i) | ((8*(i+1)) << 8) | ((8*(i+2)) << 16) | ((8*(i+3)) << 24) | in TEST()
[all …]
/libcore/ojluni/src/main/java/java/nio/
DByteBuffer.java815 public ByteBuffer get(byte[] dst, int offset, int length) { in get() argument
816 Objects.checkFromIndexSize(offset, length, dst.length); in get()
821 getArray(pos, dst, offset, length); in get()
846 public ByteBuffer get(byte[] dst) { in get() argument
847 return get(dst, 0, dst.length); in get()
894 public ByteBuffer get(int index, byte[] dst, int offset, int length) { in get() argument
896 Objects.checkFromIndexSize(offset, length, dst.length); in get()
898 getArray(index, dst, offset, length); in get()
930 public ByteBuffer get(int index, byte[] dst) { in get() argument
931 return get(index, dst, 0, dst.length); in get()
[all …]
DLongBuffer.java815 public LongBuffer get(long[] dst, int offset, int length) { in get() argument
816 Objects.checkFromIndexSize(offset, length, dst.length); in get()
821 getArray(pos, dst, offset, length); in get()
846 public LongBuffer get(long[] dst) { in get() argument
847 return get(dst, 0, dst.length); in get()
894 public LongBuffer get(int index, long[] dst, int offset, int length) { in get() argument
896 Objects.checkFromIndexSize(offset, length, dst.length); in get()
898 getArray(index, dst, offset, length); in get()
930 public LongBuffer get(int index, long[] dst) { in get() argument
931 return get(index, dst, 0, dst.length); in get()
[all …]
DIntBuffer.java815 public IntBuffer get(int[] dst, int offset, int length) { in get() argument
816 Objects.checkFromIndexSize(offset, length, dst.length); in get()
821 getArray(pos, dst, offset, length); in get()
846 public IntBuffer get(int[] dst) { in get() argument
847 return get(dst, 0, dst.length); in get()
894 public IntBuffer get(int index, int[] dst, int offset, int length) { in get() argument
896 Objects.checkFromIndexSize(offset, length, dst.length); in get()
898 getArray(index, dst, offset, length); in get()
930 public IntBuffer get(int index, int[] dst) { in get() argument
931 return get(index, dst, 0, dst.length); in get()
[all …]
DShortBuffer.java815 public ShortBuffer get(short[] dst, int offset, int length) { in get() argument
816 Objects.checkFromIndexSize(offset, length, dst.length); in get()
821 getArray(pos, dst, offset, length); in get()
846 public ShortBuffer get(short[] dst) { in get() argument
847 return get(dst, 0, dst.length); in get()
894 public ShortBuffer get(int index, short[] dst, int offset, int length) { in get() argument
896 Objects.checkFromIndexSize(offset, length, dst.length); in get()
898 getArray(index, dst, offset, length); in get()
930 public ShortBuffer get(int index, short[] dst) { in get() argument
931 return get(index, dst, 0, dst.length); in get()
[all …]
/libcore/ojluni/src/test/java/lang/invoke/common/test/java/lang/invoke/lib/
DHelper.java285 public static Object castToWrapper(Object value, Class<?> dst) { in castToWrapper() argument
288 wrap = castToWrapperOrNull(((Number) value).longValue(), dst); in castToWrapper()
291 wrap = castToWrapperOrNull((char) (Character) value, dst); in castToWrapper()
296 return dst.cast(value); in castToWrapper()
301 private static Object castToWrapperOrNull(long value, Class<?> dst) { in castToWrapperOrNull() argument
302 if (dst == int.class || dst == Integer.class) { in castToWrapperOrNull()
305 if (dst == long.class || dst == Long.class) { in castToWrapperOrNull()
308 if (dst == char.class || dst == Character.class) { in castToWrapperOrNull()
311 if (dst == short.class || dst == Short.class) { in castToWrapperOrNull()
314 if (dst == float.class || dst == Float.class) { in castToWrapperOrNull()
[all …]
/libcore/ojluni/src/main/java/sun/net/util/
DIPAddressUtil.java143 byte[] dst = new byte[INADDR16SZ]; in textToNumericFormatV6()
187 dst[j++] = (byte) ((val >> 8) & 0xff); in textToNumericFormatV6()
188 dst[j++] = (byte) (val & 0xff); in textToNumericFormatV6()
209 dst[j++] = v4addr[k]; in textToNumericFormatV6()
219 dst[j++] = (byte) ((val >> 8) & 0xff); in textToNumericFormatV6()
220 dst[j++] = (byte) (val & 0xff); in textToNumericFormatV6()
229 dst[INADDR16SZ - i] = dst[colonp + n - i]; in textToNumericFormatV6()
230 dst[colonp + n - i] = 0; in textToNumericFormatV6()
236 byte[] newdst = convertFromIPv4MappedAddress(dst); in textToNumericFormatV6()
240 return dst; in textToNumericFormatV6()
/libcore/ojluni/annotations/hiddenapi/java/nio/
DByteBuffer.java77 public java.nio.ByteBuffer get(byte[] dst, int offset, int length) { in get() argument
81 public java.nio.ByteBuffer get(byte[] dst) { in get() argument
157 abstract void getUnchecked(int pos, char[] dst, int dstOffset, int length); in getUnchecked() argument
163 abstract void putUnchecked(int pos, char[] dst, int srcOffset, int length); in putUnchecked() argument
175 abstract void getUnchecked(int pos, short[] dst, int dstOffset, int length); in getUnchecked() argument
181 abstract void putUnchecked(int pos, short[] dst, int srcOffset, int length); in putUnchecked() argument
193 abstract void getUnchecked(int pos, int[] dst, int dstOffset, int length); in getUnchecked() argument
199 abstract void putUnchecked(int pos, int[] dst, int srcOffset, int length); in putUnchecked() argument
211 abstract void getUnchecked(int pos, long[] dst, int dstOffset, int length); in getUnchecked() argument
217 abstract void putUnchecked(int pos, long[] dst, int srcOffset, int length); in putUnchecked() argument
[all …]
/libcore/luni/src/test/java/libcore/libcore/io/
DMemoryMappedFileTest.java406 int[] dst = new int[2]; in checkIntArrayZeroReadCases() local
410 assertReadIntArrayFails(iterator, dst, 0, 1); in checkIntArrayZeroReadCases()
414 assertReadIntArrayFails(iterator, dst, 0, 1); in checkIntArrayZeroReadCases()
418 assertReadIntArrayFails(iterator, dst, 0, 1); in checkIntArrayZeroReadCases()
422 assertReadIntArrayFails(iterator, dst, 0, 1); in checkIntArrayZeroReadCases()
425 assertReadIntArrayFails(iterator, dst, 0, 3); // dst can only hold 2 ints in checkIntArrayZeroReadCases()
428 assertReadIntArrayFails(iterator, dst, 1, 2); in checkIntArrayZeroReadCases()
431 assertReadIntArrayFails(iterator, dst, -1, 2); in checkIntArrayZeroReadCases()
432 assertReadIntArrayFails(iterator, dst, 2, 2); in checkIntArrayZeroReadCases()
490 byte[] dst = new byte[10]; in checkByteArrayZeroReadCases()
[all …]
DStreamsTest.java38 byte[] dst = new byte[bytes.length - 1]; in testReadFully()
40 Arrays.fill(dst, (byte)-1); in testReadFully()
41 Streams.readFully(inStream, dst); in testReadFully()
42 for (int i = 0; i < dst.length; ++i) { in testReadFully()
43 assertEquals(bytes[i], dst[i]); in testReadFully()
/libcore/dom/src/test/java/org/w3c/domts/
DUserDataNotification.java26 private final Node dst; field in UserDataNotification
36 Node dst) { in UserDataNotification() argument
41 this.dst = dst; in UserDataNotification()
86 return dst; in getDst()
/libcore/ojluni/annotations/hiddenapi/java/lang/
DSystem.java81 private static void arraycopy(char[] src, int srcPos, char[] dst, int dstPos, int length) { in arraycopy() argument
86 char[] src, int srcPos, char[] dst, int dstPos, int length); in arraycopyCharUnchecked() argument
89 public static void arraycopy(byte[] src, int srcPos, byte[] dst, int dstPos, int length) { in arraycopy() argument
94 byte[] src, int srcPos, byte[] dst, int dstPos, int length); in arraycopyByteUnchecked() argument
97 private static void arraycopy(short[] src, int srcPos, short[] dst, int dstPos, int length) { in arraycopy() argument
102 short[] src, int srcPos, short[] dst, int dstPos, int length); in arraycopyShortUnchecked() argument
105 private static void arraycopy(int[] src, int srcPos, int[] dst, int dstPos, int length) { in arraycopy() argument
110 int[] src, int srcPos, int[] dst, int dstPos, int length); in arraycopyIntUnchecked() argument
113 private static void arraycopy(long[] src, int srcPos, long[] dst, int dstPos, int length) { in arraycopy() argument
118 long[] src, int srcPos, long[] dst, int dstPos, int length); in arraycopyLongUnchecked() argument
[all …]
/libcore/ojluni/src/main/java/java/text/
DDateFormatSymbols.java984 private void copyMembers(DateFormatSymbols src, DateFormatSymbols dst) in copyMembers() argument
986 dst.locale = src.locale; in copyMembers()
987 dst.eras = Arrays.copyOf(src.eras, src.eras.length); in copyMembers()
988 dst.months = Arrays.copyOf(src.months, src.months.length); in copyMembers()
989 dst.shortMonths = Arrays.copyOf(src.shortMonths, src.shortMonths.length); in copyMembers()
990 dst.weekdays = Arrays.copyOf(src.weekdays, src.weekdays.length); in copyMembers()
991 dst.shortWeekdays = Arrays.copyOf(src.shortWeekdays, src.shortWeekdays.length); in copyMembers()
992 dst.ampms = Arrays.copyOf(src.ampms, src.ampms.length); in copyMembers()
994 dst.zoneStrings = src.getZoneStringsImpl(true); in copyMembers()
996 dst.zoneStrings = null; in copyMembers()
[all …]
/libcore/ojluni/src/main/native/
DObjectInputStream.c52 jfloatArray dst, in Java_java_io_ObjectInputStream_bytesToFloats() argument
78 if (dst == NULL) { in Java_java_io_ObjectInputStream_bytesToFloats()
83 floats = (*env)->GetPrimitiveArrayCritical(env, dst, NULL); in Java_java_io_ObjectInputStream_bytesToFloats()
102 (*env)->ReleasePrimitiveArrayCritical(env, dst, floats, 0); in Java_java_io_ObjectInputStream_bytesToFloats()
119 jdoubleArray dst, in Java_java_io_ObjectInputStream_bytesToDoubles() argument
146 if (dst == NULL) { in Java_java_io_ObjectInputStream_bytesToDoubles()
151 doubles = (*env)->GetPrimitiveArrayCritical(env, dst, NULL); in Java_java_io_ObjectInputStream_bytesToDoubles()
175 (*env)->ReleasePrimitiveArrayCritical(env, dst, doubles, 0); in Java_java_io_ObjectInputStream_bytesToDoubles()
DObjectOutputStream.c51 jbyteArray dst, in Java_java_io_ObjectOutputStream_floatsToBytes() argument
78 if (dst == NULL) { in Java_java_io_ObjectOutputStream_floatsToBytes()
83 bytes = (*env)->GetPrimitiveArrayCritical(env, dst, NULL); in Java_java_io_ObjectOutputStream_floatsToBytes()
106 (*env)->ReleasePrimitiveArrayCritical(env, dst, bytes, 0); in Java_java_io_ObjectOutputStream_floatsToBytes()
123 jbyteArray dst, in Java_java_io_ObjectOutputStream_doublesToBytes() argument
150 if (dst == NULL) { in Java_java_io_ObjectOutputStream_doublesToBytes()
155 bytes = (*env)->GetPrimitiveArrayCritical(env, dst, NULL); in Java_java_io_ObjectOutputStream_doublesToBytes()
184 (*env)->ReleasePrimitiveArrayCritical(env, dst, bytes, 0); in Java_java_io_ObjectOutputStream_doublesToBytes()
/libcore/ojluni/src/main/java/javax/net/ssl/
DSSLEngine.java1136 ByteBuffer dst) throws SSLException { in wrap() argument
1137 return wrap(new ByteBuffer [] { src }, 0, 1, dst); in wrap()
1173 ByteBuffer dst) throws SSLException { in wrap() argument
1177 return wrap(srcs, 0, srcs.length, dst); in wrap()
1257 int length, ByteBuffer dst) throws SSLException; in wrap() argument
1291 ByteBuffer dst) throws SSLException { in unwrap() argument
1292 return unwrap(src, new ByteBuffer [] { dst }, 0, 1); in unwrap()
/libcore/luni/src/main/native/
Dlibcore_io_Memory.cpp62 jint* dst = reinterpret_cast<jint*>(dstShorts); in swapShorts() local
66 put_unaligned<jint>(dst++, bswap_2x16(v)); in swapShorts()
70 put_unaligned<jshort>(reinterpret_cast<jshort*>(dst), bswap_16(v)); in swapShorts()
82 jint* dst = reinterpret_cast<jint*>(dstLongs); in swapLongs() local
87 put_unaligned<jint>(dst++, bswap_32(v2)); in swapLongs()
88 put_unaligned<jint>(dst++, bswap_32(v1)); in swapLongs()
184 static void unsafeBulkCopy(jbyte* dst, const jbyte* src, jint byteCount, in unsafeBulkCopy() argument
187 memcpy(dst, src, byteCount); in unsafeBulkCopy()
192 jshort* dstShorts = reinterpret_cast<jshort*>(dst); in unsafeBulkCopy()
196 jint* dstInts = reinterpret_cast<jint*>(dst); in unsafeBulkCopy()
[all …]

1234567