Package org.nd4j.linalg.api.buffer.util
Class AllocUtil
- java.lang.Object
-
- org.nd4j.linalg.api.buffer.util.AllocUtil
-
public class AllocUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description AllocUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DataBuffer.AllocationMode
getAllocationModeFromContext()
get the allocation mode from the contextstatic DataBuffer.AllocationMode
getAllocationModeFromContext(String allocMode)
Get the allocation mode from the contextstatic String
getAllocModeName(DataBuffer.AllocationMode allocationMode)
Gets the name of the alocation modestatic void
setAllocationModeForContext(String allocationModeForContext)
Set the allocation mode for the nd4j context The value must be one of: heap, java cpp, or direct or an @link{IllegalArgumentException} is thrownstatic void
setAllocationModeForContext(DataBuffer.AllocationMode allocationModeForContext)
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
-
-
-
Method Detail
-
getAllocationModeFromContext
public static DataBuffer.AllocationMode getAllocationModeFromContext(String allocMode)
Get the allocation mode from the context- Returns:
-
getAllocModeName
public static String getAllocModeName(DataBuffer.AllocationMode allocationMode)
Gets the name of the alocation mode- Parameters:
allocationMode
-- Returns:
-
getAllocationModeFromContext
public static DataBuffer.AllocationMode getAllocationModeFromContext()
get the allocation mode from the context- Returns:
-
setAllocationModeForContext
public static void setAllocationModeForContext(DataBuffer.AllocationMode allocationModeForContext)
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- Parameters:
allocationModeForContext
-
-
setAllocationModeForContext
public static void setAllocationModeForContext(String allocationModeForContext)
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- Parameters:
allocationModeForContext
-
-
-