tahonermann wrote:
@KseniyaTikhomirova,
> could you please clarify how arrays of local_accessors will be treated and
> passed to special_subobjects handling function?
Each array element will be passed as a separate argument. This is necessary, in
general, when the kernel object contains an array member with an element type
that has a member that requires reification.
```c++
struct S {
sycl::local_accessor<int> la;
};
void f(sycl::queue q) {
S s[2];
q.single_task<struct KN>([=] { s[0]; s[1]; });
}
```
When the array element type is one that directly requires reification (e.g., an
array of `sycl::local_accessor`), we *could* choose to pass a reference to the
array instead of each element individually. This would reduce the number of
arguments passed, but would mean that the function objects returned by
`sycl_kernel_launch()` and `sycl_reify_kernel_parameters()` would need to be
prepared to receive both references to single objects and references to arrays.
I suspect that added complexity isn't worthwhile, but let me know if you feel
otherwise.
Arrays aren't handled in the code at the moment; that is one of the things I
need to fix yet.
https://github.com/llvm/llvm-project/pull/243349
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits