Closed opensdh closed 5 years ago
I didn't check line-by-line, but, offhand, all of this looks very good. Am I understanding correctly that the changes allowed some Boost dependencies (in particular in serialize.hh) to be removed entirely?
I didn't check line-by-line, but, offhand, all of this looks very good.
Thanks for looking.
Am I understanding correctly that the changes allowed some Boost dependencies (in particular in serialize.hh) to be removed entirely?
Yes, the dependency on boost::serialization
is gone (as per the last commit message). That wasn't really the point—that serialization library just wasn't quite what I wanted to use, and @tuxfan (reasonably!) asked that we not maintain a wrapper for that one on top of our own implementation.
@opensdh: I merged this. However, I get an error when I try to compile with clang:
[ 26%] Building CXX object flecsi/execution/CMakeFiles/task.dir/test/task.cc.o
In file included from /home/bergen/devel/tuxfan/flecsi/flecsi/execution/test/task.cc:15:
In file included from /home/bergen/devel/tuxfan/flecsi/flecsi/../flecsi/utils/ftest.hh:22:
In file included from /home/bergen/devel/tuxfan/flecsi/flecsi/../flecsi/control/control.hh:20:
In file included from /home/bergen/devel/tuxfan/flecsi/flecsi/../flecsi/control/control_point_walker.hh:21:
In file included from /home/bergen/devel/tuxfan/flecsi/flecsi/../flecsi/utils/tuple_walker.hh:18:
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple:133:17: error:
reference member '_M_head_impl' binds to a temporary object whose lifetime
would be shorter than the lifetime of the constructed object
: _M_head_impl(std::forward<_UHead>(__h)) { }
^~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple:366:4: note:
in instantiation of function template specialization 'std::_Head_base<0,
const float &, false>::_Head_base
/home/bergen/devel/tuxfan/flecsi/flecsi/../flecsi/execution/legion/execution_policy.hh:73:28: note: in instantiation of function template specialization 'std::tuple<const float &>::tuple<double, true>' requested here return utils::serial_put(std::tuple<std::conditional_t<
Good catch (you and Clang, I guess): we shouldn't be attempting to construct a tuple of const float&
from a double
. The code actually notices that it can't bind the reference, but then proceeds to do so anyway because it forgets to replace const float&
with just float
. Should be fixed in #631, but please double-check.
@opensdh Thanks! That fixes the build issue.
This allows "arbitrary" types as task parameters, falling back on
memcpy
(as was effectively already in use) for basic types. If the extramalloc
/copy is problematic, we canif constexpr
it on the newmemcpyable_v
trait—but note thatfield_handle<T>
doesn't satisfy that for want of a default constructor. (You have to have some object tomemcpy
into;reinterpret_cast
isn't actually allowed here, although surely it works.)