Skip to content

Commit

Permalink
Fix boost version issues (#4)
Browse files Browse the repository at this point in the history
Add support for older boost versions of py2
  • Loading branch information
mhuen authored Oct 18, 2020
1 parent c372fec commit a3abf76
Show file tree
Hide file tree
Showing 3 changed files with 490 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ic3_data_ext/ext_boost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ wrapped with boost python.
#include <boost/python.hpp>

#include "utils.cpp"
#include "reduced_summary_statistics.cpp"

#if BOOST_VERSION < 106500
#include "reduced_summary_statistics__old_boost_version.cpp"
#else
#include "reduced_summary_statistics.cpp"
#endif

/*
Depending on the boost version, we need to use numpy differently.
Expand Down
2 changes: 2 additions & 0 deletions ic3_data_ext/reduced_summary_statistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ inline void update_str_dom_data_fields(
}

// get a pointer to the input data
// this is the fastest way to access and modify the data
double* x_dom_ptr = reinterpret_cast<double*>(x_dom.get_data());

// compute helper variables for offset calculation
Expand Down Expand Up @@ -164,6 +165,7 @@ inline void update_hex_data_fields(
}

// get a pointer to the input data
// this is the fastest way to access and modify the data
double* x_deepcore_ptr = reinterpret_cast<double*>(x_deepcore.get_data());
double* x_ic78_ptr = reinterpret_cast<double*>(x_ic78.get_data());

Expand Down
Loading

0 comments on commit a3abf76

Please sign in to comment.