Class DataTypeUtil


  • public class DataTypeUtil
    extends Object
    • Constructor Detail

      • DataTypeUtil

        public DataTypeUtil()
    • Method Detail

      • lengthForDtype

        public static int lengthForDtype​(DataType type)
        Returns the length for the given data opType
        Parameters:
        type -
        Returns:
      • getDtypeFromContext

        public static DataType getDtypeFromContext​(String dType)
        Get the allocation mode from the context
        Returns:
      • getDTypeForName

        public static String getDTypeForName​(DataType allocationMode)
        Gets the name of the allocation mode
        Parameters:
        allocationMode -
        Returns:
      • getDtypeFromContext

        public static DataType getDtypeFromContext()
        get the allocation mode from the context
        Returns:
      • setDTypeForContext

        public static void setDTypeForContext​(DataType 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 -
      • setDTypeForContext

        public static void setDTypeForContext​(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 -