oneDPL icon indicating copy to clipboard operation
oneDPL copied to clipboard

[Draft] Remove some extra type requirements (default ctor, move-only)

Open danhoeflinger opened this issue 6 months ago • 1 comments

  • 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_]reduce for host backends (both tbb and omp).

  • Adds [transform_]reduce tests 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.

danhoeflinger avatar Jun 25 '25 12:06 danhoeflinger

Converted to draft until we can discuss more officially the proposal.

danhoeflinger avatar Jun 25 '25 13:06 danhoeflinger

I'm going to break this into two PRs. setting draft for now.

danhoeflinger avatar Jul 25 '25 12:07 danhoeflinger

closed in favor of #2354 & #2355

danhoeflinger avatar Jul 25 '25 14:07 danhoeflinger