List of usage examples for io.netty.buffer Unpooled copyFloat
public static ByteBuf copyFloat(float... values)
From source file:org.nd4j.linalg.api.buffer.BaseDataBuffer.java
License:Apache License
/** * * @param data//from w ww .j ava2s .c om * @param copy */ public BaseDataBuffer(float[] data, boolean copy) { allocationMode = Nd4j.alloc; if (allocationMode == AllocationMode.HEAP) { if (copy) { floatData = ArrayUtil.copy(data); } else { this.floatData = data; } } else { dataBuffer = Unpooled.copyFloat(data).order(ByteOrder.nativeOrder()); } length = data.length; }