use of org.nd4j.linalg.api.memory.MemoryWorkspace in project nd4j by deeplearning4j.
the class CpuWorkspaceManager method createNewWorkspace.
@Override
public MemoryWorkspace createNewWorkspace(@NonNull WorkspaceConfiguration configuration) {
ensureThreadExistense();
MemoryWorkspace workspace = new CpuWorkspace(configuration);
backingMap.get().put(workspace.getId(), workspace);
pickReference(workspace);
return workspace;
}
use of org.nd4j.linalg.api.memory.MemoryWorkspace in project nd4j by deeplearning4j.
the class CpuWorkspaceManager method createNewWorkspace.
@Override
public MemoryWorkspace createNewWorkspace(@NonNull WorkspaceConfiguration configuration, @NonNull String id, Integer deviceId) {
ensureThreadExistense();
MemoryWorkspace workspace = new CpuWorkspace(configuration, id, deviceId);
backingMap.get().put(id, workspace);
pickReference(workspace);
return workspace;
}
use of org.nd4j.linalg.api.memory.MemoryWorkspace in project nd4j by deeplearning4j.
the class CpuNDArrayFactory method createUninitializedDetached.
@Override
public INDArray createUninitializedDetached(int[] shape, char ordering) {
MemoryWorkspace workspace = Nd4j.getMemoryManager().getCurrentWorkspace();
Nd4j.getMemoryManager().setCurrentWorkspace(null);
INDArray ret = new NDArray(shape, Nd4j.getStrides(shape, ordering), 0, ordering, false);
Nd4j.getMemoryManager().setCurrentWorkspace(workspace);
return ret;
}
use of org.nd4j.linalg.api.memory.MemoryWorkspace in project nd4j by deeplearning4j.
the class CudaWorkspaceManager method createNewWorkspace.
@Override
public MemoryWorkspace createNewWorkspace(WorkspaceConfiguration configuration, String id, Integer deviceId) {
ensureThreadExistense();
MemoryWorkspace workspace = new CudaWorkspace(configuration, id, deviceId);
backingMap.get().put(id, workspace);
pickReference(workspace);
return workspace;
}
use of org.nd4j.linalg.api.memory.MemoryWorkspace in project nd4j by deeplearning4j.
the class CudaWorkspaceManager method createNewWorkspace.
@Override
public MemoryWorkspace createNewWorkspace(@NonNull WorkspaceConfiguration configuration) {
ensureThreadExistense();
MemoryWorkspace workspace = new CudaWorkspace(configuration);
backingMap.get().put(workspace.getId(), workspace);
pickReference(workspace);
return workspace;
}
Aggregations