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 = detail::void_t< std::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 = std::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 std::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_final_data_internal (std::nullptr_t)
 
template<template< typename WeakT > class WeakPtrT, typename WeakT >
std::enable_if_t< std::is_convertible< WeakPtrT< WeakT >, std::weak_ptr< WeakT > >::value > 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<(sizeof(ReinterpretT)==sizeof(T)) &&(dimensions==ReinterpretDim), buffer< ReinterpretT, ReinterpretDim, typename std::allocator_traits< AllocatorT >::template rebind_alloc< std::remove_const_t< ReinterpretT > > > >::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 noexcept
 
template<typename propertyT >
propertyT get_property () const
 

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
 

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 145 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 156 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 155 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 = detail::void_t<std::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 161 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<typename std::iterator_traits<It>::iterator_category, std::input_iterator_tag>::value>

Definition at line 168 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 158 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<ItA, ItB>::value && !std::is_const<ItA>::value, ItA>

Definition at line 172 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 154 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 153 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 181 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 194 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 208 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 221 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 236 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 251 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 266 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 283 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 300 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 316 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 335 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 368 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 401 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 420 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

Definition at line 424 of file buffer.hpp.

References sycl::_V1::detail::constructorNotification().

◆ 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

Definition at line 447 of file buffer.hpp.

References sycl::_V1::detail::constructorNotification().

◆ 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

Definition at line 456 of file buffer.hpp.

References sycl::_V1::detail::constructorNotification().

◆ ~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 ( )
default

Member Function Documentation

◆ __SYCL2020_DEPRECATED() [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)>>
sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::__SYCL2020_DEPRECATED ( "get_count() is  deprecated,
please use size() instead  
) const
inline

Definition at line 481 of file buffer.hpp.

◆ __SYCL2020_DEPRECATED() [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)>>
sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::__SYCL2020_DEPRECATED ( "get_size() is  deprecated,
please use byte_size() instead  
) const
inline

Definition at line 485 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 488 of file buffer.hpp.

◆ get_access() [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>
accessor<T, dimensions, mode, access::target::host_buffer, access::placeholder::false_t, 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 509 of file buffer.hpp.

◆ get_access() [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, 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

Definition at line 498 of file buffer.hpp.

◆ get_access() [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)>>
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 519 of file buffer.hpp.

◆ get_access() [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)>>
template<access::mode mode>
accessor<T, dimensions, mode, access::target::host_buffer, access::placeholder::false_t, 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 536 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

Definition at line 490 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 688 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 479 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 684 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 634 of file buffer.hpp.

◆ 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 693 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 473 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 471 of file buffer.hpp.

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

◆ rangeToArray() [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)>>
std::array<size_t, 3> sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::rangeToArray ( range< 1 > &  r)
inline

Definition at line 179 of file buffer.hpp.

References sycl::_V1::r.

◆ rangeToArray() [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)>>
std::array<size_t, 3> sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::rangeToArray ( range< 2 > &  r)
inline

Definition at line 177 of file buffer.hpp.

References sycl::_V1::r.

◆ rangeToArray() [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)>>
std::array<size_t, 3> sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::rangeToArray ( range< 3 > &  r)
inline

Definition at line 175 of file buffer.hpp.

References sycl::_V1::r.

◆ 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< (sizeof(ReinterpretT) == sizeof(T)) && (dimensions == ReinterpretDim), buffer<ReinterpretT, ReinterpretDim, typename std::allocator_traits<AllocatorT>::template rebind_alloc< std::remove_const_t<ReinterpretT> > > >::type sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::reinterpret ( ) const
inline

Definition at line 660 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< (ReinterpretDim == 1) && ((dimensions != ReinterpretDim) || (sizeof(ReinterpretT) != sizeof(T))), buffer<ReinterpretT, ReinterpretDim, AllocatorT> >::type sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::reinterpret ( ) const
inline

Definition at line 672 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 640 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 573 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 628 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

Definition at line 600 of file buffer.hpp.

◆ 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

Definition at line 612 of file buffer.hpp.

◆ 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 577 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

Definition at line 590 of file buffer.hpp.

◆ 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<WeakPtrT<WeakT>, std::weak_ptr<WeakT> >::value> sycl::_V1::buffer< T, dimensions, AllocatorT, __Enabled >::set_final_data_internal ( WeakPtrT< WeakT >  FinalData)
inline

Definition at line 584 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 632 of file buffer.hpp.

◆ 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 483 of file buffer.hpp.

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 710 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 707 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 714 of file buffer.hpp.


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