DPC++ Runtime
Runtime libraries for oneAPI DPC++
sycl::_V1::image< Dimensions, AllocatorT > Class Template Reference

Defines a shared image data. More...

#include <sycl/image.hpp>

Inheritance diagram for sycl::_V1::image< Dimensions, AllocatorT >:
Collaboration diagram for sycl::_V1::image< Dimensions, AllocatorT >:

Public Member Functions

 image (image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const property_list &PropList={})
 
 image (image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, AllocatorT Allocator, const property_list &PropList={})
 
template<bool B = (Dimensions > 1)>
 image (image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const typename std::enable_if_t< B, range< Dimensions - 1 >> &Pitch, const property_list &PropList={})
 
template<bool B = (Dimensions > 1)>
 image (image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const typename std::enable_if_t< B, range< Dimensions - 1 >> &Pitch, AllocatorT Allocator, const property_list &PropList={})
 
 image (void *HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const property_list &PropList={})
 
 image (void *HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, AllocatorT Allocator, const property_list &PropList={})
 
 image (const void *HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const property_list &PropList={})
 
 image (const void *HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, AllocatorT Allocator, const property_list &PropList={})
 
template<bool B = (Dimensions > 1)>
 image (void *HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const typename std::enable_if_t< B, range< Dimensions - 1 >> &Pitch, const property_list &PropList={})
 
template<bool B = (Dimensions > 1)>
 image (void *HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const typename std::enable_if_t< B, range< Dimensions - 1 >> &Pitch, AllocatorT Allocator, const property_list &PropList={})
 
 image (std::shared_ptr< void > &HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const property_list &PropList={})
 
 image (std::shared_ptr< void > &HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, AllocatorT Allocator, const property_list &PropList={})
 
template<bool B = (Dimensions > 1)>
 image (std::shared_ptr< void > &HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const typename std::enable_if_t< B, range< Dimensions - 1 >> &Pitch, const property_list &PropList={})
 
template<bool B = (Dimensions > 1)>
 image (std::shared_ptr< void > &HostPointer, image_channel_order Order, image_channel_type Type, const range< Dimensions > &Range, const typename std::enable_if_t< B, range< Dimensions - 1 >> &Pitch, AllocatorT Allocator, const property_list &PropList={})
 
 image (const image &rhs)=default
 
 image (image &&rhs)=default
 
imageoperator= (const image &rhs)=default
 
imageoperator= (image &&rhs)=default
 
 ~image ()=default
 
bool operator== (const image &rhs) const
 
bool operator!= (const image &rhs) const
 
template<typename propertyT >
bool has_property () const noexcept
 
template<typename propertyT >
propertyT get_property () const
 
range< Dimensionsget_range () const
 
template<bool B = (Dimensions > 1)>
std::enable_if_t< B, range< Dimensions - 1 > > get_pitch () const
 
size_t get_size () const
 
 __SYCL2020_DEPRECATED ("get_count() is deprecated, please use size() instead") size_t get_count() const
 
size_t size () const noexcept
 
AllocatorT get_allocator () const
 
template<typename DataT , access::mode AccessMode>
accessor< detail::EnableIfImgAccDataT< DataT >, Dimensions, AccessMode, access::target::image, access::placeholder::false_t, ext::oneapi::accessor_property_list<> > get_access (handler &commandGroupHandler)
 
template<typename DataT , access::mode AccessMode>
accessor< detail::EnableIfImgAccDataT< DataT >, Dimensions, AccessMode, access::target::host_image, access::placeholder::false_t, ext::oneapi::accessor_property_list<> > get_access ()
 
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_write_back (bool flag=true)
 

Friends

template<typename DataT , int Dims, access::mode AccMode, access::target AccTarget, access::placeholder IsPlaceholder, typename PropertyListT >
class accessor
 
template<typename DataT , int Dims, access::mode AccMode, access::target AccTarget, access::placeholder IsPlaceholder>
class detail::image_accessor
 

Additional Inherited Members

