Skip to content

Commit

Permalink
Add docs following @galexv's suggestion.
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Wallerberger committed Apr 20, 2019
1 parent dab654c commit c0c7980
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions alea/include/alps/alea/serialize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ serialize(serializer &ser, const std::string &key,
if (!eigen_is_contiguous(value))
serialize(ser, key, matrix_type(value));

// Evaluate to matrix or proxy object if already matrix
// complex_op<...> is a wrapper around double[2][2]. In order to convert
// it to serializable object, we first cast it to doubles, and then add
// two further dimensions.
const double *dbl_data = reinterpret_cast<const double *>(value.data());
if (Derived::ColsAtCompileTime == 1 || Derived::RowsAtCompileTime == 1) {
// Omit second dimension for simple vectors
Expand All @@ -54,7 +56,9 @@ deserialize(deserializer &ser, const std::string &key,
"it must be Fortran contiguous in memory");
}

// Evaluate to matrix or proxy object if already matrix
// complex_op<...> is a wrapper around double[2][2]. In order to convert
// it to serializable object, we first cast it to doubles, and then add
// two further dimensions.
double *dbl_data = reinterpret_cast<double *>(value.data());
if (Derived::ColsAtCompileTime == 1 || Derived::RowsAtCompileTime == 1) {
// Omit second dimension for simple vectors
Expand Down

0 comments on commit c0c7980

Please sign in to comment.