Exemple #1
0
        public static int GetVersion()
        {
            int         version = -1;
            CUFFTResult res;

            try
            {
                ICUFFTDriver driver;
                if (IntPtr.Size == 8)
                {
                    driver = new CUFFTDriver64();
                }
                else
                {
                    driver = new CUFFTDriver32();
                }
                res = driver.cufftGetVersion(ref version);
                if (res != CUFFTResult.Success)
                {
                    throw new CUFFTException(res);
                }
            }
            catch (EntryPointNotFoundException ex)
            {
                System.Diagnostics.Debug.WriteLine("GetVersion(): " + ex.Message);
            }

            return(version);
        }
Exemple #2
0
        public static int GetVersion()
        {
            int version = -1;
            CUFFTResult res;
            try
            {
                
                ICUFFTDriver driver;
                if (IntPtr.Size == 8)
                    driver = new CUFFTDriver64();
                else
                    driver = new CUFFTDriver32();
                res = driver.cufftGetVersion(ref version);
                if(res != CUFFTResult.Success)
                    throw new CUFFTException(res);
            }
            catch (EntryPointNotFoundException ex)
            {
                System.Diagnostics.Debug.WriteLine("GetVersion(): " + ex.Message);
            }

            return version;
        }