|
16 | 16 | #pragma once |
17 | 17 |
|
18 | 18 | #include <sst/core/sst_types.h> |
19 | | -#include <mercury/common/serializable.h> |
20 | 19 | #include <mercury/common/errors.h> |
| 20 | +#include <sst/core/serialization/serializable.h> |
21 | 21 | #include <iosfwd> |
22 | 22 | #include <stdint.h> |
23 | 23 | #include <iostream> |
@@ -146,6 +146,11 @@ class TimeDelta |
146 | 146 | TimeDelta& operator-=(const TimeDelta &other); |
147 | 147 | TimeDelta& operator*=(double scale); |
148 | 148 | TimeDelta& operator/=(double scale); |
| 149 | + |
| 150 | + void serialize_order(SST::Core::Serialization::serializer& ser) { |
| 151 | + SST_SER(ticks_); |
| 152 | + } |
| 153 | + |
149 | 154 | }; |
150 | 155 |
|
151 | 156 | struct Timestamp |
@@ -207,6 +212,11 @@ struct Timestamp |
207 | 212 | static constexpr uint64_t carry_bits_mask = 0; |
208 | 213 | static constexpr uint64_t remainder_bits_mask = ~uint64_t(0); |
209 | 214 | static constexpr uint64_t carry_bits_shift = 0; |
| 215 | + |
| 216 | + void serialize_order(SST::Core::Serialization::serializer& ser) { |
| 217 | + SST_SER(epochs); |
| 218 | + SST_SER(time); |
| 219 | + } |
210 | 220 | }; |
211 | 221 |
|
212 | 222 | TimeDelta operator+(const TimeDelta &a, const TimeDelta &b); |
@@ -303,21 +313,3 @@ std::string to_printf_type(TimeDelta t); |
303 | 313 |
|
304 | 314 | } // end namespace Hg |
305 | 315 | } // end namespace SST |
306 | | - |
307 | | -START_SERIALIZATION_NAMESPACE |
308 | | -template <> class serialize_impl<SST::Hg::TimeDelta> |
309 | | -{ |
310 | | - public: |
311 | | - void operator()(SST::Hg::TimeDelta& t, serializer& ser){ |
312 | | - ser.primitive(t); |
313 | | - } |
314 | | -}; |
315 | | - |
316 | | -template <> class serialize_impl<SST::Hg::Timestamp> |
317 | | -{ |
318 | | - public: |
319 | | - void operator()(SST::Hg::Timestamp& t, serializer& ser){ |
320 | | - ser.primitive(t); |
321 | | - } |
322 | | -}; |
323 | | -END_SERIALIZATION_NAMESPACE |
0 commit comments