Skip to content

Commit 60888f0

Browse files
committed
add CP_ALGO_CHECKPOINT check, fix alignas on bump_alloc.hpp
1 parent a47f6af commit 60888f0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

cp-algo/util/bump_alloc.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define CP_ALGO_UTIL_BUMP_ALLOC_HPP
33
#include <cstddef>
44
namespace cp_algo {
5-
char buf[450 << 20] alignas(32);
5+
alignas(32) char buf[450 << 20];
66
size_t buf_ind = sizeof buf;
77
template<class T> struct bump_alloc {
88
typedef T value_type;

cp-algo/util/checkpoint.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ namespace cp_algo {
1010
double delta = now - last;
1111
last = now;
1212
if(msg.size()) {
13+
#ifdef CP_ALGO_CHECKPOINT
1314
std::cerr << msg << ": " << delta * 1000 << " ms\n";
15+
#endif
1416
}
1517
}
1618
}

0 commit comments

Comments
 (0)