Description

The OpenCL C programming language implements the following built-in query functions for a pipe. We use the generic type name gentype to indicate the built-in OpenCL C scalar or vector integer or floating-point data types63 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 the following table.

[63] The half scalar and vector types can only be used if the cl_khr_fp16 extension is supported and has been enabled. The double scalar and vector types can only be used if double precision is supported.

aQual in the following table refers to one of the access qualifiers. For pipe query functions this may be read_only or write_only.

Table 1. Built-in Pipe Query Functions

Function

Description

uint get_pipe_num_packets(aQual pipe gentype p)

Returns the number of available entries in the pipe. The number of available entries in a pipe is a dynamic value. The value returned should be considered immediately stale.

uint get_pipe_max_packets(aQual pipe gentype p)

Returns the maximum number of packets specified when pipe was created.

See Also

Document Notes

For more information, see the OpenCL C Specification

This page is extracted from the OpenCL C Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.