Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Class image_sampler

boost::compute::image_sampler — An OpenCL image sampler object.

Synopsis

// In header: <boost/compute/image/image_sampler.hpp>


class image_sampler {
public:

  enum addressing_mode { none = = CL_ADDRESS_NONE, 
                         clamp_to_edge = = CL_ADDRESS_CLAMP_TO_EDGE, 
                         clamp = = CL_ADDRESS_CLAMP, 
                         repeat = = CL_ADDRESS_REPEAT };

  enum filter_mode { nearest = = CL_FILTER_NEAREST, 
                     linear = = CL_FILTER_LINEAR };
  // construct/copy/destruct
  image_sampler();
  image_sampler(const context &, bool, cl_addressing_mode, cl_filter_mode);
  explicit image_sampler(cl_sampler, bool = true);
  image_sampler(const image_sampler &);
  image_sampler(image_sampler &&) noexcept;
  image_sampler & operator=(const image_sampler &);
  image_sampler & operator=(image_sampler &&) noexcept;
  ~image_sampler();

  // public member functions
  cl_sampler & get() const;
  context get_context() const;
  template<typename T> T get_info(cl_sampler_info) const;
  template<int Enum> unspecified get_info() const;
  bool operator==(const image_sampler &) const;
  bool operator!=(const image_sampler &) const;
  operator cl_sampler() const;
};

Description

See Also:

image2d, image_format

image_sampler public construct/copy/destruct

  1. image_sampler();
  2. image_sampler(const context & context, bool normalized_coords, 
                  cl_addressing_mode addressing_mode, cl_filter_mode filter_mode);
  3. explicit image_sampler(cl_sampler sampler, bool retain = true);
  4. image_sampler(const image_sampler & other);
    Creates a new image sampler object as a copy of other.
  5. image_sampler(image_sampler && other) noexcept;
  6. image_sampler & operator=(const image_sampler & other);
    Copies the image sampler object from other to *this.
  7. image_sampler & operator=(image_sampler && other) noexcept;
  8. ~image_sampler();
    Destroys the image sampler object.

image_sampler public member functions

  1. cl_sampler & get() const;
    Returns the underlying cl_sampler object.
  2. context get_context() const;
    Returns the context for the image sampler object.
  3. template<typename T> T get_info(cl_sampler_info info) const;

    Returns information about the sampler.

    See the documentation for

  4. 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.
  5. bool operator==(const image_sampler & other) const;
    Returns true if the sampler is the same at other.
  6. bool operator!=(const image_sampler & other) const;
    Returns true if the sampler is different from other.
  7. operator cl_sampler() const;

PrevUpHomeNext