コード例 #1
0
        private string deviceIDString(int id, DeviceType type)
        {
            var platform = 0;

            if (InitPlatforms())
            {
                platform = ProspectorPlatforms.PlatformForDeviceType(type);
            }
            else      // fallback
            {
                Helpers.ConsolePrint(MinerTAG(), "Failed to get platforms, falling back");
                if (ComputeDeviceManager.Avaliable.HasNVIDIA && type != DeviceType.NVIDIA)
                {
                    platform = 1;
                }
            }
            return(String.Format("{0}-{1}", platform, id));
        }
コード例 #2
0
        private string DeviceIDString(int id, DeviceType type)
        {
            var platform = 0;

            if (InitPlatforms())
            {
                platform = ProspectorPlatforms.PlatformForDeviceType(type);
            }
            else
            {
                // fallback
                Helpers.ConsolePrint(MinerTag(), "Failed to get platforms, falling back");
                if (ComputeDeviceManager.Available.HasNvidia && type != DeviceType.NVIDIA)
                {
                    platform = 1;
                }
            }
            return($"{platform}-{id}");
        }