You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: helper/FctHelper.cpp
+24-18Lines changed: 24 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
#include"FctHelper.h"
2
2
3
-
#include<boost/filesystem/operations.hpp>
4
-
5
3
#include<iostream>
6
4
#include<math.h>
7
5
#include<mpi.h>
@@ -30,19 +28,19 @@ bool cmpStringGrow::operator()(const string& a, const string& b) const {
30
28
}
31
29
32
30
// Templates for using values, static arrays and dynamic arrays on MPI_Send and MPI_Recv ("block until received", with extra mode "receive only if sent")
33
-
template<typename T, typename Func> voidmpi_send(int rank, int count, MPI_Datatype type, const T* val, int dest, int tag, bool debug, Func printer) {
31
+
template<typename T> voidmpi_send(int rank, int count, MPI_Datatype type, const T* val, int dest, int tag, bool debug, auto printer) {
// 2^63+1 µs = 292277 yr 0 mo 1 wk 1 d 23 h 52 min 30 s 775.807 ms
250
248
// wolframAlphaMode => -2^63 µs = -292471 yr -2 mo -2 wk -1 d -8 h 0 min -54 s -775.808 ms
251
249
// 2^63+1 µs = 292471 yr 2 mo 2 wk 1 d 8 h 0 min 54 s 775.807 ms
252
-
constexprintmax_t yearUs = 31556952 * chrono::microseconds::period::den; // 1 yr = 31556952000000 µs ; NOTE: 31556952 s / yr include leap years, otherwise it would be 60 * 60 * 24 * 365 = 31540000 s / yr.
253
-
constexprintmax_t monthUs = 2629746 * chrono::microseconds::period::den; // 1 mo = 2629746000000 µs ; 2629746 s / mo include leap years, otherwise it would be 31540000 / 12 = 7885000 / 3 = 2628333.333.. s / mo.
254
-
constexprintmax_t weekUs = 604800 * chrono::microseconds::period::den; // 1 wk = 604800000000 µs ; 60 * 60 * 24 * 7 = 604800 s / wk, i.e. from here down, the C++ standard's leap years do not influence values.
constexprintmax_t yearUs = chrono::years::period::num * chrono::microseconds::period::den; // 1 yr = 31556952000000 µs ; NOTE: 31556952 s / yr include leap years, otherwise it would be 60 * 60 * 24 * 365 = 31540000 s / yr.
251
+
constexprintmax_t monthUs = chrono::months::period::num * chrono::microseconds::period::den; // 1 mo = 2629746000000 µs ; 2629746 s / mo include leap years, otherwise it would be 31540000 / 12 = 7885000 / 3 = 2628333.333.. s / mo.
252
+
constexprintmax_t weekUs = chrono::weeks::period::num * chrono::microseconds::period::den; // 1 wk = 604800000000 µs ; 60 * 60 * 24 * 7 = 604800 s / wk, i.e. from here down, the C++ standard's leap years do not influence values.
if (dirMarkerIndex != string::npos) { // If there is a path to another directory given, make sure that the directory exists.
373
371
string dir = path.substr(0, dirMarkerIndex);
374
-
if (!boost::filesystem::is_directory(dir)) { // Need to create that directory, but in order to do so, must first ensure that its parent directory exists.
372
+
if (!filesystem::is_directory(dir)) { // Need to create that directory, but in order to do so, must first ensure that its parent directory exists.
375
373
if (!ensureDirExists(dir))
376
374
returnfalse;
377
-
if (!boost::filesystem::create_directories(dir)) {
375
+
if (!filesystem::create_directories(dir)) {
378
376
cerr << "Failed to create directory \"" << dir << "\"." << endl;
0 commit comments