Exemple #1
0
 internal static bool CV_TYP_IS_UNSIGNED(TYPE_ENUM typ)
 {
     return (((CV_TYPE(typ) == CV_type.CV_UNSIGNED) && CV_TYP_IS_DIRECT(typ)) ||
                   (typ == TYPE_ENUM.T_UINT1) ||
                   (typ == TYPE_ENUM.T_UINT2) ||
                   (typ == TYPE_ENUM.T_UINT4) ||
                   (typ == TYPE_ENUM.T_UINT8) ||
                   (typ == TYPE_ENUM.T_UINT16));
 }
Exemple #2
0
 internal static bool CV_TYP_IS_PTR(TYPE_ENUM typ)
 {
     return (CV_MODE(typ) != CV_prmode.CV_TM_DIRECT);
 }
Exemple #3
0
 internal static bool CV_TYP_IS_REAL(TYPE_ENUM typ)
 {
     return ((CV_TYPE(typ) == CV_type.CV_REAL) && CV_TYP_IS_DIRECT(typ));
 }
Exemple #4
0
 internal static CV_type CV_TYPE(TYPE_ENUM typ)
 {
     return (CV_type)((((uint)typ) & CV_TMASK) >> CV_TSHIFT);
 }
Exemple #5
0
 internal static bool CV_TYP_IS_COMPLEX(TYPE_ENUM typ)
 {
     return ((CV_TYPE(typ) == CV_type.CV_COMPLEX) && CV_TYP_IS_DIRECT(typ));
 }
Exemple #6
0
 // function to extract primitive mode, type and size
 internal static CV_prmode CV_MODE(TYPE_ENUM typ)
 {
     return (CV_prmode)((((uint)typ) & CV_MMASK) >> CV_MSHIFT);
 }
Exemple #7
0
 internal static uint CV_SUBT(TYPE_ENUM typ)
 {
     return ((((uint)typ) & CV_SMASK) >> CV_SSHIFT);
 }
Exemple #8
0
 internal static bool CV_IS_PRIMITIVE(TYPE_ENUM typ)
 {
     return ((uint)(typ) < CV_FIRST_NONPRIM);
 }
Exemple #9
0
        private const int CV_TSHIFT = 4; // primitive type right shift count

        #endregion Fields

        #region Methods

        internal static bool CV_IS_INTERNAL_PTR(TYPE_ENUM typ)
        {
            return (CV_IS_PRIMITIVE(typ) &&
                          CV_TYPE(typ) == CV_type.CV_CVRESERVED &&
                          CV_TYP_IS_PTR(typ));
        }
Exemple #10
0
        // functions to check the type of a primitive

        /// <summary>
        /// </summary>
        /// <param name="typ">
        /// </param>
        /// <returns>
        /// </returns>
        internal static bool CV_TYP_IS_DIRECT(TYPE_ENUM typ)
        {
            return CV_MODE(typ) == CV_prmode.CV_TM_DIRECT;
        }
Exemple #11
0
 public static bool CV_TYP_IS_SIGNED(TYPE_ENUM typ)
 {
     return
         (((CV_TYPE(typ) == CV_type.CV_SIGNED) && CV_TYP_IS_DIRECT(typ)) ||
          (typ == TYPE_ENUM.T_INT1)  ||
          (typ == TYPE_ENUM.T_INT2)  ||
          (typ == TYPE_ENUM.T_INT4)  ||
          (typ == TYPE_ENUM.T_INT8)  ||
          (typ == TYPE_ENUM.T_INT16) ||
          (typ == TYPE_ENUM.T_RCHAR));
 }
Exemple #12
0
        // functions to check the type of a primitive

        public static bool CV_TYP_IS_DIRECT(TYPE_ENUM typ)
        {
            return (CV_MODE(typ) == CV_prmode.CV_TM_DIRECT);
        }