public abstract class Nd4jBackend
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Nd4jBackend.NoAvailableBackendException |
Modifier and Type | Field and Description |
---|---|
static int |
BACKEND_PRIORITY_CPU |
static int |
BACKEND_PRIORITY_GPU |
static java.lang.String |
DYNAMIC_LOAD_CLASSPATH
Deprecated.
|
static java.lang.String |
DYNAMIC_LOAD_CLASSPATH_PROPERTY
Deprecated.
|
Constructor and Description |
---|
Nd4jBackend() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
allowsOrder()
Returns true if the
backend allows order to be specified
on blas operations (cblas)
|
abstract boolean |
canRun()
Returns true if the backend can
run on the os or not
|
abstract Resource |
getConfigurationResource()
Get the configuration resource
|
Nd4jContext |
getContext() |
abstract java.lang.Class |
getNDArrayClass()
Get the actual (concrete/implementation) class for standard INDArrays for this backend
|
abstract int |
getPriority()
Gets a priority number for the backend.
|
java.util.Properties |
getProperties() |
abstract boolean |
isAvailable()
Determines whether a given backend is available in the current environment.
|
static Nd4jBackend |
load()
Loads the best available backend.
|
static void |
loadLibrary(java.io.File jar)
Adds the supplied Java Archive library to java.class.path.
|
java.lang.String |
toString() |
public static final int BACKEND_PRIORITY_CPU
public static final int BACKEND_PRIORITY_GPU
@Deprecated public static final java.lang.String DYNAMIC_LOAD_CLASSPATH
ND4JEnvironmentVars.BACKEND_DYNAMIC_LOAD_CLASSPATH
@Deprecated public static final java.lang.String DYNAMIC_LOAD_CLASSPATH_PROPERTY
ND4JSystemProperties.DYNAMIC_LOAD_CLASSPATH_PROPERTY
public abstract boolean allowsOrder()
public abstract int getPriority()
public abstract boolean isAvailable()
public abstract boolean canRun()
public abstract Resource getConfigurationResource()
public abstract java.lang.Class getNDArrayClass()
public static Nd4jBackend load() throws Nd4jBackend.NoAvailableBackendException
Nd4jBackend.NoAvailableBackendException
public static void loadLibrary(java.io.File jar) throws Nd4jBackend.NoAvailableBackendException
jar
- the jar file to addNd4jBackend.NoAvailableBackendException
public java.util.Properties getProperties() throws java.io.IOException
java.io.IOException
public Nd4jContext getContext() throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object