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 an older version of Boost and was released in 2024. The current version is 1.90.0.
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: // public member functions local_buffer(const size_t); local_buffer(const local_buffer &); local_buffer & operator=(const local_buffer &); ~local_buffer(); 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 member functionslocal_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.
size_t size() const;Returns the number of elements in the local buffer.