/// <summary> /// main math class providing static builtin functions /// </summary> static ILMath() { #region initialize proc specific interfaces ILCPUID cpuid; ILArray <double> A = new double[] { 1.0, -1.0 }, B = new double[] { 1.0, 2.0 }; switch (Environment.OSVersion.Platform) { case PlatformID.Unix: Lapack = new ILLapackGenLinux(); FFT = new ILFFTW3FFT(); break; default: if (Lapack == null) { cpuid = new ILCPUID(); switch (cpuid.vendor) { case "AuthenticAMD": //Lapack = new ILACMLWrapper(); try { Lapack = new ILACML4_1(); FFT = new ILACMLFFT(); multiply(A.T, B); } catch (Exception e) { FFT = new ILMKLFFT(); try { Lapack = new ILLapackMKL10_0(); multiply(A.T, B); } catch (Exception) { Lapack = new ILLapackGeneric(); } } break; case "GenuineIntel": FFT = new ILMKLFFT(); try { Lapack = new ILLapackMKL10_0(); multiply(A.T, B); } catch (Exception) { Lapack = new ILLapackGeneric(); } break; default: Lapack = new ILLapackGeneric(); FFT = new ILMKLFFT(); break; } } break; } #endregion #region initialize machine parameter infos macharD(ref m_machparDouble.ibeta, ref m_machparDouble.it, ref m_machparDouble.irnd, ref m_machparDouble.ngrd, ref m_machparDouble.machep, ref m_machparDouble.negep, ref m_machparDouble.iexp, ref m_machparDouble.minexp, ref m_machparDouble.maxexp, ref m_machparDouble.eps, ref m_machparDouble.epsneg, ref m_machparDouble.xmin, ref m_machparDouble.xmax); macharF(ref m_machparFloat.ibeta, ref m_machparFloat.it, ref m_machparFloat.irnd, ref m_machparFloat.ngrd, ref m_machparFloat.machep, ref m_machparFloat.negep, ref m_machparFloat.iexp, ref m_machparFloat.minexp, ref m_machparFloat.maxexp, ref m_machparFloat.eps, ref m_machparFloat.epsneg, ref m_machparFloat.xmin, ref m_machparFloat.xmax); #endregion }
/// <summary> /// main math class providing static builtin functions /// </summary> static ILMath() { #region initialize proc specific interfaces ILCPUID cpuid; ILArray<double> A = new double[]{1.0,-1.0}, B = new double[]{1.0, 2.0}; switch (Environment.OSVersion.Platform) { case PlatformID.Unix: Lapack = new ILLapackGenLinux(); FFT = new ILFFTW3FFT(); break; default: if (Lapack == null) { cpuid = new ILCPUID(); switch (cpuid.vendor) { case "AuthenticAMD": //Lapack = new ILACMLWrapper(); try { Lapack = new ILACML4_1(); FFT = new ILACMLFFT(); multiply(A.T,B); } catch (Exception e) { FFT = new ILMKLFFT(); try { Lapack = new ILLapackMKL10_0(); multiply(A.T,B); } catch (Exception) { Lapack = new ILLapackGeneric(); } } break; case "GenuineIntel": FFT = new ILMKLFFT(); try { Lapack = new ILLapackMKL10_0(); multiply(A.T,B); } catch (Exception) { Lapack = new ILLapackGeneric(); } break; default: Lapack = new ILLapackGeneric(); FFT = new ILMKLFFT(); break; } } break; } #endregion #region initialize machine parameter infos macharD(ref m_machparDouble.ibeta, ref m_machparDouble.it,ref m_machparDouble.irnd,ref m_machparDouble.ngrd,ref m_machparDouble.machep,ref m_machparDouble.negep,ref m_machparDouble.iexp,ref m_machparDouble.minexp,ref m_machparDouble.maxexp,ref m_machparDouble.eps,ref m_machparDouble.epsneg,ref m_machparDouble.xmin,ref m_machparDouble.xmax); macharF(ref m_machparFloat.ibeta, ref m_machparFloat.it,ref m_machparFloat.irnd,ref m_machparFloat.ngrd,ref m_machparFloat.machep,ref m_machparFloat.negep,ref m_machparFloat.iexp,ref m_machparFloat.minexp,ref m_machparFloat.maxexp,ref m_machparFloat.eps,ref m_machparFloat.epsneg,ref m_machparFloat.xmin,ref m_machparFloat.xmax); #endregion }
private static string Info() { StringBuilder s = new StringBuilder(); s.Append("This is the general test routine for ILNumerics.Net" + Environment.NewLine); s.Append("" + Environment.OSVersion + ", "); s.Append("Number of proc: " + Environment.ProcessorCount + ", " + Environment.NewLine); s.Append("CLR: " + Environment.Version + ", "); s.Append("Proc.memory: " + Environment.WorkingSet + "" + Environment.NewLine); ILMath.rand(1); ILCPUID cpuid = new ILCPUID(); s.Append(String.Format("CPUID:{0}", cpuid.ToString())); return(s.ToString()); }
private static string Info() { StringBuilder s = new StringBuilder(); s.Append("This is the general test routine for ILNumerics.Net" + Environment.NewLine); s.Append("" + Environment.OSVersion + ", "); s.Append("Number of proc: " + Environment.ProcessorCount + ", "+ Environment.NewLine); s.Append("CLR: " + Environment.Version + ", "); s.Append("Proc.memory: " + Environment.WorkingSet + ""+ Environment.NewLine); ILMath.rand(1); ILCPUID cpuid = new ILCPUID(); s.Append(String.Format("CPUID:{0}",cpuid.ToString())); return s.ToString(); }