Non-ISA processor or system features.
Exemple #1
0
        /// <summary>Checks if the specified non-ISA CPU or system extension is supported by the processor.</summary>
        /// <param name="systemFeature">An object specifying the non-ISA CPU or system extension of interest.</param>
        /// <returns>true if processor supports the specified non-ISA CPU or system extension and false otherwise.</returns>
        /// <seealso cref="CpuSimdFeature" />
        /// <seealso cref="X86CpuSystemFeature" />
        /// <seealso cref="ArmCpuSystemFeature" />
        public static bool IsSupported(CpuSystemFeature systemFeature)
        {
            ulong  systemFeaturesMask = 0;
            Status status             = yepLibrary_GetCpuSystemFeatures(out systemFeaturesMask);

            if (status != Status.Ok)
            {
                throw GetException(status);
            }

            return((unchecked ((long)systemFeaturesMask) & (1L << unchecked ((int)systemFeature.Id))) != 0);
        }
Exemple #2
0
		/// <summary>Checks if the specified non-ISA CPU or system extension is supported by the processor.</summary>
		/// <param name="systemFeature">An object specifying the non-ISA CPU or system extension of interest.</param>
		/// <returns>true if processor supports the specified non-ISA CPU or system extension and false otherwise.</returns>
		/// <seealso cref="CpuSimdFeature" />
		/// <seealso cref="X86CpuSystemFeature" />
		/// <seealso cref="ArmCpuSystemFeature" />
		public static bool IsSupported(CpuSystemFeature systemFeature)
		{
			ulong systemFeaturesMask = 0;
			Status status = yepLibrary_GetCpuSystemFeatures(out systemFeaturesMask);
			if (status != Status.Ok)
				throw GetException(status);

			return (unchecked((long)systemFeaturesMask) & (1L << unchecked((int)systemFeature.Id))) != 0;
		}