@Override public long getGenerationId() { if(parentWorkspace != null){ return workspaceGenerationId; } else if(wrappedDataBuffer != null && wrappedDataBuffer.isAttached()){ return wrappedDataBuffer.getGenerationId(); } else if(originalBuffer != null && originalBuffer.isAttached()){ return originalBuffer.getGenerationId(); } return workspaceGenerationId; }
/** * This method returns True, if this INDArray instance is attached to some Workspace. False otherwise. * * @return */ @Override public boolean isAttached() { return data.isAttached() || (data.underlyingDataBuffer() != null && data.underlyingDataBuffer().isAttached()) || (data.originalDataBuffer() != null && data.originalDataBuffer().isAttached()); }
@Override public MemoryWorkspace getParentWorkspace() { if(parentWorkspace != null){ return parentWorkspace; } if(wrappedDataBuffer != null && wrappedDataBuffer.isAttached() && wrappedDataBuffer.getParentWorkspace() != null){ return wrappedDataBuffer.getParentWorkspace(); } if(originalBuffer != null && originalBuffer.isAttached() && originalBuffer.getParentWorkspace() != null){ return originalBuffer.getParentWorkspace(); } return null; }
/** * This method returns True, if this INDArray instance is attached to some Workspace. False otherwise. * * @return */ @Override public boolean isAttached() { return data.isAttached(); }
point.setDeviceId(-1); if (buffer.isAttached()) { long reqMem = AllocationUtils.getRequiredMemory(requiredMemory);
point.setDeviceId(-1); if (buffer.isAttached()) { long reqMem = AllocationUtils.getRequiredMemory(requiredMemory);
throw new RuntimeException("Buffer synchronization failed"); if (buffer.isAttached() || dstPoint.isAttached()) {
throw new RuntimeException("Buffer synchronization failed"); if (buffer.isAttached() || dstPoint.isAttached()) {