/** Bulk input of a short array. */ public short[] readShorts (int length) throws KryoException { if (capacity - position >= length * 2 && isNativeOrder()) { short[] array = new short[length]; ShortBuffer buf = niobuffer.asShortBuffer(); buf.get(array); position += length * 2; niobuffer.position(position); return array; } else return super.readShorts(length); }
public short[] read (Kryo kryo, Input input, Class<short[]> type) { int length = input.readVarInt(true); if (length == NULL) return null; return input.readShorts(length - 1); }
/** Bulk input of a short array. */ public short[] readShorts (int length) throws KryoException { if (capacity - position >= length * 2 && isNativeOrder()) { short[] array = new short[length]; ShortBuffer buf = niobuffer.asShortBuffer(); buf.get(array); position += length * 2; niobuffer.position(position); return array; } else return super.readShorts(length); }
/** Bulk input of a short array. */ public short[] readShorts (int length) throws KryoException { if (capacity - position >= length * 2 && isNativeOrder()) { short[] array = new short[length]; ShortBuffer buf = niobuffer.asShortBuffer(); buf.get(array); position += length * 2; niobuffer.position(position); return array; } else return super.readShorts(length); }
public short[] read (Kryo kryo, Input input, Class<short[]> type) { int length = input.readVarInt(true); if (length == NULL) return null; return input.readShorts(length-1); }
public short[] read (Kryo kryo, Input input, Class<short[]> type) { int length = input.readVarInt(true); if (length == NULL) return null; return input.readShorts(length - 1); }
public short[] read (Kryo kryo, Input input, Class<short[]> type) { int length = input.readVarInt(true); if (length == NULL) return null; return input.readShorts(length-1); }
/** Bulk input of a short array. */ public short[] readShorts (int length) throws KryoException { if (capacity - position >= length * 2 && isNativeOrder()) { short[] array = new short[length]; ShortBuffer buf = niobuffer.asShortBuffer(); buf.get(array); position += length * 2; niobuffer.position(position); return array; } else return super.readShorts(length); }
case "short": NDArray<short[]> shortNDArray = new NDArray<>( input.readShorts(singleDimensionArrayLength),signedFlag,dimensions); return shortNDArray; case "byte": return byteNDArray; case "boolean": short[] shortsArray = input.readShorts(singleDimensionArrayLength); boolean[] boolsArray = new boolean[shortsArray.length]; for (int i = 0; i < shortsArray.length; i++) {