Posts

[Programming] Determine whether a specified processor feature is supported by the current computer

To determine whether a specified processor feature is supported by the current computer, use  IsProcessorFeaturePresent function found in kernel32.dll . Syntax: BOOL IsProcessorFeaturePresent(   [in] DWORD ProcessorFeature ); For parameter value, you can refer to Win32 API documentation . C# (.NET Framework 4.7.2) using System; using System.Runtime.InteropServices; namespace CPU {     internal class Program     {         [DllImport("kernel32.dll")]         private static extern bool IsProcessorFeaturePresent(uint ProcessorFeature);         static void Main(string[] args)         {             Console.WriteLine("PF_SSSE3_INSTRUCTIONS_AVAILABLE " + IsProcessorFeaturePresent(36));             Console.WriteLine("PF_AVX_INSTRUCTIONS_AVAILABLE " + IsProcessorFeaturePresent(39));             Console.ReadLine();         }     } } Output: PF_SSSE3_INSTRUCTIONS_AVAILABLE True PF_AVX_INSTRUCTIONS_AVAILABLE False For other generic processor information, you can alway

[Badminton] Viktor Axelsen stunned by Thai rising star in India Open 2023

Image
Yesterday, in a badminton tournament held at K. D. Jadhav Indoor Hall of New Delhi, Thai Kunlavut Vitidsarn won the final against Danish Viktor Axelsen in 22-20, 10-21, 21-12 victory.  Viktor Axelsen recently won Malaysia Open title, with a total win of 12 finals in a row, but lost to Thai 21-year-old rising star in India Open. According to Denmark TV2 , defeat makes the Danish shuttler smiles. "It's only natural and good to lose sometimes. It makes you feel sharp and it motivates you. Diversity is only good, and that comes with the job. I would like to congratulate Kunlavut today," Axelsen said in an interview after the medal ceremony.