Ejemplo n.º 1
0
 public void MklCallsWork()
 {
     if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
     {
         Assert.IsTrue(MKL.MKL_GetMaxThreads() == Environment.ProcessorCount || MKL.MKL_GetMaxThreads() == Environment.ProcessorCount / 2);
     }
 }
Ejemplo n.º 2
0
        public void CouldSetNumThreads()
        {
            var init = BlasNumThreads;

            BlasNumThreads = 2;
            if (IsMKLSupported)
            {
                Assert.AreEqual(2, MKL.MKL_GetMaxThreads(), "MKL.MKL_GetMaxThreads");
            }
            Assert.AreEqual(2, OpenBLAS.OpenblasGetNumThreads(), "OpenBLAS.OpenblasGetNumThreads");
            Assert.AreEqual(2, BlasNumThreads, "BlasNumThreads");

            BlasNumThreads = init;
        }