Class AllocUtil


  • public class AllocUtil
    extends Object
    • Constructor Detail

      • AllocUtil

        public AllocUtil()
    • 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 -