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

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

#include <sycl/buffer.hpp>

Inheritance diagram for sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >:
Collaboration diagram for sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >:

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 std::enable_if_t< 1==dims >
 
template<class Container >
using EnableIfContiguous = std::void_t< std::enable_if_t< std::is_convertible_v< detail::remove_pointer_t< decltype(std::declval< Container >().data())>(*)[], const T(*)[]> >, decltype(std::declval< Container >().size())>
 
template<class It >
using EnableIfItInputIterator = std::enable_if_t< std::is_convertible_v< typename std::iterator_traits< It >::iterator_category, std::input_iterator_tag > >
 
template<typename ItA , typename ItB >
using EnableIfSameNonConstIterators = typename std::enable_if_t< std::is_same_v< ItA, ItB > &&!std::is_const_v< ItA >, 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 ()
 
bool operator== (const buffer &rhs) const
 
bool operator!= (const buffer &rhs) const
 
range< dimensionsget_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>
 __SYCL2020_DEPRECATED ("get_access for host_accessor is deprecated, please " "use get_host_access instead") accessor< 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>
 __SYCL2020_DEPRECATED ("get_access for host_accessor is deprecated, please " "use get_host_access instead") accessor< 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... Ts>
auto get_access (Ts... args)
 
template<typename... Ts>
auto get_access (handler &commandGroupHandler, Ts... args)
 
template<typename... Ts>
auto get_host_access (Ts... args)
 
template<typename... Ts>
auto get_host_access (handler &commandGroupHandler, Ts... args)
 
template<typename Destination = std::nullptr_t>
void set_final_data (Destination finalData=nullptr)
 
void set_final_data_internal (std::nullptr_t)
 
template<template< typename WeakT > class WeakPtrT, typename WeakT >
std::enable_if_t< std::is_convertible_v< WeakPtrT< WeakT >, std::weak_ptr< WeakT > > > set_final_data_internal (WeakPtrT< WeakT > FinalData)
 
template<typename WeakT >
void set_final_data_internal (std::weak_ptr< WeakT > FinalData)
 
template<typename Destination >
detail::EnableIfOutputPointerT< Destination > set_final_data_internal (Destination FinalData)
 
template<typename Destination >
detail::EnableIfOutputIteratorT< Destination > set_final_data_internal (Destination FinalData)
 
void set_final_data (std::nullptr_t)
 
void set_write_back (bool flag=true)
 
bool is_sub_buffer () const
 
template<typename ReinterpretT , int ReinterpretDim>
buffer< ReinterpretT, ReinterpretDim, typename std::allocator_traits< AllocatorT >::template rebind_alloc< std::remove_const_t< ReinterpretT > > > reinterpret (range< ReinterpretDim > reinterpretRange) const
 
template<typename ReinterpretT , int ReinterpretDim = dimensions>
std::enable_if_t<(sizeof(ReinterpretT)==sizeof(T)) &&(dimensions==ReinterpretDim), buffer< ReinterpretT, ReinterpretDim, typename std::allocator_traits< AllocatorT >::template rebind_alloc< std::remove_const_t< ReinterpretT > > > > reinterpret () const
 
template<typename ReinterpretT , int ReinterpretDim = dimensions>
std::enable_if_t<(ReinterpretDim==1) &&((dimensions !=ReinterpretDim)||(sizeof(ReinterpretT) !=sizeof(T))), buffer< ReinterpretT, ReinterpretDim, AllocatorT > > reinterpret () const
 
template<typename propertyT >
bool has_property () const noexcept
 
template<typename propertyT >
propertyT get_property () const
 

Public Attributes

 dimensions
 
 mode
 

Protected Member Functions

bool isOutOfBounds (const id< dimensions > &offset, const range< dimensions > &newRange, const range< dimensions > &parentRange)
 
