...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::local_buffer — Represents a local memory buffer on the device.
// In header: <boost/compute/memory/local_buffer.hpp> template<typename T> class local_buffer { public: // construct/copy/destruct local_buffer(const size_t); local_buffer(const local_buffer &); local_buffer & operator=(const local_buffer &); ~local_buffer(); // public member functions size_t size() const; };
The local_buffer class represents a block of local memory on a compute device.
This class is most commonly used to set local memory arguments for compute kernels:
// set argument to a local buffer with storage for 32 float's kernel.set_arg(0, local_buffer<float>(32));
See Also:
buffer, kernel
local_buffer
public
construct/copy/destructlocal_buffer(const size_t size);Creates a local buffer object for
size
elements. local_buffer(const local_buffer & other);Creates a local buffer object as a copy of
other
. local_buffer & operator=(const local_buffer & other);Copies
other
to *this
. ~local_buffer();Destroys the local memory object.