...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::compute::image_sampler — An OpenCL image sampler object.
// 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; };
See Also:
image_sampler
public
construct/copy/destructimage_sampler();
image_sampler(const context & context, bool normalized_coords, cl_addressing_mode addressing_mode, cl_filter_mode filter_mode);
explicit image_sampler(cl_sampler sampler, bool retain = true);
image_sampler(const image_sampler & other);Creates a new image sampler object as a copy of
other
. image_sampler(image_sampler && other) noexcept;
image_sampler & operator=(const image_sampler & other);Copies the image sampler object from
other
to *this
. image_sampler & operator=(image_sampler && other) noexcept;
~image_sampler();Destroys the image sampler object.
image_sampler
public member functionscl_sampler & get() const;Returns the underlying
cl_sampler
object. context get_context() const;Returns the context for the image sampler object.
template<typename T> T get_info(cl_sampler_info info) const;
Returns information about the sampler.
See the documentation for
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.
bool operator==(const image_sampler & other) const;Returns
true
if the sampler is the same at other
. bool operator!=(const image_sampler & other) const;Returns
true
if the sampler is different from other
. operator cl_sampler() const;