DPC++ Runtime
Runtime libraries for oneAPI Data Parallel C++
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

 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
 

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)
 

Detailed Description

template<typename T, int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 46 of file buffer.hpp.

Member Typedef Documentation

◆ allocator_type

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 56 of file buffer.hpp.

◆ const_reference

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 55 of file buffer.hpp.

◆ EnableIfContiguous

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 66 of file buffer.hpp.

◆ EnableIfItInputIterator

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 70 of file buffer.hpp.

◆ EnableIfOneDimension

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 58 of file buffer.hpp.

◆ EnableIfSameNonConstIterators

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 73 of file buffer.hpp.

◆ reference

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 54 of file buffer.hpp.

◆ value_type

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 53 of file buffer.hpp.

Constructor & Destructor Documentation

◆ buffer() [1/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 75 of file buffer.hpp.

◆ buffer() [2/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 85 of file buffer.hpp.

◆ buffer() [3/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 96 of file buffer.hpp.

◆ buffer() [4/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 107 of file buffer.hpp.

◆ buffer() [5/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 120 of file buffer.hpp.

◆ buffer() [6/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 133 of file buffer.hpp.

◆ buffer() [7/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 146 of file buffer.hpp.

◆ buffer() [8/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 159 of file buffer.hpp.

◆ buffer() [9/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 172 of file buffer.hpp.

◆ buffer() [10/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 184 of file buffer.hpp.

◆ buffer() [11/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 199 of file buffer.hpp.

◆ buffer() [12/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 214 of file buffer.hpp.

◆ buffer() [13/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 229 of file buffer.hpp.

◆ buffer() [14/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 245 of file buffer.hpp.

◆ buffer() [15/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 249 of file buffer.hpp.

◆ buffer() [16/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 288 of file buffer.hpp.

◆ buffer() [17/17]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 295 of file buffer.hpp.

◆ ~buffer()

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 = cl::sycl::buffer_allocator, 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 318 of file buffer.hpp.

◆ __SYCL2020_DEPRECATED() [2/2]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 322 of file buffer.hpp.

◆ byte_size()

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 325 of file buffer.hpp.

◆ get_access() [1/4]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 345 of file buffer.hpp.

◆ get_access() [2/4]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 334 of file buffer.hpp.

◆ get_access() [3/4]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 355 of file buffer.hpp.

◆ get_access() [4/4]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 367 of file buffer.hpp.

◆ get_allocator()

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 327 of file buffer.hpp.

◆ get_property()

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 451 of file buffer.hpp.

◆ get_range()

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 316 of file buffer.hpp.

◆ has_property()

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 447 of file buffer.hpp.

◆ is_sub_buffer()

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 405 of file buffer.hpp.

◆ operator!=()

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 310 of file buffer.hpp.

◆ operator=() [1/2]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 = cl::sycl::buffer_allocator, 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 = cl::sycl::buffer_allocator, 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 308 of file buffer.hpp.

◆ reinterpret() [1/3]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 425 of file buffer.hpp.

◆ reinterpret() [2/3]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 435 of file buffer.hpp.

◆ reinterpret() [3/3]

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 409 of file buffer.hpp.

◆ set_final_data()

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 399 of file buffer.hpp.

◆ set_write_back()

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 403 of file buffer.hpp.

◆ size()

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 = cl::sycl::buffer_allocator, 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 463 of file buffer.hpp.

◆ buffer

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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 460 of file buffer.hpp.

◆ detail::make_buffer_helper

template<typename T , int dimensions = 1, typename AllocatorT = cl::sycl::buffer_allocator, 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   
)
friend

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