- Protected Member Functions inherited from sycl::_V1::detail::image_plain
 image_plain (image_channel_order Order, image_channel_type Type, const range< 3 > &Range, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList)
 
 image_plain (image_channel_order Order, image_channel_type Type, const range< 3 > &Range, const range< 2 > &Pitch, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList)
 
 image_plain (void *HostPointer, image_channel_order Order, image_channel_type Type, const range< 3 > &Range, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList)
 
 image_plain (const void *HostPointer, image_channel_order Order, image_channel_type Type, const range< 3 > &Range, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList)
 
 image_plain (void *HostPointer, image_channel_order Order, image_channel_type Type, const range< 3 > &Range, const range< 2 > &Pitch, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList)
 
 image_plain (const std::shared_ptr< const void > &HostPointer, image_channel_order Order, image_channel_type Type, const range< 3 > &Range, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList, bool IsConstPtr)
 
 image_plain (const std::shared_ptr< const void > &HostPointer, image_channel_order Order, image_channel_type Type, const range< 3 > &Range, const range< 2 > &Pitch, std::unique_ptr< SYCLMemObjAllocator > Allocator, uint8_t Dimensions, const property_list &PropList, bool IsConstPtr)
 
template<typename propertyT >
bool has_property () const noexcept
 
template<typename propertyT >
propertyT get_property () const
 
range< 3 > get_range () const
 
range< 2 > get_pitch () const
 
size_t get_size () const
 
size_t get_count () const
 
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 flag)
 
const std::unique_ptr< SYCLMemObjAllocator > & get_allocator_internal () const
 
size_t getElementSize () const
 
size_t getRowPitch () const
 
size_t getSlicePitch () const
 
image_channel_order getChannelOrder () const
 
image_channel_type getChannelType () const
 
- Protected Attributes inherited from sycl::_V1::detail::image_plain
std::shared_ptr< detail::image_implimpl
 

Detailed Description

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
class sycl::_V1::image< Dimensions, AllocatorT >

Defines a shared image data.

Images can be 1-, 2-, and 3-dimensional. They have to be accessed using the accessor class.

See also
Accessors
sampler

Definition at line 181 of file image.hpp.

Constructor & Destructor Documentation

◆ image() [1/16]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
sycl::_V1::image< Dimensions, AllocatorT >::image ( image_channel_order  Order,
image_channel_type  Type,
const range< Dimensions > &  Range,
const property_list PropList = {} 
)
inline

Definition at line 184 of file image.hpp.

◆ image() [2/16]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
sycl::_V1::image< Dimensions, AllocatorT >::image ( image_channel_order  Order,
image_channel_type  Type,
const range< Dimensions > &  Range,
AllocatorT  Allocator,
const property_list PropList = {} 
)
inline

Definition at line 191 of file image.hpp.

◆ image() [3/16]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<bool B = (Dimensions > 1)>
sycl::_V1::image< Dimensions, AllocatorT >::image ( image_channel_order  Order,
image_channel_type  Type,
const range< Dimensions > &  Range,
const typename std::enable_if_t< B, range< Dimensions - 1 >> &  Pitch,
const property_list PropList = {} 
)
inline

Definition at line 202 of file image.hpp.

◆ image() [4/16]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<bool B = (Dimensions > 1)>
sycl::_V1::image< Dimensions, AllocatorT >::image ( image_channel_order  Order,
image_channel_type  Type,
const range< Dimensions > &  Range,
const typename std::enable_if_t< B, range< Dimensions - 1 >> &  Pitch,
AllocatorT  Allocator,
const property_list PropList = {} 
)
inline

Definition at line 214 of file image.hpp.

◆ image() [5/16]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
sycl::_V1::image< Dimensions, AllocatorT >::image ( void *  HostPointer,
image_channel_order  Order,
image_channel_type  Type,
const range< Dimensions > &  Range,
const property_list PropList = {} 
)
inline

Definition at line 225 of file image.hpp.

◆ image() [6/16]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
sycl::_V1::image< Dimensions, AllocatorT >::image ( void *  HostPointer,
image_channel_order  Order,
image_channel_type  Type,
const range< Dimensions > &  Range,
AllocatorT  Allocator,
const property_list PropList = {} 
)
inline

Definition at line 233 of file image.hpp.

◆ image() [7/16]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
sycl::_V1::image< Dimensions, AllocatorT >::image ( const void *  HostPointer,
image_channel_order  Order,
image_channel_type  Type,
const range< Dimensions > &  Range,
const property_list PropList = {} 
)
inline

Definition at line 242 of file image.hpp.

◆ image() [8/16]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
sycl::_V1::image< Dimensions, AllocatorT >::image ( const void *  HostPointer,
image_channel_order  Order,
image_channel_type  Type,
const range< Dimensions > &  Range,
AllocatorT  Allocator,
const property_list PropList = {} 
)
inline

Definition at line 251 of file image.hpp.

