List of usage examples for io.netty.buffer Unpooled copyDouble
public static ByteBuf copyDouble(double... values)
From source file:org.nd4j.linalg.api.buffer.BaseDataBuffer.java
License:Apache License
/** * * @param data// w w w .j a v a2s . co m * @param copy */ public BaseDataBuffer(double[] data, boolean copy) { allocationMode = Nd4j.alloc; if (allocationMode == AllocationMode.HEAP) { if (copy) { doubleData = ArrayUtil.copy(data); } else { this.doubleData = data; } } else { dataBuffer = Unpooled.copyDouble(data).order(ByteOrder.nativeOrder()); } length = data.length; }