|
MASA-Core
|
00001 /******************************************************************************* 00002 * 00003 * Copyright (c) 2010-2015 Edans Sandes 00004 * 00005 * This file is part of MASA-Core. 00006 * 00007 * MASA-Core is free software: you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation, either version 3 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * MASA-Core is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with MASA-Core. If not, see <http://www.gnu.org/licenses/>. 00019 * 00020 ******************************************************************************/ 00021 00022 #ifndef CONFIGS_HPP_ 00023 #define CONFIGS_HPP_ 00024 00025 #include "ConfigParser.hpp" 00026 00027 #include <string> 00028 using namespace std; 00029 00030 #define SRA_STRATEGY_GREEDY (0) 00031 #define SRA_STRATEGY_AUTO (1) 00032 00033 #define SRA_STRATEGY_ENUM "greedy;auto" 00034 00035 #define SRA_COMPRESSION_NONE (0) 00036 #define SRA_COMPRESSION_8BITS (1) 00037 #define SRA_COMPRESSION_4BITS (2) 00038 #define SRA_COMPRESSION_VLC (3) 00039 #define SRA_COMPRESSION_2_STEPS (4) 00040 00041 #define SRA_COMPRESSION_ENUM "none;8bits;4bits;vlc;vlc-hilo" 00042 00043 #define STAGE_4_EXECUTION_PARALLEL (0) 00044 #define STAGE_4_EXECUTION_ORTHOGONAL (1) 00045 #define STAGE_4_EXECUTION_INTERLEAVED (2) 00046 #define STAGE_4_EXECUTION_TYPE_ENUM "parallel;orthogonal;interleaved" 00047 00048 // TODO duplicado do Job.hpp 00049 #define GLOBAL (0) 00050 #define STAGE_1 (1) 00051 #define STAGE_2 (2) 00052 #define STAGE_3 (3) 00053 #define STAGE_4 (4) 00054 #define STAGE_5 (5) 00055 #define STAGE_6 (6) 00056 00057 00058 #define CONFIG_NOT_SET (0x80000000) 00059 00060 class Configs { 00061 public: 00062 Configs(); 00063 virtual ~Configs(); 00064 00065 void loadFile(string filename); 00066 void loadConfigs(const char** configs); 00067 void printFile(FILE* file); 00068 00069 int getSRAStrategy(int stage); 00070 int getSRACompression(int stage); 00071 long long getSRADiskSize(int stage); 00072 long long getSRARamSize(int stage); 00073 bool isBlockPruningEnabled(int stage); 00074 int getMaxIterations(int stage); 00075 int getMaxPartitionSize(int stage); 00076 00077 int getPruningInitialScore(); 00078 00079 private: 00080 int sra_strategy[7]; 00081 int sra_compression[7]; 00082 long long disk_size[7]; 00083 long long ram_size[7]; 00084 int block_pruning[7]; 00085 int max_iterations[7]; 00086 int max_partition_size[7]; 00087 00088 int stage1_pruning_initial_score; 00089 int stage4_execution_type; 00090 00091 /* Paths */ 00092 string sra_path[7]; 00093 string work_path; 00094 string sequences_path; 00095 00096 ConfigParser* parser; 00097 }; 00098 00099 #endif /* CONFIGS_HPP_ */
1.7.6.1