diff --git a/IpcMt/Thread/Threads.cpp b/IpcMt/Thread/Threads.cpp index ccccc2f..1c5cb79 100644 --- a/IpcMt/Thread/Threads.cpp +++ b/IpcMt/Thread/Threads.cpp @@ -16,7 +16,7 @@ void fnoarg(int t) //-------------------------------------------------------------------------------------------------- int main(int, char **) { - int nthreads = std::thread::hardware_concurrency(); + const int nthreads = std::thread::hardware_concurrency(); std::cout << "nthreads = " << nthreads << std::endl; std::vector pool; @@ -25,7 +25,7 @@ int main(int, char **) pool.push_back( std::thread(fnoarg,i) ); } - for(auto& t : pool){ + for (auto& t : pool){ t.join(); } diff --git a/Libs/Boost/MultiArray2d.cpp b/Libs/Boost/MultiArray2d.cpp index 564c800..d512539 100644 --- a/Libs/Boost/MultiArray2d.cpp +++ b/Libs/Boost/MultiArray2d.cpp @@ -15,8 +15,8 @@ void print(const boost::multi_array &array) { - for (std::size_t i=0; i &array) //-------------------------------------------------------------------------------------------------- int main(int argc, char **argv) { - const std::size_t m = (argc>1) ? atoi(argv[1]) : 4; - const std::size_t n = (argc>2) ? atoi(argv[2]) : 5; + const std::size_t m = (argc > 1) ? atoi(argv[1]) : 4; + const std::size_t n = (argc > 2) ? atoi(argv[2]) : 5; boost::multi_array A(boost::extents[n][m]); - for(std::size_t i=0; i B(boost::extents[n][m]); - for(std::size_t i=0; i &array) { - for (std::size_t i=0; i &array) //-------------------------------------------------------------------------------------------------- int main(int argc, char **argv) { - const std::size_t m = (argc>1) ? atoi(argv[1]) : 4; - const std::size_t n = (argc>2) ? atoi(argv[2]) : 5; - const std::size_t o = (argc>3) ? atoi(argv[3]) : 2; + const std::size_t m = (argc > 1) ? atoi(argv[1]) : 4; + const std::size_t n = (argc > 2) ? atoi(argv[2]) : 5; + const std::size_t o = (argc > 3) ? atoi(argv[3]) : 2; boost::multi_array A(boost::extents[o][n][m]); - for (std::size_t i=0; i B(boost::extents[o][n][m]); - for (std::size_t i=0; i