DPC++ Runtime
Runtime libraries for oneAPI DPC++
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled > Class Template Reference

Defines a shared array that can be used by kernels in queues. More...

#include <CL/sycl/buffer.hpp>

Public Types

using value_type = T
 
using reference = value_type &
 
using const_reference = const value_type &
 
using allocator_type = AllocatorT
 
template<int dims>
using EnableIfOneDimension = typename detail::enable_if_t< 1==dims >
 
template<class Container >
using EnableIfContiguous = detail::void_t< detail::enable_if_t< std::is_convertible< detail::remove_pointer_t< decltype(std::declval< Container >().data())>(*)[], const T(*)[]>::value >, decltype(std::declval< Container >().size())>
 
template<class It >
using EnableIfItInputIterator = detail::enable_if_t< std::is_convertible< typename std::iterator_traits< It >::iterator_category, std::input_iterator_tag >::value >
 
template<typename ItA , typename ItB >
using EnableIfSameNonConstIterators = typename detail::enable_if_t< std::is_same< ItA, ItB >::value &&!std::is_const< ItA >::value, ItA >
 

Public Member Functions

std::array< size_t, 3 > rangeToArray (range< 3 > &r)
 
std::array< size_t, 3 > rangeToArray (range< 2 > &r)
 
std::array< size_t, 3 > rangeToArray (range< 1 > &r)
 
 buffer (const range< dimensions > &bufferRange, const property_list &propList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 buffer (const range< dimensions > &bufferRange, AllocatorT allocator, const property_list &propList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 buffer (T *hostData, const range< dimensions > &bufferRange, const property_list &propList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 buffer (T *hostData, const range< dimensions > &bufferRange, AllocatorT allocator, const property_list &propList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
template<typename _T = T>
 buffer (EnableIfSameNonConstIterators< T, _T > const *hostData, const range< dimensions > &bufferRange, const property_list &propList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
template<typename _T = T>
 buffer (EnableIfSameNonConstIterators< T, _T > const *hostData, const range< dimensions > &bufferRange, AllocatorT allocator, const property_list &propList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 buffer (const std::shared_ptr< T > &hostData, const range< dimensions > &bufferRange, AllocatorT allocator, const property_list &propList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 buffer (const std::shared_ptr< T[]> &hostData, const range< dimensions > &bufferRange, AllocatorT allocator, const property_list &propList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 buffer (const std::shared_ptr< T > &hostData, const range< dimensions > &bufferRange, const property_list &propList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 buffer (const std::shared_ptr< T[]> &hostData, const range< dimensions > &bufferRange, const property_list &propList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
template<class InputIterator , int N = dimensions, typename = EnableIfOneDimension<N>, typename = EnableIfItInputIterator<InputIterator>>
 buffer (InputIterator first, InputIterator last, AllocatorT allocator, const property_list &propList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
template<class InputIterator , int N = dimensions, typename = EnableIfOneDimension<N>, typename = EnableIfItInputIterator<InputIterator>>
 buffer (InputIterator first, InputIterator last, const property_list &propList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
template<class Container , int N = dimensions, typename = EnableIfOneDimension<N>, typename = EnableIfContiguous<Container>>
 buffer (Container &container, AllocatorT allocator, const property_list &propList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
template<class Container , int N = dimensions, typename = EnableIfOneDimension<N>, typename = EnableIfContiguous<Container>>
 buffer (Container &container, const property_list &propList={}, const detail::code_location CodeLoc=detail::code_location::current())
 
 buffer (buffer< T, dimensions, AllocatorT > &b, const id< dimensions > &baseIndex, const range< dimensions > &subRange, const detail::code_location CodeLoc=detail::code_location::current())
 
 buffer (const buffer &rhs, const detail::code_location CodeLoc=detail::code_location::current())
 
 buffer (buffer &&rhs, const detail::code_location CodeLoc=detail::code_location::current())
 
bufferoperator= (const buffer &rhs)=default
 
bufferoperator= (buffer &&rhs)=default
 
 ~buffer ()=default
 
bool operator== (const buffer &rhs) const
 
bool operator!= (const buffer &rhs) const
 
range< dimensions > get_range () const
 
 __SYCL2020_DEPRECATED ("get_count() is deprecated, please use size() instead") size_t get_count() const
 
size_t size () const noexcept
 
 __SYCL2020_DEPRECATED ("get_size() is deprecated, please use byte_size() instead") size_t get_size() const
 
size_t byte_size () const noexcept
 
AllocatorT get_allocator () const
 
template<access::mode Mode, access::target Target = access::target::device>
accessor< T, dimensions, Mode, Target, access::placeholder::false_t, ext::oneapi::accessor_property_list<> > get_access (handler &CommandGroupHandler, const detail::code_location CodeLoc=detail::code_location::current())
 
template<access::mode mode>
accessor< T, dimensions, mode, access::target::host_buffer, access::placeholder::false_t, ext::oneapi::accessor_property_list<> > get_access (const detail::code_location CodeLoc=detail::code_location::current())
 
template<access::mode mode, access::target target = access::target::device>
accessor< T, dimensions, mode, target, access::placeholder::false_t, ext::oneapi::accessor_property_list<> > get_access (handler &commandGroupHandler, range< dimensions > accessRange, id< dimensions > accessOffset={}, const detail::code_location CodeLoc=detail::code_location::current())
 
template<access::mode mode>
accessor< T, dimensions, mode, access::target::host_buffer, access::placeholder::false_t, ext::oneapi::accessor_property_list<> > get_access (range< dimensions > accessRange, id< dimensions > accessOffset={}, const detail::code_location CodeLoc=detail::code_location::current())
 
template<typename Destination = std::nullptr_t>
void set_final_data (Destination finalData=nullptr)
 
void set_write_back (bool flag=true)
 
bool is_sub_buffer () const
 
template<typename ReinterpretT , int ReinterpretDim>
buffer< ReinterpretT, ReinterpretDim, AllocatorT > reinterpret (range< ReinterpretDim > reinterpretRange) const
 
template<typename ReinterpretT , int ReinterpretDim = dimensions>
std::enable_if<(sizeof(ReinterpretT)==sizeof(T)) &&(dimensions==ReinterpretDim), buffer< ReinterpretT, ReinterpretDim, AllocatorT > >::type reinterpret () const
 
template<typename ReinterpretT , int ReinterpretDim = dimensions>
std::enable_if<(ReinterpretDim==1) &&((dimensions !=ReinterpretDim)||(sizeof(ReinterpretT) !=sizeof(T))), buffer< ReinterpretT, ReinterpretDim, AllocatorT > >::type reinterpret () const
 
template<typename propertyT >
bool has_property () const
 
template<typename propertyT >
propertyT get_property () const
 

Protected Member Functions

bool isOutOfBounds (const id< dimensions > &offset, const range< dimensions > &newRange, const range< dimensions > &parentRange)
 

Friends

template<typename A , int dims, typename C , typename Enable >
class buffer
 
template<typename DataT , int dims, access::mode mode, access::target target, access::placeholder isPlaceholder, typename PropertyListT >
class accessor
 
template<typename HT , int HDims, typename HAllocT >
buffer< HT, HDims, HAllocT, void > detail::make_buffer_helper (pi_native_handle, const context &, event, bool)
 
template<backend BackendName, typename DataT , int Dimensions, typename Allocator >
auto detail::get_native_buffer (const buffer< DataT, Dimensions, Allocator, void > &Obj) -> backend_return_t< BackendName, buffer< DataT, Dimensions, Allocator, void >>
 

Detailed Description

template<typename T, int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
class cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >

Defines a shared array that can be used by kernels in queues.

Buffers can be 1-, 2-, and 3-dimensional. They have to be accessed using accessor classes.

See also
Accessors

Definition at line 78 of file buffer.hpp.

Member Typedef Documentation

◆ allocator_type

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
using cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::allocator_type = AllocatorT

Definition at line 88 of file buffer.hpp.

◆ const_reference

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
using cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::const_reference = const value_type &

Definition at line 87 of file buffer.hpp.

◆ EnableIfContiguous

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<class Container >
using cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::EnableIfContiguous = detail::void_t<detail::enable_if_t<std::is_convertible< detail::remove_pointer_t< decltype(std::declval<Container>().data())> (*)[], const T (*)[]>::value>, decltype(std::declval<Container>().size())>

Definition at line 98 of file buffer.hpp.

◆ EnableIfItInputIterator

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<class It >
using cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::EnableIfItInputIterator = detail::enable_if_t< std::is_convertible<typename std::iterator_traits<It>::iterator_category, std::input_iterator_tag>::value>

Definition at line 102 of file buffer.hpp.

◆ EnableIfOneDimension

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<int dims>
using cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::EnableIfOneDimension = typename detail::enable_if_t<1 == dims>

Definition at line 90 of file buffer.hpp.

◆ EnableIfSameNonConstIterators

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename ItA , typename ItB >
using cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::EnableIfSameNonConstIterators = typename detail::enable_if_t< std::is_same<ItA, ItB>::value && !std::is_const<ItA>::value, ItA>

Definition at line 105 of file buffer.hpp.

◆ reference

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
using cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::reference = value_type &

Definition at line 86 of file buffer.hpp.

◆ value_type

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
using cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::value_type = T

Definition at line 85 of file buffer.hpp.

Constructor & Destructor Documentation

◆ buffer() [1/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( const range< dimensions > &  bufferRange,
const property_list propList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 113 of file buffer.hpp.

◆ buffer() [2/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( const range< dimensions > &  bufferRange,
AllocatorT  allocator,
const property_list propList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 125 of file buffer.hpp.

◆ buffer() [3/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( T hostData,
const range< dimensions > &  bufferRange,
const property_list propList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 138 of file buffer.hpp.

◆ buffer() [4/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( T hostData,
const range< dimensions > &  bufferRange,
AllocatorT  allocator,
const property_list propList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 151 of file buffer.hpp.

◆ buffer() [5/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename _T = T>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( EnableIfSameNonConstIterators< T, _T > const *  hostData,
const range< dimensions > &  bufferRange,
const property_list propList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 166 of file buffer.hpp.

◆ buffer() [6/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename _T = T>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( EnableIfSameNonConstIterators< T, _T > const *  hostData,
const range< dimensions > &  bufferRange,
AllocatorT  allocator,
const property_list propList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 181 of file buffer.hpp.

◆ buffer() [7/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( const std::shared_ptr< T > &  hostData,
const range< dimensions > &  bufferRange,
AllocatorT  allocator,
const property_list propList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 196 of file buffer.hpp.

◆ buffer() [8/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( const std::shared_ptr< T[]> &  hostData,
const range< dimensions > &  bufferRange,
AllocatorT  allocator,
const property_list propList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 212 of file buffer.hpp.

◆ buffer() [9/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( const std::shared_ptr< T > &  hostData,
const range< dimensions > &  bufferRange,
const property_list propList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 228 of file buffer.hpp.

◆ buffer() [10/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( const std::shared_ptr< T[]> &  hostData,
const range< dimensions > &  bufferRange,
const property_list propList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 243 of file buffer.hpp.

◆ buffer() [11/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<class InputIterator , int N = dimensions, typename = EnableIfOneDimension<N>, typename = EnableIfItInputIterator<InputIterator>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( InputIterator  first,
InputIterator  last,
AllocatorT  allocator,
const property_list propList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 261 of file buffer.hpp.

◆ buffer() [12/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<class InputIterator , int N = dimensions, typename = EnableIfOneDimension<N>, typename = EnableIfItInputIterator<InputIterator>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( InputIterator  first,
InputIterator  last,
const property_list propList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 279 of file buffer.hpp.

◆ buffer() [13/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<class Container , int N = dimensions, typename = EnableIfOneDimension<N>, typename = EnableIfContiguous<Container>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( Container &  container,
AllocatorT  allocator,
const property_list propList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 297 of file buffer.hpp.

◆ buffer() [14/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<class Container , int N = dimensions, typename = EnableIfOneDimension<N>, typename = EnableIfContiguous<Container>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( Container &  container,
const property_list propList = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 316 of file buffer.hpp.

◆ buffer() [15/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( buffer< T, dimensions, AllocatorT > &  b,
const id< dimensions > &  baseIndex,
const range< dimensions > &  subRange,
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 320 of file buffer.hpp.

◆ buffer() [16/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( const buffer< T, dimensions, AllocatorT, __Enabled > &  rhs,
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 361 of file buffer.hpp.

◆ buffer() [17/17]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::buffer ( buffer< T, dimensions, AllocatorT, __Enabled > &&  rhs,
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 370 of file buffer.hpp.

◆ ~buffer()

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::~buffer ( )
default

Member Function Documentation

◆ __SYCL2020_DEPRECATED() [1/2]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::__SYCL2020_DEPRECATED ( "get_count() is  deprecated,
please use size() instead  
) const
inline

Definition at line 395 of file buffer.hpp.

◆ __SYCL2020_DEPRECATED() [2/2]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::__SYCL2020_DEPRECATED ( "get_size() is  deprecated,
please use byte_size() instead  
) const
inline

Definition at line 399 of file buffer.hpp.

◆ byte_size()

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
size_t cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::byte_size ( ) const
inlinenoexcept

Definition at line 402 of file buffer.hpp.

◆ get_access() [1/4]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<access::mode mode>
accessor<T, dimensions, mode, access::target::host_buffer, access::placeholder::false_t, ext::oneapi::accessor_property_list<> > cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::get_access ( const detail::code_location  CodeLoc = detail::code_location::current())
inline

Definition at line 422 of file buffer.hpp.

◆ get_access() [2/4]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<access::mode Mode, access::target Target = access::target::device>
accessor<T, dimensions, Mode, Target, access::placeholder::false_t, ext::oneapi::accessor_property_list<> > cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::get_access ( handler CommandGroupHandler,
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 411 of file buffer.hpp.

◆ get_access() [3/4]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<access::mode mode, access::target target = access::target::device>
accessor<T, dimensions, mode, target, access::placeholder::false_t, ext::oneapi::accessor_property_list<> > cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::get_access ( handler commandGroupHandler,
range< dimensions >  accessRange,
id< dimensions >  accessOffset = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 432 of file buffer.hpp.

◆ get_access() [4/4]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<access::mode mode>
accessor<T, dimensions, mode, access::target::host_buffer, access::placeholder::false_t, ext::oneapi::accessor_property_list<> > cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::get_access ( range< dimensions >  accessRange,
id< dimensions >  accessOffset = {},
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

Definition at line 449 of file buffer.hpp.

◆ get_allocator()

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
AllocatorT cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::get_allocator ( ) const
inline

Definition at line 404 of file buffer.hpp.

◆ get_property()

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename propertyT >
propertyT cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::get_property ( ) const
inline

Definition at line 538 of file buffer.hpp.

◆ get_range()

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
range<dimensions> cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::get_range ( ) const
inline

Definition at line 393 of file buffer.hpp.

◆ has_property()

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename propertyT >
bool cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::has_property ( ) const
inline

Definition at line 534 of file buffer.hpp.

◆ is_sub_buffer()

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
bool cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::is_sub_buffer ( ) const
inline

Definition at line 492 of file buffer.hpp.

◆ isOutOfBounds()

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
bool cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::isOutOfBounds ( const id< dimensions > &  offset,
const range< dimensions > &  newRange,
const range< dimensions > &  parentRange 
)
inlineprotected

Definition at line 543 of file buffer.hpp.

◆ operator!=()

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
bool cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::operator!= ( const buffer< T, dimensions, AllocatorT, __Enabled > &  rhs) const
inline

Definition at line 387 of file buffer.hpp.

◆ operator=() [1/2]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
buffer& cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::operator= ( buffer< T, dimensions, AllocatorT, __Enabled > &&  rhs)
default

◆ operator=() [2/2]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
buffer& cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::operator= ( const buffer< T, dimensions, AllocatorT, __Enabled > &  rhs)
default

◆ operator==()

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
bool cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::operator== ( const buffer< T, dimensions, AllocatorT, __Enabled > &  rhs) const
inline

Definition at line 385 of file buffer.hpp.

◆ rangeToArray() [1/3]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
std::array<size_t, 3> cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::rangeToArray ( range< 1 > &  r)
inline

Definition at line 111 of file buffer.hpp.

◆ rangeToArray() [2/3]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
std::array<size_t, 3> cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::rangeToArray ( range< 2 > &  r)
inline

Definition at line 109 of file buffer.hpp.

◆ rangeToArray() [3/3]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
std::array<size_t, 3> cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::rangeToArray ( range< 3 > &  r)
inline

Definition at line 107 of file buffer.hpp.

◆ reinterpret() [1/3]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename ReinterpretT , int ReinterpretDim = dimensions>
std::enable_if< (sizeof(ReinterpretT) == sizeof(T)) && (dimensions == ReinterpretDim), buffer<ReinterpretT, ReinterpretDim, AllocatorT> >::type cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::reinterpret ( ) const
inline

Definition at line 512 of file buffer.hpp.

◆ reinterpret() [2/3]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename ReinterpretT , int ReinterpretDim = dimensions>
std::enable_if< (ReinterpretDim == 1) && ((dimensions != ReinterpretDim) || (sizeof(ReinterpretT) != sizeof(T))), buffer<ReinterpretT, ReinterpretDim, AllocatorT> >::type cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::reinterpret ( ) const
inline

Definition at line 522 of file buffer.hpp.

◆ reinterpret() [3/3]

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename ReinterpretT , int ReinterpretDim>
buffer<ReinterpretT, ReinterpretDim, AllocatorT> cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::reinterpret ( range< ReinterpretDim >  reinterpretRange) const
inline

Definition at line 496 of file buffer.hpp.

◆ set_final_data()

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename Destination = std::nullptr_t>
void cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::set_final_data ( Destination  finalData = nullptr)
inline

Definition at line 486 of file buffer.hpp.

◆ set_write_back()

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
void cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::set_write_back ( bool  flag = true)
inline

Definition at line 490 of file buffer.hpp.

◆ size()

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
size_t cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::size ( ) const
inlinenoexcept

Friends And Related Function Documentation

◆ accessor

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename DataT , int dims, access::mode mode, access::target target, access::placeholder isPlaceholder, typename PropertyListT >
friend class accessor
friend

Definition at line 561 of file buffer.hpp.

◆ buffer

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename A , int dims, typename C , typename Enable >
friend class buffer
friend

Definition at line 558 of file buffer.hpp.

◆ detail::get_native_buffer

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<backend BackendName, typename DataT , int Dimensions, typename Allocator >
auto detail::get_native_buffer ( const buffer< DataT, Dimensions, Allocator, void > &  Obj) -> backend_return_t< BackendName, buffer< DataT, Dimensions, Allocator, void >>
friend

◆ detail::make_buffer_helper

template<typename T , int dimensions = 1, typename AllocatorT = detail::default_buffer_allocator<T>, typename __Enabled = typename detail::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename HT , int HDims, typename HAllocT >
buffer<HT, HDims, HAllocT, void> detail::make_buffer_helper ( pi_native_handle  ,
const context ,
event  ,
bool   
)
friend

The documentation for this class was generated from the following file: