nd4j-buffer/src/main/java/org/nd4j/linalg/api/buffer/util/DataTypeUtil.java
public static void setDTypeForContext(DataBuffer.Type allocationModeForContext) {
        try {
            lock.writeLock().lock();

            dtype = allocationModeForContext;

            setDTypeForContext(getDTypeForName(allocationModeForContext));
        } finally {
            lock.writeLock().unlock();
        }
    }
public static void setDTypeForContext(DataBuffer.Type allocationModeForContext) {
        try {
            lock.writeLock().lock();

            dtype = allocationModeForContext;

            setDTypeForContext(getDTypeForName(allocationModeForContext));
        } finally {
            lock.writeLock().unlock();
        }
    }
public static void setDTypeForContext ( DataBuffer . Type allocationModeForContext ) { try { lock . writeLock ( ) . lock ( ) ; dtype = allocationModeForContext ; setDTypeForContext ( getDTypeForName ( allocationModeForContext ) ) ; } finally { lock . writeLock ( ) . unlock ( ) ; } }
Set the allocation mode for the nd4j context
The value must be one of: heap, java cpp, or direct
or an @link{IllegalArgumentException} is thrown
@param allocationModeForContext
Set the allocation mode for the nd4j context The value must be one of : heap java cpp or direct or an