reserve_id_t sub_group_reserve_read_pipe
(
| pipe gentype pipe, |
uint num_packets) |
Reserve num_packets
entries for reading from
pipe
. Returns a valid non-zero
reservation ID if the reservation is successful and 0 otherwise.
The reserved pipe entries are referred to by indices
that go from 0 ... num_packets
– 1.
This built-in functions must be encountered by all work-items in a sub-group executing the kernel with the same argument values; otherwise the behavior is undefined. We use the generic type name gentype to indicate the built-in OpenCL C scalar or vector integer or floating-point data types or any user defined type built from these scalar and vector data types can be used as the type for the arguments to the pipe functions listed in table 6.29.
The half scalar and vector types can only be used if the cl_khr_fp16 extension is supported. The double scalar and vector types can only be used if double precision is supported.
Reservations made by a sub-group are ordered in the pipe as they are ordered in the program. Reservations made by different sub-groups that belong to the same work-group can be ordered using sub-group synchronization. The order of sub-group based reservations that belong to different work-groups is implementation defined.