◆ image() [9/16]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<bool B = (Dimensions > 1)>
sycl::_V1::image< Dimensions, AllocatorT >::image ( void *  HostPointer,
image_channel_order  Order,
image_channel_type  Type,
const range< Dimensions > &  Range,
const typename std::enable_if_t< B, range< Dimensions - 1 >> &  Pitch,
const property_list PropList = {} 
)
inline

Definition at line 262 of file image.hpp.

◆ image() [10/16]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<bool B = (Dimensions > 1)>
sycl::_V1::image< Dimensions, AllocatorT >::image ( void *  HostPointer,
image_channel_order  Order,
image_channel_type  Type,
const range< Dimensions > &  Range,
const typename std::enable_if_t< B, range< Dimensions - 1 >> &  Pitch,
AllocatorT  Allocator,
const property_list PropList = {} 
)
inline

Definition at line 275 of file image.hpp.

◆ image() [11/16]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
sycl::_V1::image< Dimensions, AllocatorT >::image ( std::shared_ptr< void > &  HostPointer,
image_channel_order  Order,
image_channel_type  Type,
const range< Dimensions > &  Range,
const property_list PropList = {} 
)
inline

Definition at line 286 of file image.hpp.

◆ image() [12/16]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
sycl::_V1::image< Dimensions, AllocatorT >::image ( std::shared_ptr< void > &  HostPointer,
image_channel_order  Order,
image_channel_type  Type,
const range< Dimensions > &  Range,
AllocatorT  Allocator,
const property_list PropList = {} 
)
inline

Definition at line 295 of file image.hpp.

◆ image() [13/16]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<bool B = (Dimensions > 1)>
sycl::_V1::image< Dimensions, AllocatorT >::image ( std::shared_ptr< void > &  HostPointer,
image_channel_order  Order,
image_channel_type  Type,
const range< Dimensions > &  Range,
const typename std::enable_if_t< B, range< Dimensions - 1 >> &  Pitch,
const property_list PropList = {} 
)
inline

Definition at line 306 of file image.hpp.

◆ image() [14/16]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<bool B = (Dimensions > 1)>
sycl::_V1::image< Dimensions, AllocatorT >::image ( std::shared_ptr< void > &  HostPointer,
image_channel_order  Order,
image_channel_type  Type,
const range< Dimensions > &  Range,
const typename std::enable_if_t< B, range< Dimensions - 1 >> &  Pitch,
AllocatorT  Allocator,
const property_list PropList = {} 
)
inline

Definition at line 319 of file image.hpp.

◆ image() [15/16]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
sycl::_V1::image< Dimensions, AllocatorT >::image ( const image< Dimensions, AllocatorT > &  rhs)
default

◆ image() [16/16]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
sycl::_V1::image< Dimensions, AllocatorT >::image ( image< Dimensions, AllocatorT > &&  rhs)
default

◆ ~image()

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
sycl::_V1::image< Dimensions, AllocatorT >::~image ( )
default

Member Function Documentation

◆ __SYCL2020_DEPRECATED()

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
sycl::_V1::image< Dimensions, AllocatorT >::__SYCL2020_DEPRECATED ( "get_count() is  deprecated,
please use size() instead  
) const
inline

Definition at line 379 of file image.hpp.

◆ get_access() [1/2]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<typename DataT , access::mode AccessMode>
accessor<detail::EnableIfImgAccDataT<DataT>, Dimensions, AccessMode, access::target::host_image, access::placeholder::false_t, ext::oneapi::accessor_property_list<> > sycl::_V1::image< Dimensions, AllocatorT >::get_access ( )
inline

Definition at line 404 of file image.hpp.

References sycl::_V1::AccessMode, and sycl::_V1::Dimensions.

◆ get_access() [2/2]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<typename DataT , access::mode AccessMode>
accessor<detail::EnableIfImgAccDataT<DataT>, Dimensions, AccessMode, access::target::image, access::placeholder::false_t, ext::oneapi::accessor_property_list<> > sycl::_V1::image< Dimensions, AllocatorT >::get_access ( handler commandGroupHandler)
inline

Definition at line 393 of file image.hpp.

References sycl::_V1::AccessMode, and sycl::_V1::Dimensions.

◆ get_allocator()

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
AllocatorT sycl::_V1::image< Dimensions, AllocatorT >::get_allocator ( ) const
inline

Definition at line 384 of file image.hpp.

