complex.hpp 464 Bytes
Newer Older
Matthieu Dorier's avatar
Matthieu Dorier committed
1 2 3 4 5 6 7
/*
 * (C) 2017 The University of Chicago
 * 
 * See COPYRIGHT in top-level directory.
 */
#ifndef __THALLIUM_COMPLEX_SERIALIZATION_HPP
#define __THALLIUM_COMPLEX_SERIALIZATION_HPP
8 9 10 11 12 13

#include <complex>

namespace thallium {

template<class A, class T>
14
inline void save(A& ar, std::complex<T>& t) {
15 16
    ar & t.real();
    ar & t.imag();
17 18 19
}

template<class A, typename T>
20
inline void load(A& ar, std::complex<T>& t) {
21 22
    ar & t.real();
    ar & t.imag();
23 24 25 26 27
}

}

#endif