Beispiel #1
0
        public static void InitMinerSystemVariablesFile()
        {
            var file = new MinerSystemVariablesFile();

            MinerSystemVariables = new Dictionary <string, Dictionary <string, string> >();
            var isFileInit = false;

            if (file.IsFileExists())
            {
                var read = file.ReadFile();
                if (read != null)
                {
                    isFileInit           = true;
                    MinerSystemVariables = read;
                }
            }
            if (!isFileInit)
            {
                // general AMD defaults scope
                {
                    var minerPaths = new List <string>()
                    {
                        MinerPaths.Data.Sgminer560General,
                        MinerPaths.Data.SgminerGm,
                        MinerPaths.Data.SgminerKl,
                        MinerPaths.Data.ClaymoreCryptoNightMiner,
                        MinerPaths.Data.ClaymoreZcashMiner,
                        MinerPaths.Data.OptiminerZcashMiner,
                        MinerPaths.Data.CastXMR,
                        MinerPaths.Data.XmrigAMD,
                        MinerPaths.Data.lyclMiner,
                        MinerPaths.Data.ClaymoreNeoscryptMiner
                    };
                    foreach (var minerPath in minerPaths)
                    {
                        MinerSystemVariables[minerPath] = new Dictionary <string, string>()
                        {
                            { "GPU_MAX_ALLOC_PERCENT", "100" },
                            { "GPU_USE_SYNC_OBJECTS", "1" },
                            { "GPU_SINGLE_ALLOC_PERCENT", "100" },
                            { "GPU_MAX_HEAP_SIZE", "100" },
                            { "GPU_FORCE_64BIT_PTR", "1" }
                        };
                    }
                }
                // ClaymoreDual scope
                {
                    MinerSystemVariables[MinerPaths.Data.ClaymoreDual] = new Dictionary <string, string>()
                    {
                        { "GPU_MAX_ALLOC_PERCENT", "100" },
                        { "GPU_USE_SYNC_OBJECTS", "1" },
                        { "GPU_SINGLE_ALLOC_PERCENT", "100" },
                        { "GPU_MAX_HEAP_SIZE", "100" },
                        { "GPU_FORCE_64BIT_PTR", "0" }
                    };
                }
                // save defaults
                file.Commit(MinerSystemVariables);
            }
        }
Beispiel #2
0
        public static void InitMinerSystemVariablesFile()
        {
            MinerSystemVariablesFile file = new MinerSystemVariablesFile();

            MinerSystemVariables = new Dictionary <string, Dictionary <string, string> >();
            bool isFileInit = false;

            if (file.IsFileExists())
            {
                var read = file.ReadFile();
                if (read != null)
                {
                    isFileInit           = true;
                    MinerSystemVariables = read;
                }
            }
            if (!isFileInit)
            {
                // general AMD defaults scope
                {
                    List <string> minerPaths = new List <string>()
                    {
                        MinerPaths.Data.sgminer_5_6_0_general,
                        MinerPaths.Data.sgminer_gm,
                        MinerPaths.Data.sgminer_HSR,
                        MinerPaths.Data.sgminer_Bitcore,
                        MinerPaths.Data.sgminer_Phi,
                        MinerPaths.Data.sgminer_Skein,
                        MinerPaths.Data.sgminer_Tribus,
                        MinerPaths.Data.sgminer_Xevan,
                        MinerPaths.Data.glg,
                        MinerPaths.Data.ClaymoreCryptoNightMiner,
                        MinerPaths.Data.ClaymoreZcashMiner,
                        MinerPaths.Data.OptiminerZcashMiner
                    };
                    foreach (var minerPath in minerPaths)
                    {
                        MinerSystemVariables[minerPath] = new Dictionary <string, string>()
                        {
                            { "GPU_MAX_ALLOC_PERCENT", "100" },
                            { "GPU_USE_SYNC_OBJECTS", "1" },
                            { "GPU_SINGLE_ALLOC_PERCENT", "100" },
                            { "GPU_MAX_HEAP_SIZE", "100" },
                            { "GPU_FORCE_64BIT_PTR", "1" }
                        };
                    }
                }
                // ClaymoreDual scope
                {
                    MinerSystemVariables[MinerPaths.Data.ClaymoreDual] = new Dictionary <string, string>()
                    {
                        { "GPU_MAX_ALLOC_PERCENT", "100" },
                        { "GPU_USE_SYNC_OBJECTS", "1" },
                        { "GPU_SINGLE_ALLOC_PERCENT", "100" },
                        { "GPU_MAX_HEAP_SIZE", "100" },
                        { "GPU_FORCE_64BIT_PTR", "0" }
                    };
                }
                // save defaults
                file.Commit(MinerSystemVariables);
            }
        }