- Protected Member Functions inherited from sycl::_V1::detail::buffer_plain
 buffer_plain (size_t SizeInBytes, size_t, const property_list &Props, std::unique_ptr< detail::SYCLMemObjAllocator > Allocator)
 
 buffer_plain (void *HostData, size_t SizeInBytes, size_t RequiredAlign, const property_list &Props, std::unique_ptr< detail::SYCLMemObjAllocator > Allocator)
 
 buffer_plain (const void *HostData, size_t SizeInBytes, size_t RequiredAlign, const property_list &Props, std::unique_ptr< detail::SYCLMemObjAllocator > Allocator)
 
 buffer_plain (const std::shared_ptr< const void > &HostData, const size_t SizeInBytes, size_t RequiredAlign, const property_list &Props, std::unique_ptr< detail::SYCLMemObjAllocator > Allocator, bool IsConstPtr)
 
 buffer_plain (const std::function< void(void *)> &CopyFromInput, const size_t SizeInBytes, size_t RequiredAlign, const property_list &Props, std::unique_ptr< detail::SYCLMemObjAllocator > Allocator, bool IsConstPtr)
 
 buffer_plain (pi_native_handle MemObject, context SyclContext, std::unique_ptr< detail::SYCLMemObjAllocator > Allocator, bool OwnNativeHandle, event AvailableEvent)
 
 buffer_plain (const std::shared_ptr< detail::buffer_impl > &impl)
 
void set_final_data_internal ()
 
void set_final_data_internal (const std::function< void(const std::function< void(void *const Ptr)> &)> &FinalDataFunc)
 
void set_write_back (bool NeedWriteBack)
 
void constructorNotification (const detail::code_location &CodeLoc, void *UserObj, const void *HostObj, const void *Type, uint32_t Dim, uint32_t ElemType, size_t Range[3])
 
template<typename propertyT >
bool has_property () const noexcept
 
template<typename propertyT >
propertyT get_property () const
 
std::vector< pi_native_handlegetNativeVector (backend BackendName) const
 
const std::unique_ptr< SYCLMemObjAllocator > & get_allocator_internal () const
 
void deleteAccProps (const sycl::detail::PropWithDataKind &Kind)
 
void addOrReplaceAccessorProperties (const property_list &PropertyList)
 
size_t getSize () const
 
void handleRelease () 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 SYCLObjT >
class ext::oneapi::weak_object
 
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 >>
 

Additional Inherited Members

- Protected Attributes inherited from sycl::_V1::detail::buffer_plain
std::shared_ptr< detail::buffer_implimpl
 

Detailed Description

template<typename T, int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
class sycl::_V1::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 167 of file buffer.hpp.

Member Typedef Documentation

◆ allocator_type

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
using sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::allocator_type = AllocatorT

Definition at line 176 of file buffer.hpp.

◆ const_reference

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
using sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::const_reference = const value_type &

Definition at line 175 of file buffer.hpp.

◆ EnableIfContiguous

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

Definition at line 181 of file buffer.hpp.

◆ EnableIfItInputIterator

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<class It >
using sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::EnableIfItInputIterator = std::enable_if_t<std::is_convertible_v< typename std::iterator_traits<It>::iterator_category, std::input_iterator_tag> >

Definition at line 188 of file buffer.hpp.

◆ EnableIfOneDimension

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<int dims>
using sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::EnableIfOneDimension = typename std::enable_if_t<1 == dims>

Definition at line 178 of file buffer.hpp.

◆ EnableIfSameNonConstIterators

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename ItA , typename ItB >
using sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::EnableIfSameNonConstIterators = typename std::enable_if_t< std::is_same_v<ItA, ItB> && !std::is_const_v<ItA>, ItA>

Definition at line 192 of file buffer.hpp.

◆ reference

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
using sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::reference = value_type &

Definition at line 174 of file buffer.hpp.

◆ value_type

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
using sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::value_type = T

Definition at line 173 of file buffer.hpp.

Constructor & Destructor Documentation

◆ buffer() [1/17]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
sycl::_V1::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 195 of file buffer.hpp.

◆ buffer() [2/17]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
sycl::_V1::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 207 of file buffer.hpp.

◆ buffer() [3/17]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
sycl::_V1::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 220 of file buffer.hpp.

◆ buffer() [4/17]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
sycl::_V1::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 233 of file buffer.hpp.

◆ buffer() [5/17]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename _T = T>
sycl::_V1::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 247 of file buffer.hpp.

◆ buffer() [6/17]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename _T = T>
sycl::_V1::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 262 of file buffer.hpp.

◆ buffer() [7/17]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
sycl::_V1::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 276 of file buffer.hpp.

◆ buffer() [8/17]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
sycl::_V1::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 292 of file buffer.hpp.

◆ buffer() [9/17]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
sycl::_V1::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 308 of file buffer.hpp.

◆ buffer() [10/17]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
sycl::_V1::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 324 of file buffer.hpp.

