/** * This method creates shapeInformation buffer, based on shape being passed in * * @param shape * @return */ @Override public Pair<DataBuffer, long[]> createShapeInformation(int[] shape) { char order = Nd4j.order(); return createShapeInformation(shape, order); }
/** * This method creates shapeInformation buffer, based on shape being passed in * * @param shape * @return */ @Override public Pair<DataBuffer, long[]> createShapeInformation(long[] shape) { char order = Nd4j.order(); return createShapeInformation(shape, order); }
/** * This method creates shapeInformation buffer, based on shape & order being passed in * * @param shape * @param order * @return */ @Override public Pair<DataBuffer, long[]> createShapeInformation(int[] shape, char order) { int[] stride = Nd4j.getStrides(shape, order); // this won't be view, so ews is 1 int ews = 1; return createShapeInformation(shape, stride, 0, ews, order); }
/** * This method creates shapeInformation buffer, based on shape & order being passed in * * @param shape * @param order * @return */ @Override public Pair<DataBuffer, long[]> createShapeInformation(long[] shape, char order) { long[] stride = Nd4j.getStrides(shape, order); // this won't be view, so ews is 1 int ews = 1; return createShapeInformation(shape, stride, 0, ews, order); }
/** * This method creates shapeInformation buffer, based on shape being passed in * * @param shape * @return */ @Override public Pair<DataBuffer, int[]> createShapeInformation(int[] shape) { char order = Nd4j.order(); return createShapeInformation(shape, order); }
/** * This method creates shapeInformation buffer, based on shape & order being passed in * * @param shape * @param order * @return */ @Override public Pair<DataBuffer, int[]> createShapeInformation(int[] shape, char order) { int[] stride = Nd4j.getStrides(shape, order); // this won't be view, so ews is 1 int ews = 1; return createShapeInformation(shape, stride, 0, ews, order); }
if (!protector.containsDataBuffer(deviceId, descriptor)) { buffer = super.createShapeInformation(shape, stride, offset, elementWiseStride, order); buffer.getFirst().setConstant(true);
if (!protector.containsDataBuffer(deviceId, descriptor)) { buffer = super.createShapeInformation(shape, stride, offset, elementWiseStride, order, extras); buffer.getFirst().setConstant(true);
if (!protector.containsDataBuffer(deviceId, descriptor)) { buffer = super.createShapeInformation(shape, stride, offset, elementWiseStride, order, extras); buffer.getFirst().setConstant(true);