cl::sycl::buffer< const T, dims, AllocatorT > Class Template Reference
Specialization for const buffers, that allows the creation of buffers on the device from const data. More...
#include <buffer.h>
Public Types | |
using | value_type = T |
Helper for the user, alias for type T. More... | |
using | reference = T & |
Helper for the user, alias for reference to type T. More... | |
using | const_reference = const T & |
Helper for the user, alias for const reference to type T. More... | |
using | allocator_type = AllocatorT |
Helper for the user, alias for the type of the allocator. More... | |
Public Member Functions | |
buffer (const T *hostPointer, const range< dims > &r, const property_list &propList={}) | |
Constructs a buffer with host pointer. More... | |
buffer (const T *hostPointer, const range< dims > &r, AllocatorT allocator, const property_list &propList={}) | |
Constructs a buffer with host pointer. More... | |
buffer (const shared_ptr_class< const T > &hostPointer, const range< dims > &r, const property_list &propList={}) | |
Constructs a buffer with a host pointer. More... | |
buffer (const shared_ptr_class< const T > &hostPointer, const range< dims > &r, AllocatorT allocator, const property_list &propList={}) | |
Constructs a buffer with a host pointer. More... | |
buffer () | |
Default-constructs a buffer. More... | |
~buffer () override=default | |
template<access::mode accessMode> | |
COMPUTECPP_SET_IGNORE_DEPRECATED_API accessor< const T, dims, accessMode, access::target::host_buffer > | get_access () |
this function returns an accessor to the buffer, this is only used on the host side More... | |
template<access::mode accessMode, access::target accessTarget = COMPUTECPP_ACCESS_TARGET_DEVICE> | |
accessor< const T, dims, accessMode, accessTarget > | get_access (handler &cgh) |
this function returns an accessor to the buffer in the given command_group scope. More... | |
template<access::mode accessMode, access::target accessTarget = COMPUTECPP_ACCESS_TARGET_DEVICE> | |
COMPUTECPP_DEPRECATED_BY_SYCL_VER (201703, "Use overload where the range comes before the offset.") accessor< const T | |
this function returns an accessor to the buffer in the given command_group scope. More... | |
accessTarget | get_access (handler &cgh, id< dims > offset, range< dims > range) |
template<access::mode accessMode, access::target accessTarget = COMPUTECPP_ACCESS_TARGET_DEVICE> | |
accessor< const T, dims, accessMode, accessTarget > | get_access (handler &cgh, range< dims > range, id< dims > offset={}) |
Returns an accessor to the buffer in the given command group scope. More... | |
template<access::mode accessMode> | |
COMPUTECPP_SET_IGNORE_DEPRECATED_API | COMPUTECPP_DEPRECATED_BY_SYCL_VER (201703, "Use overload where the range comes before the offset.") accessor< T |
Returns an accessor to the buffer, only used on the host side. More... | |
COMPUTECPP_SET_IGNORE_DEPRECATED_API access::target::host_buffer | get_access (id< dims > offset, range< dims > range) |
template<access::mode accessMode> | |
COMPUTECPP_SET_IGNORE_DEPRECATED_API accessor< T, dims, accessMode, access::target::host_buffer > | get_access (range< dims > range, id< dims > offset={}) |
Returns an accessor to the buffer, only used on the host side. More... | |
buffer (dmem_shptr impl) | |
cl::sycl::range< dims > | get_range () const |
Retrieves the range of the buffer. More... | |
template<typename propertyT > | |
bool | has_property () const |
Returns whether this SYCL buffer was constructed with the property specified by propertyT. More... | |
template<typename propertyT > | |
propertyT | get_property () const |
Returns a copy of the property of type propertyT that this SYCL buffer was constructed with. More... | |
AllocatorT | get_allocator () const |
Returns the allocator provided to the buffer. More... | |
template<typename ReinterpretT , int ReinterpretDim> | |
buffer< ReinterpretT, ReinterpretDim, AllocatorT > | reinterpret (range< ReinterpretDim > reinterpretRange) const |
Creates and returns a reinterpreted SYCL buffer. More... | |
template<typename ReinterpretT , int ReinterpretDim = dims> | |
buffer< ReinterpretT, ReinterpretDim, AllocatorT > | reinterpret () const |
Creates and returns a reinterpreted SYCL buffer. More... | |
Public Attributes | |
dims | |
accessMode | |
COMPUTECPP_SET_IGNORE_DEPRECATED_API | dims |
COMPUTECPP_SET_IGNORE_DEPRECATED_API | accessMode |
Static Public Attributes | |
static constexpr const auto | dimensions = dims |
Number of buffer dimensions (Codeplay extension) More... | |
Detailed Description
template<typename T, int dims, typename AllocatorT>
class cl::sycl::buffer< const T, dims, AllocatorT >
Specialization for const buffers, that allows the creation of buffers on the device from const data.
Any allocator, but the map allocator, can be used to create host data. The allocator must remove the constness of the data in order to create temporary objects, but host accessors will only be read only always.
Member Typedef Documentation
◆ allocator_type
using cl::sycl::buffer< const T, dims, AllocatorT >::allocator_type = AllocatorT |
◆ const_reference
using cl::sycl::buffer< const T, dims, AllocatorT >::const_reference = const T& |
◆ reference
using cl::sycl::buffer< const T, dims, AllocatorT >::reference = T& |
◆ value_type
using cl::sycl::buffer< const T, dims, AllocatorT >::value_type = T |
Constructor & Destructor Documentation
◆ buffer() [1/6]
|
inline |
◆ buffer() [2/6]
|
inline |
◆ buffer() [3/6]
|
inline |
◆ buffer() [4/6]
|
inline |
◆ buffer() [5/6]
|
inline |
◆ ~buffer()
|
overridedefault |
◆ buffer() [6/6]
|
inlineexplicit |
Member Function Documentation
◆ COMPUTECPP_DEPRECATED_BY_SYCL_VER() [1/2]
cl::sycl::buffer< const T, dims, AllocatorT >::COMPUTECPP_DEPRECATED_BY_SYCL_VER | ( | 201703 | , |
"Use overload where the range comes before the offset." | |||
) | const |
this function returns an accessor to the buffer in the given command_group scope.
- Template Parameters
-
accessMode all access::mode values are accepted accessTarget defaults to global_buffer, can accept global_buffer or constant_buffer
- Parameters
-
cgh Reference to the command group scope where the accessor is requested. offset the offset that the accessor will be able to update from. range the range in which the accessor will be updating the data.
- Returns
- Device accessor
- Deprecated:
- Need to reverse the order of the access offset and range, see 4.7.2.1 Buffer Interface in SYCL 1.2.1
◆ COMPUTECPP_DEPRECATED_BY_SYCL_VER() [2/2]
COMPUTECPP_SET_IGNORE_DEPRECATED_API cl::sycl::buffer< const T, dims, AllocatorT >::COMPUTECPP_DEPRECATED_BY_SYCL_VER | ( | 201703 | , |
"Use overload where the range comes before the offset." | |||
) |
Returns an accessor to the buffer, only used on the host side.
- Template Parameters
-
accessMode All access::mode values are accepted
- Parameters
-
offset the offset that the accessor will be able to update from. range the range in which the accessor will be updating the data.
- Returns
- Device accessor
- Deprecated:
- Need to reverse the order of the access offset and range, see 4.7.2.1 Buffer Interface in SYCL 1.2.1
◆ get_access() [1/6]
|
inline |
this function returns an accessor to the buffer, this is only used on the host side
- Template Parameters
-
accessMode all access::mode values are accepted
- Returns
- Host accessor
◆ get_access() [2/6]
|
inline |
this function returns an accessor to the buffer in the given command_group scope.
- Template Parameters
-
accessMode all access::mode values are accepted accessTarget defaults to global_buffer, can accept global_buffer or constant_buffer
- Parameters
-
cgh Reference to the command group scope where the accessor is requested.
- Returns
- Device accessor
◆ get_access() [3/6]
◆ get_access() [4/6]
|
inline |
Returns an accessor to the buffer in the given command group scope.
- Template Parameters
-
accessMode All access::mode values are accepted accessTarget Defaults to global_buffer, can accept global_buffer or constant_buffer
- Parameters
-
cgh Reference to the command group scope where the accessor is requested range The range in which the accessor will be updating the data offset The offset that the accessor will be able to update from
- Returns
- Device accessor
◆ get_access() [5/6]
|
inline |
◆ get_access() [6/6]
|
inline |
Returns an accessor to the buffer, only used on the host side.
- Template Parameters
-
accessMode All access::mode values are accepted
- Parameters
-
range the range in which the accessor will be updating the data offset the offset that the accessor will be able to update from
- Returns
- Host accessor
◆ get_allocator()
|
inline |
◆ get_property()
|
inline |
◆ get_range()
|
inline |
◆ has_property()
|
inline |
◆ reinterpret() [1/2]
|
inline |
Creates and returns a reinterpreted SYCL buffer.
- Template Parameters
-
ReinterpretT New underlying type ReinterpretDim New buffer dimension
- Parameters
-
reinterpretRange New buffer range
- Returns
- Reinterpreted buffer with the requested parameters
- Exceptions
-
invalid_object_error if the size of the reinterpreted buffer and the size of the original buffer do not match
◆ reinterpret() [2/2]
|
inline |
Creates and returns a reinterpreted SYCL buffer.
- Template Parameters
-
ReinterpretT New underlying type ReinterpretDim New buffer dimension
- Returns
- Reinterpreted buffer with the requested parameters
- Exceptions
-
invalid_object_error if the size of the reinterpreted buffer and the size of the original buffer do not match
Member Data Documentation
◆ accessMode [1/2]
cl::sycl::buffer< const T, dims, AllocatorT >::accessMode |
◆ accessMode [2/2]
COMPUTECPP_SET_IGNORE_DEPRECATED_API cl::sycl::buffer< const T, dims, AllocatorT >::accessMode |
◆ dimensions
|
static |
◆ dims [1/2]
cl::sycl::buffer< const T, dims, AllocatorT >::dims |
◆ dims [2/2]
COMPUTECPP_SET_IGNORE_DEPRECATED_API cl::sycl::buffer< const T, dims, AllocatorT >::dims |
The documentation for this class was generated from the following file: