/** * Copies {@code count} floats from the memory pointed to by this * {@link MachineSizedFloatPtr} to {@code dst} starting at offset {@code offset}. * Does {@code double} to {@code float} conversion if running on * a 64-bit platform. * * @param dst the destination. * @param offset the offset within the destination array to start copying to. * @param count the number of elements to copy. */ public void get(float[] dst, int offset, int count) { if (_sizeOf() == 4) { asFloatBuffer(count).get(dst, offset, count); } else { Arrays.checkOffsetAndCount(dst.length, offset, count); DoubleBuffer buf = asDoubleBuffer(count); for (int i = 0; i < count; i++) { dst[i + offset] = (float) buf.get(); } } }
/** * Copies {@code count} doubles from the memory pointed to by this * {@link MachineSizedFloatPtr} to {@code dst} starting at offset {@code offset}. * Does {@code float} to {@code double} conversion if running on * a 32-bit platform. * * @param dst the destination. * @param offset the offset within the destination array to start copying to. * @param count the number of elements to copy. */ public void get(double[] dst, int offset, int count) { if (_sizeOf() == 8) { asDoubleBuffer(count).get(dst, offset, count); } else { Arrays.checkOffsetAndCount(dst.length, offset, count); FloatBuffer buf = asFloatBuffer(count); for (int i = 0; i < count; i++) { dst[i + offset] = buf.get(); } } }
/** * Copies {@code count} doubles from {@code src} starting at offset {@code offset} * to the memory pointed to by this {@link MachineSizedFloatPtr}. Does * {@code double} to {@code float} conversion if running on a 32-bit * platform. * * @param src the source. * @param offset the offset within the source array to start copying from. * @param count the number of elements to copy. */ public void set(double[] src, int offset, int count) { if (_sizeOf() == 4) { asDoubleBuffer(count).put(src, offset, count); } else { Arrays.checkOffsetAndCount(src.length, offset, count); FloatBuffer buf = asFloatBuffer(count); for (int i = 0; i < count; i++) { buf.put((float) src[i + offset]); } } } }
/** * Copies {@code count} floats from {@code src} starting at offset {@code offset} * to the memory pointed to by this {@link MachineSizedFloatPtr}. Does * {@code float} to {@code double} conversion if running on a 64-bit * platform. * * @param src the source. * @param offset the offset within the source array to start copying from. * @param count the number of elements to copy. */ public void set(float[] src, int offset, int count) { if (_sizeOf() == 4) { asFloatBuffer(count).put(src, offset, count); } else { Arrays.checkOffsetAndCount(src.length, offset, count); DoubleBuffer buf = asDoubleBuffer(count); for (int i = 0; i < count; i++) { buf.put(src[i + offset]); } } }
/** * Copies {@code count} floats from the memory pointed to by this * {@link MachineSizedFloatPtr} to {@code dst} starting at offset {@code offset}. * Does {@code double} to {@code float} conversion if running on * a 64-bit platform. * * @param dst the destination. * @param offset the offset within the destination array to start copying to. * @param count the number of elements to copy. */ public void get(float[] dst, int offset, int count) { if (_sizeOf() == 4) { asFloatBuffer(count).get(dst, offset, count); } else { Arrays.checkOffsetAndCount(dst.length, offset, count); DoubleBuffer buf = asDoubleBuffer(count); for (int i = 0; i < count; i++) { dst[i + offset] = (float) buf.get(); } } }
/** * Copies {@code count} doubles from the memory pointed to by this * {@link MachineSizedFloatPtr} to {@code dst} starting at offset {@code offset}. * Does {@code float} to {@code double} conversion if running on * a 32-bit platform. * * @param dst the destination. * @param offset the offset within the destination array to start copying to. * @param count the number of elements to copy. */ public void get(double[] dst, int offset, int count) { if (_sizeOf() == 8) { asDoubleBuffer(count).get(dst, offset, count); } else { Arrays.checkOffsetAndCount(dst.length, offset, count); FloatBuffer buf = asFloatBuffer(count); for (int i = 0; i < count; i++) { dst[i + offset] = buf.get(); } } }
/** * Copies {@code count} floats from the memory pointed to by this * {@link MachineSizedFloatPtr} to {@code dst} starting at offset {@code offset}. * Does {@code double} to {@code float} conversion if running on * a 64-bit platform. * * @param dst the destination. * @param offset the offset within the destination array to start copying to. * @param count the number of elements to copy. */ public void get(float[] dst, int offset, int count) { if (_sizeOf() == 4) { asFloatBuffer(count).get(dst, offset, count); } else { VM.checkOffsetAndCount(dst.length, offset, count); DoubleBuffer buf = asDoubleBuffer(count); for (int i = 0; i < count; i++) { dst[i + offset] = (float) buf.get(); } } }
/** * Copies {@code count} doubles from the memory pointed to by this * {@link MachineSizedFloatPtr} to {@code dst} starting at offset {@code offset}. * Does {@code float} to {@code double} conversion if running on * a 32-bit platform. * * @param dst the destination. * @param offset the offset within the destination array to start copying to. * @param count the number of elements to copy. */ public void get(double[] dst, int offset, int count) { if (_sizeOf() == 8) { asDoubleBuffer(count).get(dst, offset, count); } else { VM.checkOffsetAndCount(dst.length, offset, count); FloatBuffer buf = asFloatBuffer(count); for (int i = 0; i < count; i++) { dst[i + offset] = buf.get(); } } }
/** * Copies {@code count} doubles from the memory pointed to by this * {@link MachineSizedFloatPtr} to {@code dst} starting at offset {@code offset}. * Does {@code float} to {@code double} conversion if running on * a 32-bit platform. * * @param dst the destination. * @param offset the offset within the destination array to start copying to. * @param count the number of elements to copy. */ public void get(double[] dst, int offset, int count) { if (_sizeOf() == 8) { asDoubleBuffer(count).get(dst, offset, count); } else { Arrays.checkOffsetAndCount(dst.length, offset, count); FloatBuffer buf = asFloatBuffer(count); for (int i = 0; i < count; i++) { dst[i + offset] = buf.get(); } } }
/** * Copies {@code count} floats from the memory pointed to by this * {@link MachineSizedFloatPtr} to {@code dst} starting at offset {@code offset}. * Does {@code double} to {@code float} conversion if running on * a 64-bit platform. * * @param dst the destination. * @param offset the offset within the destination array to start copying to. * @param count the number of elements to copy. */ public void get(float[] dst, int offset, int count) { if (_sizeOf() == 4) { asFloatBuffer(count).get(dst, offset, count); } else { Arrays.checkOffsetAndCount(dst.length, offset, count); DoubleBuffer buf = asDoubleBuffer(count); for (int i = 0; i < count; i++) { dst[i + offset] = (float) buf.get(); } } }
/** * Copies {@code count} doubles from the memory pointed to by this * {@link MachineSizedFloatPtr} to {@code dst} starting at offset {@code offset}. * Does {@code float} to {@code double} conversion if running on * a 32-bit platform. * * @param dst the destination. * @param offset the offset within the destination array to start copying to. * @param count the number of elements to copy. */ public void get(double[] dst, int offset, int count) { if (_sizeOf() == 8) { asDoubleBuffer(count).get(dst, offset, count); } else { Arrays.checkOffsetAndCount(dst.length, offset, count); FloatBuffer buf = asFloatBuffer(count); for (int i = 0; i < count; i++) { dst[i + offset] = buf.get(); } } }
/** * Copies {@code count} floats from the memory pointed to by this * {@link MachineSizedFloatPtr} to {@code dst} starting at offset {@code offset}. * Does {@code double} to {@code float} conversion if running on * a 64-bit platform. * * @param dst the destination. * @param offset the offset within the destination array to start copying to. * @param count the number of elements to copy. */ public void get(float[] dst, int offset, int count) { if (_sizeOf() == 4) { asFloatBuffer(count).get(dst, offset, count); } else { Arrays.checkOffsetAndCount(dst.length, offset, count); DoubleBuffer buf = asDoubleBuffer(count); for (int i = 0; i < count; i++) { dst[i + offset] = (float) buf.get(); } } }
/** * Copies {@code count} doubles from {@code src} starting at offset {@code offset} * to the memory pointed to by this {@link MachineSizedFloatPtr}. Does * {@code double} to {@code float} conversion if running on a 32-bit * platform. * * @param src the source. * @param offset the offset within the source array to start copying from. * @param count the number of elements to copy. */ public void set(double[] src, int offset, int count) { if (_sizeOf() == 4) { asDoubleBuffer(count).put(src, offset, count); } else { Arrays.checkOffsetAndCount(src.length, offset, count); FloatBuffer buf = asFloatBuffer(count); for (int i = 0; i < count; i++) { buf.put((float) src[i + offset]); } } } }
/** * Copies {@code count} floats from {@code src} starting at offset {@code offset} * to the memory pointed to by this {@link MachineSizedFloatPtr}. Does * {@code float} to {@code double} conversion if running on a 64-bit * platform. * * @param src the source. * @param offset the offset within the source array to start copying from. * @param count the number of elements to copy. */ public void set(float[] src, int offset, int count) { if (_sizeOf() == 4) { asFloatBuffer(count).put(src, offset, count); } else { Arrays.checkOffsetAndCount(src.length, offset, count); DoubleBuffer buf = asDoubleBuffer(count); for (int i = 0; i < count; i++) { buf.put(src[i + offset]); } } }
/** * Copies {@code count} floats from {@code src} starting at offset {@code offset} * to the memory pointed to by this {@link MachineSizedFloatPtr}. Does * {@code float} to {@code double} conversion if running on a 64-bit * platform. * * @param src the source. * @param offset the offset within the source array to start copying from. * @param count the number of elements to copy. */ public void set(float[] src, int offset, int count) { if (_sizeOf() == 4) { asFloatBuffer(count).put(src, offset, count); } else { Arrays.checkOffsetAndCount(src.length, offset, count); DoubleBuffer buf = asDoubleBuffer(count); for (int i = 0; i < count; i++) { buf.put(src[i + offset]); } } }
/** * Copies {@code count} floats from {@code src} starting at offset {@code offset} * to the memory pointed to by this {@link MachineSizedFloatPtr}. Does * {@code float} to {@code double} conversion if running on a 64-bit * platform. * * @param src the source. * @param offset the offset within the source array to start copying from. * @param count the number of elements to copy. */ public void set(float[] src, int offset, int count) { if (_sizeOf() == 4) { asFloatBuffer(count).put(src, offset, count); } else { Arrays.checkOffsetAndCount(src.length, offset, count); DoubleBuffer buf = asDoubleBuffer(count); for (int i = 0; i < count; i++) { buf.put(src[i + offset]); } } }
/** * Copies {@code count} floats from {@code src} starting at offset {@code offset} * to the memory pointed to by this {@link MachineSizedFloatPtr}. Does * {@code float} to {@code double} conversion if running on a 64-bit * platform. * * @param src the source. * @param offset the offset within the source array to start copying from. * @param count the number of elements to copy. */ public void set(float[] src, int offset, int count) { if (_sizeOf() == 4) { asFloatBuffer(count).put(src, offset, count); } else { Arrays.checkOffsetAndCount(src.length, offset, count); DoubleBuffer buf = asDoubleBuffer(count); for (int i = 0; i < count; i++) { buf.put(src[i + offset]); } } }
/** * Copies {@code count} doubles from {@code src} starting at offset {@code offset} * to the memory pointed to by this {@link MachineSizedFloatPtr}. Does * {@code double} to {@code float} conversion if running on a 32-bit * platform. * * @param src the source. * @param offset the offset within the source array to start copying from. * @param count the number of elements to copy. */ public void set(double[] src, int offset, int count) { if (_sizeOf() == 4) { asDoubleBuffer(count).put(src, offset, count); } else { Arrays.checkOffsetAndCount(src.length, offset, count); FloatBuffer buf = asFloatBuffer(count); for (int i = 0; i < count; i++) { buf.put((float) src[i + offset]); } } } }
/** * Copies {@code count} floats from {@code src} starting at offset {@code offset} * to the memory pointed to by this {@link MachineSizedFloatPtr}. Does * {@code float} to {@code double} conversion if running on a 64-bit * platform. * * @param src the source. * @param offset the offset within the source array to start copying from. * @param count the number of elements to copy. */ public void set(float[] src, int offset, int count) { if (_sizeOf() == 4) { asFloatBuffer(count).put(src, offset, count); } else { VM.checkOffsetAndCount(src.length, offset, count); DoubleBuffer buf = asDoubleBuffer(count); for (int i = 0; i < count; i++) { buf.put(src[i + offset]); } } }
/** * Copies {@code count} doubles from {@code src} starting at offset {@code offset} * to the memory pointed to by this {@link MachineSizedFloatPtr}. Does * {@code double} to {@code float} conversion if running on a 32-bit * platform. * * @param src the source. * @param offset the offset within the source array to start copying from. * @param count the number of elements to copy. */ public void set(double[] src, int offset, int count) { if (_sizeOf() == 4) { asDoubleBuffer(count).put(src, offset, count); } else { Arrays.checkOffsetAndCount(src.length, offset, count); FloatBuffer buf = asFloatBuffer(count); for (int i = 0; i < count; i++) { buf.put((float) src[i + offset]); } } } }