[Draft] Remove some extra type requirements (default ctor, move-only)
-
Removes default constructible requirement for types used in result and scratch storage.
-
Removes copy construction and copy assignable requirements from scalar initialization type from
[transform_]reducefor host backends (both tbb and omp). -
Adds
[transform_]reducetests which checks sycl backend with a non-default constructible type, and checks host backends with only move constructible and move assignment operators.
Partial fix to #1955 ([transform_]reduce for host policies, and removing default constructible req for multiple algorithms).
Our tentative proposal: Match conventions of libstdc++ and libcxx for host policies (add move assignment req), and to add copy constructible and copy assignable req for device policies. Device policies must copy to the device via a bitwise copy anyway, so move only types make less sense. While theoretically possible in the SYCL specification, move only types encounter problems in practice currently with some build errors getting the data on the device.
Converted to draft until we can discuss more officially the proposal.
I'm going to break this into two PRs. setting draft for now.
closed in favor of #2354 & #2355