We currently user a builder-ish copy parameters class, which inherits the actual raw copy parameters. But - it involves a lot of code duplication, use of conditional expressions etc. Perhaps it would be better and simpler to have a builder class which doesn't immediately set the actual copy parameters, and is more structured , i.e. something like
Then one could write something like my_builder.start().offset = dim3{1, 2, 3}; }
The downside of this design is less one-liners (although we can always add methods to endpoint_t, and make it hold a reference to the containing copy params build, which can be returned from setter methods)
We currently user a builder-ish copy parameters class, which inherits the actual raw copy parameters. But - it involves a lot of code duplication, use of conditional expressions etc. Perhaps it would be better and simpler to have a builder class which doesn't immediately set the actual copy parameters, and is more structured , i.e. something like
Then one could write something like
my_builder.start().offset = dim3{1, 2, 3}; }
The downside of this design is less one-liners (although we can always add methods to endpoint_t, and make it hold a reference to the containing copy params build, which can be returned from setter methods)