◆ buffer() [11/17]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<class InputIterator , int N = dimensions, typename = EnableIfOneDimension<N>, typename = EnableIfItInputIterator<InputIterator>>
sycl::_V1::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 343 of file buffer.hpp.

◆ buffer() [12/17]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<class InputIterator , int N = dimensions, typename = EnableIfOneDimension<N>, typename = EnableIfItInputIterator<InputIterator>>
sycl::_V1::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 375 of file buffer.hpp.

◆ buffer() [13/17]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<class Container , int N = dimensions, typename = EnableIfOneDimension<N>, typename = EnableIfContiguous<Container>>
sycl::_V1::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 408 of file buffer.hpp.

◆ buffer() [14/17]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<class Container , int N = dimensions, typename = EnableIfOneDimension<N>, typename = EnableIfContiguous<Container>>
sycl::_V1::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 427 of file buffer.hpp.

◆ buffer() [15/17]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
sycl::_V1::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

◆ buffer() [16/17]

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

◆ buffer() [17/17]

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

◆ ~buffer()

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::~buffer ( )
inline

Definition at line 476 of file buffer.hpp.

References sycl::_V1::detail::buffer_plain::handleRelease().

Member Function Documentation

◆ __SYCL2020_DEPRECATED() [1/4]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<access::mode mode>
sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::__SYCL2020_DEPRECATED ( "get_access for host_accessor is  deprecated,
please " "use get_host_access instead  
)

◆ __SYCL2020_DEPRECATED() [2/4]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<access::mode mode>
sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::__SYCL2020_DEPRECATED ( "get_access for host_accessor is  deprecated,
please " "use get_host_access instead  
)

◆ __SYCL2020_DEPRECATED() [3/4]

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

Definition at line 488 of file buffer.hpp.

◆ __SYCL2020_DEPRECATED() [4/4]

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

Definition at line 492 of file buffer.hpp.

◆ byte_size()

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
size_t sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::byte_size ( ) const
inlinenoexcept

Definition at line 495 of file buffer.hpp.

◆ get_access() [1/6]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
ext::oneapi:: accessor_property_list sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::get_access ( const detail::code_location  CodeLoc = detail::code_location:: current())
inline

Definition at line 519 of file buffer.hpp.

References sycl::_V1::access::false_t.

◆ get_access() [2/6]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::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<> > sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::get_access ( handler CommandGroupHandler,
const detail::code_location  CodeLoc = detail::code_location::current() 
)
inline

◆ get_access() [3/6]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::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<> > sycl::_V1::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 531 of file buffer.hpp.

◆ get_access() [4/6]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename... Ts>
auto sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::get_access ( handler commandGroupHandler,
Ts...  args 
)
inline

Definition at line 573 of file buffer.hpp.

◆ get_access() [5/6]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
ext::oneapi:: accessor_property_list sycl::_V1::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 551 of file buffer.hpp.

◆ get_access() [6/6]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename... Ts>
auto sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::get_access ( Ts...  args)
inline

Definition at line 568 of file buffer.hpp.

◆ get_allocator()

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
AllocatorT sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::get_allocator ( ) const
inline

◆ get_host_access() [1/2]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename... Ts>
auto sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::get_host_access ( handler commandGroupHandler,
Ts...  args 
)
inline

Definition at line 582 of file buffer.hpp.

◆ get_host_access() [2/2]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename... Ts>
auto sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::get_host_access ( Ts...  args)
inline

Definition at line 577 of file buffer.hpp.

◆ get_property()

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename propertyT >
propertyT sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::get_property ( ) const
inline

Definition at line 701 of file buffer.hpp.

◆ get_range()

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
range<dimensions> sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::get_range ( ) const
inline

Definition at line 486 of file buffer.hpp.

◆ has_property()

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename propertyT >
bool sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::has_property ( ) const
inlinenoexcept

Definition at line 697 of file buffer.hpp.

◆ is_sub_buffer()

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
bool sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::is_sub_buffer ( ) const
inline

Definition at line 647 of file buffer.hpp.

References sycl::_V1::detail::buffer_plain::set_write_back().

◆ isOutOfBounds()

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

Definition at line 706 of file buffer.hpp.

◆ operator!=()

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
bool sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::operator!= ( const buffer< T, dimensions, AllocatorT, __Enabled > &  rhs) const
inline

Definition at line 480 of file buffer.hpp.

