| Home | Libraries | People | FAQ | More

## Class pipe

boost::compute::pipe — A FIFO data pipe.

## Synopsis

    // In header: <boost/compute/pipe.hpp>

    class pipe : public boost::compute::memory_object {
    public:

      // public member functions
      pipe();
      explicit pipe(cl_mem, bool = true);
      pipe(const context &, uint_, uint_, cl_mem_flags = read_write,
           const cl_pipe_properties * = 0);
      pipe(const pipe &);
      pipe & operator=(const pipe &);
      pipe(pipe &&) noexcept;
      pipe & operator=(pipe &&) noexcept;
      ~pipe();
      uint_ packet_size() const;
      uint_ max_packets() const;
      template<typename T> T get_info(cl_pipe_info) const;
      template<int Enum> unspecified get_info() const;
    };

## Description

| Warning
This method is only available if the OpenCL version is 2.0 or later.

See Also: memory_object

### `pipe` public member functions

1.     pipe();

   Creates a null pipe object.

2.     explicit pipe(cl_mem mem, bool retain = true);

   Creates a pipe object for `mem`. If `retain` is `true`, the reference count for `mem` will be incremented.

3.     pipe(const context & context, uint_ pipe_packet_size, uint_ pipe_max_packets,
            cl_mem_flags flags = read_write,
            const cl_pipe_properties * properties = 0);

   Creates a new pipe in `context`.

4.     pipe(const pipe & other);

   Creates a new pipe object as a copy of `other`.

5.     pipe & operator=(const pipe & other);

   Copies the pipe object from `other` to `*this`.

6.     pipe(pipe && other) noexcept;

   Move-constructs a new pipe object from `other`.

7.     pipe & operator=(pipe && other) noexcept;

   Move-assigns the pipe from `other` to `*this`.

8.     ~pipe();

   Destroys the pipe object.

9.     uint_ packet_size() const;

   Returns the packet size.

10.     uint_ max_packets() const;

    Returns the max number of packets.

11.     template<typename T> T get_info(cl_pipe_info info) const;

    Returns information about the pipe.

    See the documentation for

12.     template<int Enum> unspecified get_info() const;

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.