◆ get_pitch()

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<bool B = (Dimensions > 1)>
std::enable_if_t<B, range<Dimensions - 1> > sycl::_V1::image< Dimensions, AllocatorT >::get_pitch ( ) const
inline

Definition at line 370 of file image.hpp.

References sycl::_V1::detail::convertToArrayOfN(), and sycl::_V1::Dimensions.

◆ get_property()

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<typename propertyT >
propertyT sycl::_V1::image< Dimensions, AllocatorT >::get_property ( ) const
inline

Definition at line 360 of file image.hpp.

◆ get_range()

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
range<Dimensions> sycl::_V1::image< Dimensions, AllocatorT >::get_range ( ) const
inline

Definition at line 364 of file image.hpp.

◆ get_size()

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
size_t sycl::_V1::image< Dimensions, AllocatorT >::get_size ( ) const
inline

Definition at line 376 of file image.hpp.

◆ has_property()

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<typename propertyT >
bool sycl::_V1::image< Dimensions, AllocatorT >::has_property ( ) const
inlinenoexcept

Definition at line 356 of file image.hpp.

◆ operator!=()

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
bool sycl::_V1::image< Dimensions, AllocatorT >::operator!= ( const image< Dimensions, AllocatorT > &  rhs) const
inline

Definition at line 353 of file image.hpp.

◆ operator=() [1/2]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
image& sycl::_V1::image< Dimensions, AllocatorT >::operator= ( const image< Dimensions, AllocatorT > &  rhs)
default

◆ operator=() [2/2]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
image& sycl::_V1::image< Dimensions, AllocatorT >::operator= ( image< Dimensions, AllocatorT > &&  rhs)
default

◆ operator==()

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
bool sycl::_V1::image< Dimensions, AllocatorT >::operator== ( const image< Dimensions, AllocatorT > &  rhs) const
inline

Definition at line 351 of file image.hpp.

References sycl::_V1::detail::image_plain::impl.

◆ set_final_data()

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<typename Destination = std::nullptr_t>
void sycl::_V1::image< Dimensions, AllocatorT >::set_final_data ( Destination  finalData = nullptr)
inline

Definition at line 411 of file image.hpp.

◆ set_final_data_internal() [1/5]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<typename Destination >
detail::EnableIfOutputPointerT<Destination> sycl::_V1::image< Dimensions, AllocatorT >::set_final_data_internal ( Destination  FinalData)
inline

Definition at line 438 of file image.hpp.

◆ set_final_data_internal() [2/5]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<typename Destination >
detail::EnableIfOutputIteratorT<Destination> sycl::_V1::image< Dimensions, AllocatorT >::set_final_data_internal ( Destination  FinalData)
inline

Definition at line 450 of file image.hpp.

◆ set_final_data_internal() [3/5]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
void sycl::_V1::image< Dimensions, AllocatorT >::set_final_data_internal ( std::nullptr_t  )
inline

Definition at line 415 of file image.hpp.

◆ set_final_data_internal() [4/5]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<typename WeakT >
void sycl::_V1::image< Dimensions, AllocatorT >::set_final_data_internal ( std::weak_ptr< WeakT >  FinalData)
inline

Definition at line 428 of file image.hpp.

◆ set_final_data_internal() [5/5]

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<template< typename WeakT > class WeakPtrT, typename WeakT >
std::enable_if_t< std::is_convertible<WeakPtrT<WeakT>, std::weak_ptr<WeakT> >::value> sycl::_V1::image< Dimensions, AllocatorT >::set_final_data_internal ( WeakPtrT< WeakT >  FinalData)
inline

Definition at line 422 of file image.hpp.

◆ set_write_back()

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
void sycl::_V1::image< Dimensions, AllocatorT >::set_write_back ( bool  flag = true)
inline

Definition at line 466 of file image.hpp.

◆ size()

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
size_t sycl::_V1::image< Dimensions, AllocatorT >::size ( ) const
inlinenoexcept

Definition at line 381 of file image.hpp.

Friends And Related Function Documentation

◆ accessor

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<typename DataT , int Dims, access::mode AccMode, access::target AccTarget, access::placeholder IsPlaceholder, typename PropertyListT >
friend class accessor
friend

Definition at line 492 of file image.hpp.

◆ detail::image_accessor

template<int Dimensions = 1, typename AllocatorT = sycl::image_allocator>
template<typename DataT , int Dims, access::mode AccMode, access::target AccTarget, access::placeholder IsPlaceholder>
friend class detail::image_accessor
friend

Definition at line 496 of file image.hpp.


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