yxsamliu wrote:

Thanks for adding the docs. Since the wrapper part is a bit subtle, maybe 
something like this would make it clearer:

A named barrier wrapper is a class or struct that contains exactly one field, 
and that field is either `__amdgpu_named_workgroup_barrier_t` or another named 
barrier wrapper. This lets users add helper methods around a single named 
barrier object.

A C++ class that derives from a named barrier wrapper is also treated as a 
named barrier wrapper. Named barrier wrappers must be standard-layout types and 
must not contain any extra fields. In practice, this means the wrapper cannot 
have virtual functions, virtual base classes, or extra data fields.

Also, `std:;is_standard_layout` should be `std::is_standard_layout`, and the 
heading should probably be `Named Workgroup Barrier Type`.

https://github.com/llvm/llvm-project/pull/207687
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to