3 #ifdef MULTITHREAD_SUPPORT
13 //--------------------------------------------------------------------------
16 first(0), second(0), third(0)
20 Triple::Triple(usint a, usint b, usint c) :
21 first(a), second(b), third(c)
25 //--------------------------------------------------------------------------
28 fileSize(std::ifstream& file)
30 std::streamoff curr = file.tellg();
32 file.seekg(0, std::ios::end);
33 std::streamoff size = file.tellg();
34 file.seekg(0, std::ios::beg);
37 file.seekg(curr, std::ios::beg);
42 fileSize(std::ofstream& file)
44 std::streamoff curr = file.tellp();
46 file.seekp(0, std::ios::end);
47 std::streamoff size = file.tellp();
48 file.seekp(0, std::ios::beg);
51 file.seekp(curr, std::ios::beg);
56 operator<<(std::ostream& stream, pair_type data)
58 return stream << "(" << data.first << ", " << data.second << ")";
62 readRows(std::ifstream& file, std::vector<std::string>& rows, bool skipEmptyRows)
67 std::getline(file, buf);
68 if(skipEmptyRows && buf.length() == 0) { continue; }
76 #ifdef MULTITHREAD_SUPPORT
77 return omp_get_wtime();
79 return clock() / (double)CLOCKS_PER_SEC;