]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Small fixes to get_times program
authorcazamias <cazamias@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 26 Sep 2012 23:43:44 +0000 (23:43 +0000)
committercazamias <cazamias@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 26 Sep 2012 23:43:44 +0000 (23:43 +0000)
git-svn-id: https://svn.dealii.org/trunk@26771 0785d39b-7218-0410-832d-ea1e28bc413d

tests/benchmarks/gettimes/get_times.cc

index 5ddc93ad88a9d0439a5ed5dc100a7905177f6e1a..5a8b127d9b93c9c5b8f511016ee2eabcc8a2e20b 100644 (file)
@@ -17,7 +17,7 @@ int main(int argc, char *argv[]) {
        stringstream ss;
        const int IGNORE_LINES = 3; //Number of initial lines to ignore
 
-       input.open("test_input.txt");
+       input.open("temp.txt");
        if(argc <= 1)
        {
                cerr << "Error: " << argv[0] << " requires one argument" << endl;
@@ -35,7 +35,7 @@ int main(int argc, char *argv[]) {
        }
 
        vector<string> names;
-       vector<float> times;
+       vector<double> times;
 
        //Extract name and execution time from each line
        while(!input.eof())
@@ -53,7 +53,7 @@ int main(int argc, char *argv[]) {
                
                //Find time string and convert to double
                int num_start = last_s - 1;
-               while(isdigit(curr_line[num_start]) || curr_line[num_start] == '.')
+               while(curr_line[num_start] != ' ')//isdigit(curr_line[num_start]) || curr_line[num_start] == '.')
                        num_start--;
                string timestr = curr_line.substr(num_start+1, last_s - num_start);
                ////cout << timestr << endl;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.