◆ operator=() [1/2]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
buffer& sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::operator= ( buffer< T, dimensions, AllocatorT, __Enabled > &&  rhs)
default

◆ operator=() [2/2]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
buffer& sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::operator= ( const buffer< T, dimensions, AllocatorT, __Enabled > &  rhs)
default

◆ operator==()

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
bool sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::operator== ( const buffer< T, dimensions, AllocatorT, __Enabled > &  rhs) const
inline

Definition at line 478 of file buffer.hpp.

References sycl::_V1::detail::buffer_plain::impl.

◆ reinterpret() [1/3]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename ReinterpretT , int ReinterpretDim = dimensions>
std::enable_if_t< (sizeof(ReinterpretT) == sizeof(T)) && (dimensions == ReinterpretDim), buffer<ReinterpretT, ReinterpretDim, typename std::allocator_traits<AllocatorT>::template rebind_alloc< std::remove_const_t<ReinterpretT> > > > sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::reinterpret ( ) const
inline

Definition at line 673 of file buffer.hpp.

◆ reinterpret() [2/3]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename ReinterpretT , int ReinterpretDim = dimensions>
std::enable_if_t<(ReinterpretDim == 1) && ((dimensions != ReinterpretDim) || (sizeof(ReinterpretT) != sizeof(T))), buffer<ReinterpretT, ReinterpretDim, AllocatorT> > sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::reinterpret ( ) const
inline

Definition at line 685 of file buffer.hpp.

◆ reinterpret() [3/3]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename ReinterpretT , int ReinterpretDim>
buffer<ReinterpretT, ReinterpretDim, typename std::allocator_traits<AllocatorT>::template rebind_alloc< std::remove_const_t<ReinterpretT> > > sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::reinterpret ( range< ReinterpretDim >  reinterpretRange) const
inline

Definition at line 653 of file buffer.hpp.

References sycl::_V1::range< Dimensions >::size().

◆ set_final_data() [1/2]

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

Definition at line 587 of file buffer.hpp.

◆ set_final_data() [2/2]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
void sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::set_final_data ( std::nullptr_t  )
inline

Definition at line 641 of file buffer.hpp.

◆ set_final_data_internal() [1/5]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename Destination >
detail::EnableIfOutputPointerT<Destination> sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::set_final_data_internal ( Destination  FinalData)
inline

◆ set_final_data_internal() [2/5]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename Destination >
detail::EnableIfOutputIteratorT<Destination> sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::set_final_data_internal ( Destination  FinalData)
inline

◆ set_final_data_internal() [3/5]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
void sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::set_final_data_internal ( std::nullptr_t  )
inline

Definition at line 591 of file buffer.hpp.

◆ set_final_data_internal() [4/5]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename WeakT >
void sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::set_final_data_internal ( std::weak_ptr< WeakT >  FinalData)
inline

◆ set_final_data_internal() [5/5]

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<template< typename WeakT > class WeakPtrT, typename WeakT >
std::enable_if_t<std::is_convertible_v<WeakPtrT<WeakT>, std::weak_ptr<WeakT> > > sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::set_final_data_internal ( WeakPtrT< WeakT >  FinalData)
inline

Definition at line 597 of file buffer.hpp.

◆ set_write_back()

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
void sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::set_write_back ( bool  flag = true)
inline

Definition at line 645 of file buffer.hpp.

Referenced by sycl::_V1::detail::stream_impl::stream_impl().

◆ size()

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
size_t sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::size ( ) const
inlinenoexcept

Definition at line 490 of file buffer.hpp.

Referenced by sycl::_V1::detail::stream_impl::stream_impl().

Friends And Related Function Documentation

◆ accessor

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::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 723 of file buffer.hpp.

◆ buffer

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

Definition at line 720 of file buffer.hpp.

◆ detail::get_native_buffer

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::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 = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::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

◆ ext::oneapi::weak_object

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
template<typename SYCLObjT >
friend class ext::oneapi::weak_object
friend

Definition at line 727 of file buffer.hpp.

Member Data Documentation

◆ dimensions

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::dimensions

Definition at line 517 of file buffer.hpp.

◆ mode

template<typename T , int dimensions = 1, typename AllocatorT = buffer_allocator<std::remove_const_t<T>>, typename __Enabled = typename std::enable_if_t<(dimensions > 0) && (dimensions <= 3)>>
sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::mode

Definition at line 517 of file buffer.hpp.


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